gEDA-dev: gschem bug (gdb output attached)

Peter Clifton pcjc2 at cam.ac.uk
Mon Jul 24 10:42:21 EDT 2006


My habbit of running gschem under gdb pays off again:

See debug output below,
Can someone check if "w_current->prev->prev" is the correct test on line
997.

In the case I observed (after opening gschem, doing nothing with the
schematic, then clicking "X" (window-manager close button), I got the
following crash..

w_current->prev is NULL. - This should perhaps be tested for - see line
997. I've not worked out if thes w_current->prev->prev test is infact a
typo for w_current->prev, or if that is the desired test.

Regards,

Peter Clifton



(gdb) run
Starting program: /home/pcjc2/geda/bin/gschem
[Thread debugging using libthread_db enabled]
[New Thread -1220995408 (LWP 20737)]
gEDA/gschem version 20060123
gEDA/gschem comes with ABSOLUTELY NO WARRANTY; see COPYING for more
details.
This is free software, and you are welcome to redistribute it under
certain
conditions; please see the COPYING file for more details.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220995408 (LWP 20737)]
0x0808aa0a in x_window_close (w_current=0x812e578) at x_window.c:997
997       if (w_current->next == NULL && w_current->prev->prev == NULL)
{
(gdb) bt
#0  0x0808aa0a in x_window_close (w_current=0x812e578) at x_window.c:997
#1  0xb78b633b in gtk_marshal_VOID__UINT_STRING ()
from /usr/lib/libgtk-x11-2.0.so.0
#2  0x0812e578 in ?? ()
#3  0x08252b90 in ?? ()
#4  0x0812e578 in ?? ()
#5  0xb7bb9688 in ?? () from /usr/lib/libgobject-2.0.so.0
#6  0x00000000 in ?? ()
(gdb) l
992       }
993
994
x_fileselect_free_list_buffers(&w_current->fileselect[FILESELECT]);
995
x_fileselect_free_list_buffers(&w_current->fileselect[COMPSELECT]);
996
997       if (w_current->next == NULL && w_current->prev->prev == NULL)
{
998         /* no more window after this one, remember to quit */
999         last_window = TRUE;
1000      }
1001
(gdb) print w_current
$1 = (TOPLEVEL *) 0x812e578
(gdb) print w_current->next
$2 = (TOPLEVEL *) 0x0
(gdb) print w_current->prev
$3 = (TOPLEVEL *) 0x0
(gdb)






More information about the geda-dev mailing list