From bug-request at octave dot org Mon Jan 10 11:44:28 2005 Subject: Re: Segmentation fault? From: Per Persson To: David Bateman Cc: Vic Norton , bug@octave.org Date: Mon, 10 Jan 2005 18:47:26 +0100 [Moving to bug at octave dot org] The same thing happens with octave 2.1.64 on OS X 10.3.7 Is this an OS X specific problem? Here's the output from gdb: octave:1> clear all octave:2> quit Program received signal EXC_BAD_ACCESS, Could not access memory. __tcf_0 () at oct-obj.h:153 153 static Matrix empty_matrix; (gdb) bt #0 __tcf_0 () at oct-obj.h:153 Cannot access memory at address 0x1aa8240 #1 0x9002c7b8 in exit () #2 0x07e6e2c4 in clean_up_and_exit(int) (retval=-1610579860) at toplev.cc:230 #3 0x07e6e9a8 in Fquit(octave_value_list const&, int) (args= at 0xbffff4f0, nargout=0) at toplev.cc:283 #4 0x07f02504 in octave_builtin::do_multi_index_op(int, octave_value_list const&) (this=0x308ad90, nargout=-1073744656, args= at 0x0) at oct-obj.h:78 #5 0x07ef79b4 in octave_value::do_multi_index_op(int, octave_value_list const&) (this=0xbffff1b0, nargout=3, idx= at 0x74) at ov.cc:874 #6 0x07fd1768 in tree_identifier::rvalue(int) (this=0xbffff4f0, nargout=0) at oct-obj.h:78 #7 0x07ffd178 in tree_statement::eval(bool, int, bool) (this=0xbffff4f0, silent=3221222640, nargout=137693192, in_function_body=50900368) at oct-obj.h:78 #8 0x07ffd9a8 in tree_statement_list::eval(bool, int) (this=0x0, silent=3221222640, nargout=50900368) at oct-obj.h:78 #9 0x07e6dec4 in main_loop(std::string const&) (fun_to_call= at 0x84634cc) at toplev.cc:162 #10 0x081d2d74 in octave_main (argc=1, argv=0xbffffd10, embedded=137698536) at octave.cc:622 #11 0x00002394 in _start (argc=1, argv=0xbffffd10, envp=0xbffffd18) at /SourceCache/Csu/Csu-47/crt.c:267 #12 0x8fe1a558 in __dyld__dyld_start () Current language: auto; currently c++ /Per On Jan 10, 2005, at 15:28, David Bateman wrote: > > Try running gdb on octave or "valgrind --tool=memcheck" and identify > where exactly the seg-fault is happening.. > > D. > > According to Vic Norton (on 01/10/05): >> I've narrowed down my segmentation-fault problem. It seems to be the >> consequence of the two word command: >> octave> clear all >> Does "clear all" have known problems? >> >> Anyway, here are two scenarios that describe my situation. >> >> Scenario 1. >> I open octave. I run my script. Everything works perfectly. I quit >> octave. No problems. Output saved by the script is just what it ought >> to be. >> >> Scenario 2. >> I open octave. I run my script. Everything works perfectly. I type in >> "clear all" and hit return. No problem. I quit octave. After a >> significant pause I get the message >> panic: Segmentation fault -- stopping myself... >> attempting to save variables to `octave-core'... >> save to `octave-core' complete >> Segmentation fault >> Output saved by the script is just what it ought to be. >> >> This is not a big problem for me. The script does what it is supposed >> to and everything is saved. Quitting octave to clear out variables >> and subroutines works fine. I just restart octave if I want to do >> something else. >> >> However there does seem to be a problem with the command "clear all". >> Any ideas? Any suggestions? >> >> Regards, >> >> Vic >> >> >> >> ------------------------------------------------------------- >> 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 >> ------------------------------------------------------------- > > -- > David Bateman David dot Bateman at motorola dot com > Motorola CRM +33 1 69 35 48 04 (Ph) > Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) > 91193 Gif-Sur-Yvette FRANCE > > The information contained in this communication has been classified as: > > [x] General Business Information > [ ] Motorola Internal Use Only > [ ] Motorola Confidential Proprietary > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- > > /Per -------- Per Persson, Ph.D. Applied Signal Processing Resume, contact info and more: http://homepage.mac.com/persquare ------------------------------------------------------------- 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 -------------------------------------------------------------