[pygtk] Re: segmentation fault

Daniel Brodie daniel at brodienet.com
Mon Oct 3 15:31:49 WST 2005


> Run it under gdb and generate a backtrace as a starter. Also try it 
> without any subclassing.

Ok, the segfault stil happens even without subclassing, but it happens
later (meaning after more data has been processed).
I also forgot to mention that I am using pygtk 2.6.1 (I can't update to
2.8 until I update all of gtk and gnome, which will take a while.)

Here is the backtrace:
#0  0x407aac87 in gtk_tree_model_filter_get_type ()
   from /usr/lib/libgtk-x11-2.0.so.0
#1  0x40701e54 in _gtk_marshal_VOID__BOXED_BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#2  0x403d1351 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x403e17e2 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#4  0x403e08f1 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#5  0x403e0b75 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x407a8ac6 in gtk_tree_model_row_changed ()
   from /usr/lib/libgtk-x11-2.0.so.0
#7  0x407b54f1 in gtk_tree_store_set_value ()
from /usr/lib/libgtk-x11-2.0.so.0
#8  0x4053c0df in init_gtk ()
   from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so
#9  0x081071fa in PyCFunction_Call ()
#10 0x080af706 in PyEval_CallObjectWithKeywords ()
#11 0x080ad9b7 in PyEval_EvalFrame ()
#12 0x080ae42e in PyEval_EvalCodeEx ()
#13 0x080af849 in PyEval_CallObjectWithKeywords ()
#14 0x080af464 in PyEval_CallObjectWithKeywords ()
#15 0x080ad9b7 in PyEval_EvalFrame ()
#16 0x080ae42e in PyEval_EvalCodeEx ()
#17 0x080af849 in PyEval_CallObjectWithKeywords ()
#18 0x080af464 in PyEval_CallObjectWithKeywords ()
#19 0x080ad9b7 in PyEval_EvalFrame ()
#20 0x080ae42e in PyEval_EvalCodeEx ()
#21 0x080af849 in PyEval_CallObjectWithKeywords ()
#22 0x080af464 in PyEval_CallObjectWithKeywords ()
#23 0x080ad9b7 in PyEval_EvalFrame ()
#24 0x080ae42e in PyEval_EvalCodeEx ()
#25 0x080af849 in PyEval_CallObjectWithKeywords ()
#26 0x080af464 in PyEval_CallObjectWithKeywords ()
#27 0x080ad9b7 in PyEval_EvalFrame ()
#28 0x080ae42e in PyEval_EvalCodeEx ()
#29 0x080b11a9 in PyEval_EvalCode ()
#30 0x080df38b in PyRun_FileExFlags ()
#31 0x080deb0f in PyRun_SimpleFileExFlags ()
#32 0x080554a4 in Py_Main ()
#33 0x08054f2b in main ()

Note: I was able to get it to not segment fault by doing a number of
changes, like not subclassing, adding less data to the treeview, etc...
in hopes of getting a smaller reproducable case, but what I saw happen
is that the segfault happens after more and more data gets processed
that what happens in the end is that it just dosn't happen. This dosn't
solve the problem, though.

Also, changing the visible func will cause it not to segfault (it dosn't
segfault in my code but somewhere in the C code). But right now I have
the visible_func written like this:
    if model.get_value(iter, COLUMN_ISFILE):
        return False
    else:
        return True

So I don't see what should be the problem.

Thanks,
Daniel




More information about the pygtk mailing list