problems with svn xffm (including stacktrace)

Edscott Wilson Garcia edscott at xfce.org
Sun Feb 12 14:18:09 CET 2006




On Sun, 12 Feb 2006, Mr Machine wrote:

> i'm a bit confused, cos i haven't had xffm-deskview running when these
> crashes occurred ( ... i've been checking out xfdesktop's new iconified
> desktop). did you mean i should do:
>
> "gdb xffm-iconview core.26519"?
>

I see, my mistake. I thought you were dragging to the deskview (which is 
the folder ~/Destop).

> in any case, i did both (on a different core file, though ... other one
> went missing), but i can't see much difference between them:
>
> (btw - the crash only happens when drag/copying *the second consecutive*
> file from one xffm-iconview window to another):
>

Is this with any two files and iconview windows? Or just certain iconview 
windows or files in particular? Maybe a lot of files in the directories 
or a drop by a priviledged user into a system directory (like the 
applicacion browser window)?

My inability to reproduce the problem makes me suspect a race condition. 
This would be logical since the update frequency was recently modified.

>> [mrmachine at machine ~]$ gdb xffm-iconview core.11627
>> GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
>> Copyright 2004 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you are
>> welcome to change it and/or distribute copies of it under certain conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
>>
>> Reading symbols from shared object read from target memory...done.
>> Loaded system supplied DSO at 0xffffe000
>> Core was generated by `xffm-iconview'.
>> Program terminated with signal 11, Segmentation fault.

The above information is useful for developer because it shows that the 
core file and trace back information is accurate.

>> #0  0x43d76e61 in g_object_ref () from /usr/lib/libgobject-2.0.so.0
>> (gdb) where
>> #0  0x43d76e61 in g_object_ref () from /usr/lib/libgobject-2.0.so.0
>> #1  0x45cb2f0d in gdk_event_copy () from /usr/lib/libgdk-x11-2.0.so.0
>> #2  0x46753b1c in gtk_drag_set_default_icon ()
>>    from /usr/lib/libgtk-x11-2.0.so.0
>> #3  0x46756200 in gtk_drag_set_icon_widget () from /usr/lib/libgtk-x11-2.0.so.0
>> #4  0xb7ecb931 in graphics_saturation_event (icon_view_p=0x807bdc0,
>>     population_p=0x863b790, x=332, y=3983) at gridview-callbacks.i:367
>> #5  0xb7ecbb3a in on_motion (widget=0x80e4c70, event=0x8085cd0, data=0x807bdc0)
>>     at gridview-callbacks.i:318
>> #6  0x467c7e30 in gtk_marshal_VOID__UINT_STRING ()
>>    from /usr/lib/libgtk-x11-2.0.so.0
>> #7  0x43d74ba8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
>> #8  0x43d82fa5 in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
>> #9  0x43d84547 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
>> #10 0x43d84b43 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
>> #11 0x468aa00f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
>> #12 0x467c65ad in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
>> #13 0x467c69bc in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
>> #14 0x45cda231 in gdk_screen_get_setting () from /usr/lib/libgdk-x11-2.0.so.0
>> #15 0x43d033b0 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
>> #16 0x43d063a6 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
>> #17 0x43d066c8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
>> #18 0x467c5cb5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
>> ---Type <return> to continue, or q <return> to quit---
>> #19 0x0804a6b2 in main (argc=1, argv=0x804c008) at main.c:440
>


>> [mrmachine at machine ~]$ gdb xffm-deskview core.11627
>> GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
>> Copyright 2004 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you are
>> welcome to change it and/or distribute copies of it under certain conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for details.
>> This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
>>
>>
>> warning: core file may not match specified executable file.

This warning shows that the traceback information may be inexact.

> do i need to copy/paste all of this, or is there only certain parts that
> contain useable info for the developer?
>

All the "Loading ..." "Reading..." stuff is not generally useful and may 
be omitted.

This is what I do with the traceback:
>> #5  0xb7ecbb3a in on_motion (widget=0x80e4c70, event=0x8085cd0, 
data=0x807bdc0)
>>     at gridview-callbacks.i:318

tells me to go to  gridview-callbacks.i:318 where ---within the 
on_motion function--- there should be another function call.

 	graphics_saturation_event(icon_view_p,population_p,event->x, 
event->y);

Then the traceback specifies:

>> #4  0xb7ecb931 in graphics_saturation_event (icon_view_p=0x807bdc0,
>>     population_p=0x863b790, x=332, y=3983) at gridview-callbacks.i:367

Which coincides with:

 	    icon_view_p->drag_event.context = gtk_drag_begin 
(icon_view_p->paper,
 			   target_list,
 			   GDK_ACTION_MOVE | GDK_ACTION_COPY | 
GDK_ACTION_LINK,
 			    icon_view_p->drag_button,
 			    (GdkEvent *)(&(icon_view_p->drag_event)));

>From this point on the program dives into gtk code, so its safe to assume 
the problem is not further down the line. Something in the above must be 
pointing to a non valid memory. Since the gtk traceback specifies

>> #2  0x46753b1c in gtk_drag_set_default_icon ()

And xffm-iconview sets the drag-icon to match the icon of the object being 
dragged, the we can pinpoint the problem being that xffm-iconview is 
destroying the object before gtk can use it. If with any further 
information I am still unable to reproduce, then I must do 
some detective work from the point where the drag icon is 
set until I find the possible race condition.

regards,




More information about the Xfce4-dev mailing list