dimension mismatch in spdiags leads to core dump

Elias Pipping elias at pipping.org
Tue Jun 16 05:49:29 CDT 2009


On Tue, 16 Jun 2009 09:52:39 +0200
Jaroslav Hajek <highegg at gmail.com> wrote:

> On Tue, Jun 16, 2009 at 3:07 AM, Elias Pipping<elias at pipping.org>
> wrote:
> > --------
> > Bug report for Octave 3.2.0 configured for x86_64-pc-linux-gnu
> >
> > Description:
> > -----------
> >
> >  * I meant to write
> >
> >       n=200; e=ones(n,1); A=spdiags([e 4*e e], -1:1, n, n);
> >
> >    but instead wrote
> >
> >       n=200; e=ones(n,1); A=spdiags([e 4*e e], -1:1, n);
> >
> >    which led to the error
> >
> >      error: A(I,J,...) = X: dimensions mismatch
> >      error: called from:
> >      error:   /usr/share/octave/3.2.0/m/sparse/spdiags.m at line
> > 71, column 29 error:   /usr/share/octave/3.2.0/m/sparse/spdiags.m
> > at line 76, column 7
> >
> >    however, when running the same erroneous command again, I got
> >
> >      octave: symtab.h:1065: static void
> > symbol_table::force_variable(const std::string&, int, size_t):
> > Assertion `xcurrent_context == 0' failed. panic: Aborted --
> > stopping myself... attempting to save variables to `octave-core'...
> > save to `octave-core' complete Aborted
> >
> 
> 
> Ugh, this was tricky.  The following patch fixes the problem for me:
> http://hg.savannah.gnu.org/hgweb/octave/rev/5e4da3b3747e

It does for me, too. Thanks a lot.


-- Elias



More information about the Bug-octave mailing list