With your patch again a corrupted context, damm glib this should never happen. Anyways I did see some interesting things, but I have to double check them.
(gdb) bt
#0 __pthread_mutex_lock (mutex=0x7) at pthread_mutex_lock.c:50
#1 0x00007ffff29d004f in g_source_destroy_internal (source=0x7fffdc2fe130, context=0xffffffffffffffff, have_lock=0)
at /build/buildd/glib2.0-2.26.1/glib/gmain.c:942
#2 0x00007ffff29d290e in g_source_remove (tag=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:1717
#3 0x00007ffff67fcc7d in GSocketGUIFunctionsTableConcrete::Uninstall_Callback (this=0x7ffff6ccabd0, socket=0x2218aa0, event=GSOCK_OUTPUT)
at ./src/gtk/gsockgtk.cpp:119
#4 0x00007ffff63c37ef in GSocket::Disable (this=0x2218aa0, event=GSOCK_OUTPUT) at ./src/unix/gsocket.cpp:1527
#5 0x00007ffff63c42f8 in GSocket::Detected_Write (this=0x2218aa0) at ./src/unix/gsocket.cpp:1836
#6 0x00007ffff67fca1c in _GSocket_GDK_Input (data=0x2218aa0, source=19, condition=GDK_INPUT_WRITE) at ./src/gtk/gsockgtk.cpp:41
#7 0x00007ffff478e99f in gdk_io_invoke (source=<value optimized out>, condition=<value optimized out>, data=<value optimized out>)
at /build/buildd/gtk+2.0-2.22.0/gdk/gdkevents.c:1082
#8 0x00007ffff29d0342 in g_main_dispatch (context=0xc67f10) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2149
#9 g_main_context_dispatch (context=0xc67f10) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2702
#10 0x00007ffff29d42a8 in g_main_context_iterate (context=0xc67f10, block=<value optimized out>, dispatch=<value optimized out>,
self=<value optimized out>) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2780
#11 0x00007ffff29d47b5 in g_main_loop_run (loop=0x7fffe43371a0) at /build/buildd/glib2.0-2.26.1/glib/gmain.c:2988
#12 0x00007ffff4b4d3e7 in IA__gtk_main () at /build/buildd/gtk+2.0-2.22.0/gtk/gtkmain.c:1237
#13 0x00007ffff67faa5f in wxEventLoop::Run (this=0x7fffe4396a40) at ./src/gtk/evtloop.cpp:76
#14 0x00007ffff6896cc8 in wxAppBase::MainLoop (this=0xc67970) at ./src/common/appcmn.cpp:312
#15 0x00007ffff6896e42 in wxAppBase::OnRun (this=0xc67970) at ./src/common/appcmn.cpp:367
#16 0x00007ffff606ae5b in wxEntry (argc=@0x7ffff638f4b0, argv=0xc56e10) at ./src/common/init.cpp:448
#17 0x00007ffff606af31 in wxEntry (argc=@0x7fffffffe09c, argv=0x7fffffffe188) at ./src/common/init.cpp:460
#18 0x00000000005d0b02 in main (argc=1, argv=0x1) at amule-gui.cpp:93