pull-request: trip handling

Dirk Hohndel dirk at hohndel.org
Tue Sep 4 07:29:40 PDT 2012


On Sep 4, 2012, at 7:11 AM, Dirk Hohndel wrote:

> 
> On Sep 3, 2012, at 11:12 PM, Henrik Brautaset Aronsen wrote:
> 
>> Den 04.09.12 07:14, skrev Miika Turkia:
>>> On Tue, Sep 4, 2012 at 7:47 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>>>> I am getting a crash whenever I import an XML dive file.
>>>>> - ./subsurface dives/test23.xml
>>>>> - Import dives/test22.xml
>>>> Wow - I've never used that feature like this. The file selector dialog sucks as it doesn't default to a sane directory.
>>>> This crashes on my Mac with some pthreads problem, but seems to work just fine on Linux.
>>> I get this crash on Ubuntu 12.04
>>> GLib (gthread-posix.c): Unexpected error from C library during
>>> 'pthread_setspecific': Invalid argument.  Aborting.
>> 
>> Yup, same here on MacOSX 10.8.1:
> 
> I tried this a few dozen times. Yes, I can crash it on my Mac, no, I can't get a useful backtrace in any of the threads :-(
> 
>> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
>> 0   libsystem_kernel.dylib            0x00007fff9022e212 __pthread_kill + 10
>> 1   libsystem_c.dylib                 0x00007fff96597b34 pthread_kill + 90
>> 2   libsystem_c.dylib                 0x00007fff965dbdfa abort + 143
>> 3   libglib-2.0.0.dylib               0x000000010c504385 g_private_set + 85
>> 4   libglib-2.0.0.dylib               0x000000010c4e90ed g_thread_self + 61
>> 5   libglib-2.0.0.dylib               0x000000010c4c72fb g_source_attach + 187
>> 6   libglib-2.0.0.dylib               0x000000010c4c7682 g_idle_add_full + 242
>> 7   libgtk-quartz-2.0.0.dylib         0x000000010bca7f4b gtk_tree_view_row_deleted + 699
>> 8   libgobject-2.0.0.dylib            0x000000010c443104 g_closure_invoke + 308
>> 9   libgobject-2.0.0.dylib            0x000000010c452859 signal_emit_unlocked_R + 1641
>> 10  libgobject-2.0.0.dylib            0x000000010c45395c g_signal_emit_valist + 2924
>> 11  libgobject-2.0.0.dylib            0x000000010c453f84 g_signal_emit + 116
>> 12  libgtk-quartz-2.0.0.dylib         0x000000010bca0034 gtk_tree_store_remove + 244
>> 13  libgtk-quartz-2.0.0.dylib         0x000000010bca1192 gtk_tree_store_clear_traverse + 82
>> 14  libgtk-quartz-2.0.0.dylib         0x000000010bca116c gtk_tree_store_clear_traverse + 44
>> 15  libgtk-quartz-2.0.0.dylib         0x000000010bca10fb gtk_tree_store_clear + 59
>> 16  subsurface                        0x000000010b7e8963 dive_list_update_dives + 35 (divelist.c:1059)
> 
> That is extremely helpful. This at least tells me where things are going south.
> My only guess is that we somehow managed to mess up the state of the tree model and gtk implodes trying to clear the tree store.
> 
> Of course on my Mac things crash before I get to dive_list_update_dives (and as I mentioned, no useful backtrace in any of the threads).

Ok, setting a breakpoint in import_dialog and stepping through the code, for me this blows up on the gtk_widget_destroy(dialog) call in that function.
We must be messing something up in gtk's internal data structures and different layouts between the binaries on your Mac, my Mac, and between Fedora and Ubuntu cause different things to happen.

/D


More information about the subsurface mailing list