gtk_tree_store_move_before segfaulting?



I'm having a problem with my usage of gtk_tree_store_move_before causing 
a segfault that i can't track down. 

I've attached the relevant file. The pertinent functions are get_drag 
and rcv_drag. The segfault takes place inside rcv_drag, on the line 
that is:

gtk_tree_store_move_before(dropstore, &dragdata.iter, &dropiter);

As you can see from the code, both iterators should be valid, since the 
assertions do not fail. In addition, both iterators are at depth 0, and 
thus must be at the same level. It still segfaults, though- in 
valgrind, I see that it's accessing uninitialized data, but i can't 
tell why. The is_valid checks do not access that data, just the 
move_before. Also, since I've been more or less winging the dnd stuff 
(mostly from looking over how gaim does it- I couldn't find any better 
docs) if you see how to do it better, that'd be great too :)

Also, here's the backtrace- not too helpful w/o debug info, i know, but 
hopefully just the function it's dying in is enough. If not, I could 
rebuild gtk w/ debugging.

#0  0x40228600 in gtk_tree_store_iter_n_children () 
from /usr/lib/libgtk-x11-2.0.so.0
#1  0x4021d91f in gtk_tree_model_iter_n_children () 
from /usr/lib/libgtk-x11-2.0.so.0
#2  0x40238c8f in gtk_tree_view_rows_reordered () 
from /usr/lib/libgtk-x11-2.0.so.0
#3  0x40170d92 in _gtk_marshal_VOID__BOXED_BOXED_POINTER () 
from /usr/lib/libgtk-x11-2.0.so.0
#4  0x40413e38 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#5  0x40426814 in signal_emit_unlocked_R () 
from /usr/lib/libgobject-2.0.so.0
#6  0x40425808 in g_signal_emit_valist () 
from /usr/lib/libgobject-2.0.so.0
#7  0x40425a84 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#8  0x4021e79b in gtk_tree_model_rows_reordered () 
from /usr/lib/libgtk-x11-2.0.so.0
#9  0x4022bab1 in gtk_tree_store_move () 
from /usr/lib/libgtk-x11-2.0.so.0
#10 0x4022bf17 in gtk_tree_store_move_before () 
from /usr/lib/libgtk-x11-2.0.so.0
#11 0x0804af1b in rcv_drag (widget=0x8095e58, dc=0x8157da8, x=50, y=8, 
sd=0xbfffe530, info=0, t=201041028, column=0x0)
    at callback.c:150

[ It's longer, but I don't think anything after this is relevant ]

Thanks in advance.
-- 
To smash a single atom, all mankind was intent.
Now any day the atom may return the compliment.

Attachment: callback.c
Description: Text Data

Attachment: pgpYfXQflOBZ1.pgp
Description: signature



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