octave-maintainers
[Top][All Lists]
Advanced

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

segfault cleaning up graphics objects


From: John W. Eaton
Subject: segfault cleaning up graphics objects
Date: Fri, 9 Dec 2011 09:16:45 -0500

On  8-Dec-2011, John W. Eaton wrote:

| OK, at least it doesn't crash immediately, but I noticed the
| following:
| 
|   graphics toolkit fltk
|   sombrero
|   quit
| 
| works, but
| 
|   graphics toolkit fltk
|   sombrero
|   ## manipulate the plot with the mouse
|   quit
| 
| segfaults.  The crash occurs here:
| 
|   #0  0x00007ffff49116ed in FT_Done_Face () from 
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
|   #1  0x00007ffff73f2262 in ft_render::~ft_render (this=0xd89be8, 
__in_chrg=<optimized out>)
|       at /home/jwe/src/octave/src/txt-eng-ft.cc:251
|   #2  0x00007ffff726d26f in axes::properties::~properties (this=0xd89060, 
__in_chrg=<optimized out>)
|       at ./graphics.h:4874
|   #3  0x00007ffff72744b9 in axes::~axes (this=0xd89050, __in_chrg=<optimized 
out>) at ./graphics.h:6723
|   #4  0x00007ffff727452e in axes::~axes (this=0xd89050, __in_chrg=<optimized 
out>) at ./graphics.h:6723
|   #5  0x00007ffff714d163 in graphics_object::~graphics_object 
(this=0x7fffeab23770, __in_chrg=<optimized out>)
|       at ./graphics.h:3065
|   #6  0x00007ffff509ad82 in __run_exit_handlers (status=0, 
listp=0x7ffff53e24c8, run_list_atexit=true) at exit.c:78
|   #7  0x00007ffff509add5 in *__GI_exit (status=14538000) at exit.c:100
|   #8  0x00007ffff73ecd4e in clean_up_and_exit (retval=0) at 
/home/jwe/src/octave/src/toplev.cc:687
|   #9  0x00007ffff73ec8cd in main_loop () at 
/home/jwe/src/octave/src/toplev.cc:641
|   #10 0x00007ffff73a37d4 in octave_main (argc=6, argv=0x7fffffffda98, 
embedded=0)
|       at /home/jwe/src/octave/src/octave.cc:938
|   #11 0x00000000004006f9 in main (argc=6, argv=0x7fffffffda98) at 
/home/jwe/src/octave/src/main.c:35
| 
| So it is happening after we have supposedly closed all the graphics
| windows and removed all the toolkit objects.  But some graphics
| objects are still present and calling destructors for them is not
| working.  And they shouldn't even exist at this point.  I don't know
| what would be grabbing a copy and hanging on to it until the system
| exit function is called.
| 
| I'll try to work on this problem some more tomorrow.

The following change fixes the problem for me:

  http://hg.savannah.gnu.org/hgweb/octave/rev/caf69ec5b94c

jwe


reply via email to

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