help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

empty matrix problem with 2.1.32 (cvs)


From: A S Hodel
Subject: empty matrix problem with 2.1.32 (cvs)
Date: Thu, 4 Jan 2001 16:17:33 -0600

On  3-Jan-2001, A Scottedward Hodel <address@hidden> wrote:

| octave:1> x = []
| x = [](0x0)
| octave:2> xx = [x, 1]
| warning: panic: Segmentation fault -- stopping myself...
| attempting to save variables to `octave-core'...                              
             
| save to `octave-core' complete
| Segmentation fault (core dumped)
|

Hmm.  I can't reproduce this problem with my current sources.

Can you get a traceback?  Have you upgraded libraries lately?

jwe


A traceback is below.  It looks like the pointer to the warning message in the
call to eval_warning is being lost somehow.  I ran an automated rpm update of
my linux software, so I'll recompile the whole cvs archive and then see if that
fixes the problem.   It looks as though the problem occurs before I get to the
gcc code, so I may have more work to do yet.

(gdb) run
Starting program: /usr/local/bin/octave
GNU Octave, version 2.1.32 (powerpc-unknown-linux-gnu).
Copyright (C) 1996, 1997, 1998, 1999, 2000 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

*** This is a development version of Octave.  Development releases
*** are provided for people who want to help test, debug, and improve
*** Octave.
***
*** If you want a stable, well-tested version of Octave, you should be
*** using one of the stable releases (when this development release
*** was made, the latest stable version was 2.0.16).

octave:1> x=[];
octave:2> y = [x,1];
warning:
Program received signal SIGSEGV, Segmentation fault.
0xf8a8cc4 in strlen () at soinit.c:59
59      soinit.c: No such file or directory.
Current language:  auto; currently c
(gdb) backtrace
#0  0xf8a8cc4 in strlen () at soinit.c:59
#1  0xf88d0b8 in _IO_vfprintf (s=0x7ffff3a0,
    format=0x1a0 <Address 0x1a0 out of bounds>, ap=0x7ffff620)
    at vfprintf.c:1259
#2  0xf98ad14 in ostream::vform (this=0x7ffff448,
    format=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620)
    at /usr/src/rpm/BUILD/gcc-2.95.2/libio/osform.cc:49
#3  0xfef0bfc in octave_vformat (address@hidden,
    fmt=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620)
    at utils.cc:725
#4  0xfe59d18 in vwarning (name=0xffbbbf8 "warning",
    fmt=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620) at 
error.cc:91#5  0xfe5ab50 in warning (fmt=0xffd46a4 "%s near line %d, column %d")
    at error.cc:301
#6  0xff3275c in tm_row_const::tm_row_const_rep::eval_warning (this=0x1a0,
    msg=0x1a0 <Address 0x1a0 out of bounds>, l=0, c=2147480064)
    at pt-mat.cc:267
#7  0xff32410 in tm_row_const::tm_row_const_rep::init (this=0x10153950,
    address@hidden) at pt-mat.cc:196
#8  0xff3284c in tm_const::init (this=0x7ffff758, address@hidden)
    at pt-mat.cc:82
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) up
#1  0xf88d0b8 in _IO_vfprintf (s=0x7ffff3a0,
    format=0x1a0 <Address 0x1a0 out of bounds>, ap=0x7ffff620)
    at vfprintf.c:1259
1259    vfprintf.c: No such file or directory.
(gdb) up
#2  0xf98ad14 in ostream::vform (this=0x7ffff448,
    format=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620)
    at /usr/src/rpm/BUILD/gcc-2.95.2/libio/osform.cc:49
49      /usr/src/rpm/BUILD/gcc-2.95.2/libio/osform.cc: No such file or directory
..
Current language:  auto; currently c++
(gdb) up
#3  0xfef0bfc in octave_vformat (address@hidden,
    fmt=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620)
    at utils.cc:725
725       buf.vform (fmt, args);
(gdb) up
#4  0xfe59d18 in vwarning (name=0xffbbbf8 "warning",
    fmt=0xffd46a4 "%s near line %d, column %d", args=0x7ffff620) at 
error.cc:9191        octave_vformat (std::cerr, fmt, args);
(gdb) up
#5  0xfe5ab50 in warning (fmt=0xffd46a4 "%s near line %d, column %d")
    at error.cc:301
301       vwarning ("warning", fmt, args);
(gdb) up
#6  0xff3275c in tm_row_const::tm_row_const_rep::eval_warning (this=0x1a0,
    at pt-mat.cc:267
267         ::warning ("%s near line %d, column %d", msg, l, c);
(gdb) print *msg
Cannot access memory at address 0x1a0.
(gdb) print msg
$1 = 0x1a0 <Address 0x1a0 out of bounds>
(gdb) print l
$2 = 0
(gdb) print c
$3 = 2147480064
(gdb) up
#7  0xff32410 in tm_row_const::tm_row_const_rep::init (this=0x10153950,
    address@hidden) at pt-mat.cc:196
196                                   elt->line (), elt->column ());
(gdb) print elt->line()
Cannot resolve method (null)line to any overloaded instance
(gdb) print (*elt).line()
Cannot resolve method tree_expression::line to any overloaded instance
(gdb) print (*elt)
$4 = {<tree> = {line_num = 2, column_num = 6, _vptr. = 0xffda488},
  num_parens = 0, postfix_indexed = false, print_flag = false}
(gdb)   

Line 196 in pt-mat.cc: 
               eval_warning ("empty matrix found in matrix list",
                              elt->line (), elt->column ());
 

and the pointer to the "empty matrix ..." string appears to be lost when we get
to eval_warning.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]