Re: [pygtk] treview segfaults due to sorting

2006-01-05 Thread Johan Dahlin

This is most likely a bug in gtk+.
Can you write a minimal testcase?

Johan

Brian wrote:

Our app has several treeviews.  One of those has several models that are
switched out, 3 are flat lists, 1 currently has one expander and child
nodes.  If the expander is opened, when switching to any of the other
models, it gets an instant segfault from the model.clear().  If I
comment out the clear() it segfaults still, just a little different.
The only thing I've been able to do so far to prevent the segfault is to
force a re-sort by clicking on one of the other column headers.
Normally the sort is on the first column (0).  All models share the same
treestore model.  The checkbox is hidden for all but one view.
def PackageModel():
"""Common model for a package Treestore"""
store = gtk.TreeStore(
gobject.TYPE_STRING,# 0: package name
gobject.TYPE_BOOLEAN,   # 1: checkbox value in upgrade view
gobject.TYPE_PYOBJECT,  # 2: package object
gtk.gdk.Pixbuf, # 3: room for various icons
gobject.TYPE_BOOLEAN,   # 4: true if package is in 'world'
file
gobject.TYPE_STRING,# 5: foreground text colour
gobject.TYPE_STRING,# 6: size
gobject.TYPE_STRING,# 7: installed version
gobject.TYPE_STRING,# 8: portage recommended version
gobject.TYPE_STRING,# 9: description
)
store.set_sort_func(6, size_sort_func)
store.set_sort_func(8, latest_sort_func)
store.set_sort_func(7, installed_sort_func)
return store



I do not know if this is a gtk bug yet or something we are doing wrong.
Googling showed that Johan was the main contributor of that section of
code, so I thought this list might be the best place to ask for any
insights as to what to look for, etc., besides it is a pygtk app :).

I've been far too busy lately to create a simple test app to duplicate
the problem.  Mostly what I am looking for now is any insight from
others that may have experienced similar problems and solved them.

I am attaching a file which is an accumulation of several gdb backtraces
for those that might be able to discern some valuable info from it.

Any help is very much appreciated...  Brian.




(gdb) continue
Continuing.
[New Thread 32770 (LWP 28631)]
[Thread 32770 (LWP 28631) exited]
[New Thread 49154 (LWP 28636)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 28625)]
0xb783a4be in gtk_tree_view_expand_all () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0xb783a4be in gtk_tree_view_expand_all () from /usr/lib/libgtk-x11-2.0.so.0
#1  0xb7834597 in gtk_tree_view_get_fixed_height_mode () from 
/usr/lib/libgtk-x11-2.0.so.0
#2  0xb7834692 in gtk_tree_view_get_fixed_height_mode () from 
/usr/lib/libgtk-x11-2.0.so.0
#3  0xb774dcc0 in gtk_marshal_VOID__UINT_STRING () from 
/usr/lib/libgtk-x11-2.0.so.0
#4  0xb7b3e146 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#5  0xb7b4f485 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#6  0xb7b4e537 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#7  0xb7b4e7c6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#8  0xb7814ad3 in gtk_tree_model_rows_reordered () from 
/usr/lib/libgtk-x11-2.0.so.0
#9  0xb782540f in gtk_tree_store_move_after () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb7825500 in gtk_tree_store_move_after () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb7820b4b in gtk_tree_sortable_set_sort_column_id () from 
/usr/lib/libgtk-x11-2.0.so.0
#12 0xb7a3f997 in init_gtk () from 
/usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so
#13 0xb7f20089 in PyCFunction_Call () from /usr/lib/libpython2.4.so.1.0



(gdb) continue
Continuing.
[New Thread 32770 (LWP 31588)]
[Thread 32770 (LWP 31588) exited]
[New Thread 49154 (LWP 31589)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 31315)]
0xb78344f8 in gtk_tree_view_get_fixed_height_mode () from 
/usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0xb78344f8 in gtk_tree_view_get_fixed_height_mode () from 
/usr/lib/libgtk-x11-2.0.so.0
#1  0xb7b50233 in g_cclosure_marshal_VOID__BOXED () from 
/usr/lib/libgobject-2.0.so.0
#2  0xb7b3e146 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0xb7b4f485 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#4  0xb7b4e537 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0xb7b4e7c6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0xb7814a25 in gtk_tree_model_row_deleted () from 
/usr/lib/libgtk-x11-2.0.so.0
#7  0xb7822ca5 in gtk_tree_store_remove () from /usr/lib/libgtk-x11-2.0.so.0
#8  0xb7823a15 in gtk_tree_store_iter_depth () from /usr/lib/libgtk-x11-2.0.so.0
#9  0xb78239d8 in gtk_tree_store_iter_depth () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb7823a8c in gtk_tree_store_clear () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb7a2a413 in init_gtk () 

RE: [pygtk] treview segfaults due to sorting

2006-01-05 Thread Brian
On Thu, 2006-05-01 at 11:53 +0100, Leeuw van der, Tim wrote:
> Hi Brian,
> 
> Other than that you're using Python 2.4 and GTK2, I don't see any
> information about the versions of software you're using, or the platform
> on which you're developing.
> 
> Can you please tell us which version of GTK and PyGTK you're using? And
> if you have version-details on other components (such as exact python
> version, Glib, etc) for us, they're welcome too.
> 
> Cheers,
> 
> --Tim

Yeah, I realized shortly after I hit send...

Distro - gentoo

python - 2.4.2
pygtk - 2.8.2
gtk+ - 2.8.9
glib - 2.8.4
gcc - 3.3.5.20050130-r1

> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Brian <[EMAIL PROTECTED]>

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


RE: [pygtk] treview segfaults due to sorting

2006-01-05 Thread Leeuw van der, Tim
Hi Brian,

Other than that you're using Python 2.4 and GTK2, I don't see any
information about the versions of software you're using, or the platform
on which you're developing.

Can you please tell us which version of GTK and PyGTK you're using? And
if you have version-details on other components (such as exact python
version, Glib, etc) for us, they're welcome too.

Cheers,

--Tim


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brian
Sent: donderdag 5 januari 2006 9:43
To: pygtk
Subject: [pygtk] treview segfaults due to sorting

[...]

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/