segfault using a custom subclass of goocanvas.ItemModelSimple
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pygoocanvas |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Creating a custom model by subclassing goocanvas.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7ead8c0 (LWP 3469)]
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb6f3604e in ?? () from /usr/lib/
#2 0xb7d9c11c in g_cclosure_
#3 0xb7d8ec4b in g_closure_invoke () from /usr/lib/
#4 0xb7da5095 in ?? () from /usr/lib/
#5 0xb7da67ac in g_signal_
#6 0xb7da6c26 in g_signal_emit () from /usr/lib/
#7 0xb6f3ba86 in _goo_canvas_
from /usr/lib/
#8 0xb6f35b90 in ?? () from /usr/lib/
#9 0xb6f3d03e in goo_canvas_
from /usr/lib/
#10 0xb6f7a984 in ?? ()
from /var/lib/
#11 0x080cea39 in PyEval_EvalFrameEx (f=0x97c23d4, throwflag=0)
at ../Python/
#12 0x080cfbf5 in PyEval_EvalFrameEx (f=0x9595e54, throwflag=0)
at ../Python/
[snip]
In the attached sample program, the segfault occurs at line 47, where the custom instance is added to the root group model.
I couldn't find any examples of what the custom model class should look like, but I based its implementation of create_item() on goocanvas's GroupModel class. Note that the segfault seems to occur before calling that however, as the print statement on line 15 never shows up in the output.
Oh, I'm using the latest packages in Intrepid:
python-pygoocanvas 0.12.0-0ubuntu1
libgoocanvas-common 0.12-0ubuntu1
libgoocanvas3 0.12-0ubuntu1
python-gtk2 2.13.0-0ubuntu8
libgtk2.0-0 2.14.4-0ubuntu1
python2.5 2.5.2-11.1ubuntu1