aMule Forum

English => Backtraces => Topic started by: raveboy on December 09, 2008, 06:56:44 PM

Title: aMule crash when closing search Tabs
Post by: raveboy on December 09, 2008, 06:56:44 PM
Hello,

I've been troubled with a bug that seems to exist for some longer time. It is in amule-2.2.2 and also amule-SVN. How to repeate the bug:

Go to Search in top menu.
Search for "any1"
Search for "some2"
-> now you should have two tabs open named any1 and some2.
Now click on the "x" for some2
then click on the "x" for any1
--> segfault.

I have this bug on Ubuntu with 32 and 64 Bit. Please have a look at my back traces.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f9df0bae6f0 (LWP 3942)]
0x00007f9ded97136a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0x00007f9ded97136a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00007f9ded95687f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0x00007f9deccbabbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007f9decccebc8 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007f9decccff6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007f9deccd0633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007f9deda5de55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007f9ded94fb92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007f9ded950b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007f9ded5ba58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x00007f9dec415364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0x00007f9dec418675 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f9dec418995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0x00007f9ded950f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007f9def47e01d in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#15 0x00007f9def51058b in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0x00007f9deed9619c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x00000000006299b4 in main (argc=1, argv=0x7ffff8bdc208) at amule-gui.cpp:94
(gdb) bt full
#0  0x00007f9ded97136a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#1  0x00007f9ded95687f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#2  0x00007f9deccbabbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#3  0x00007f9decccebc8 in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#4  0x00007f9decccff6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#5  0x00007f9deccd0633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#6  0x00007f9deda5de55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#7  0x00007f9ded94fb92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#8  0x00007f9ded950b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#9  0x00007f9ded5ba58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#10 0x00007f9dec415364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x00007f9dec418675 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#12 0x00007f9dec418995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#13 0x00007f9ded950f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#14 0x00007f9def47e01d in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#15 0x00007f9def51058b in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#16 0x00007f9deed9619c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#17 0x00000000006299b4 in main (argc=1, argv=0x7ffff8bdc208) at amule-gui.cpp:94
No locals.
(gdb) thread apply all bt
Thread 4 (Thread 0x42703950 (LWP 3958)):
#0  0x00007f9df07aee1d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f9deedf50d9 in wxConditionInternal::WaitTimeout () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f9deedf59ae in wxSemaphoreInternal::WaitTimeout () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x0000000000751a02 in CTimerThread::Entry (this=0xf7ea00) at Timer.cpp:64
#4  0x00007f9deedf623a in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f9df07aa3f7 in start_thread () from /lib/libpthread.so.0
#6  0x00007f9dee0b5b3d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x41701950 (LWP 3952)):
#0  0x00007f9df07b1e81 in nanosleep () from /lib/libpthread.so.0
#1  0x00007f9deedfb62c in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00000000005acb1c in UploadBandwidthThrottler::Entry (this=0x403ee30)
    at UploadBandwidthThrottler.cpp:324
#3  0x00007f9deedf623a in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#4  0x00007f9df07aa3f7 in start_thread () from /lib/libpthread.so.0
#5  0x00007f9dee0b5b3d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9df0bae6f0 (LWP 3942)):
#0  0x00007f9ded97136a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00007f9ded95687f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0x00007f9deccbabbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007f9decccebc8 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007f9decccff6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007f9deccd0633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007f9deda5de55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007f9ded94fb92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007f9ded950b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007f9ded5ba58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x00007f9dec415364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0x00007f9dec418675 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f9dec418995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0x00007f9ded950f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007f9def47e01d in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#15 0x00007f9def51058b in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0x00007f9deed9619c in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x00000000006299b4 in main (argc=1, argv=0x7ffff8bdc208) at amule-gui.cpp:94
(gdb)

Thanks,
Martin
Title: Re: aMule crash when closing search Tabs
Post by: phoenix on December 10, 2008, 02:10:37 PM
I can't reproduce it like this. Does it matter the type of search?
Title: Re: aMule crash when closing search Tabs
Post by: raveboy on December 11, 2008, 02:30:35 PM
Now I've a self-compiled, new wxWidgets-2.8.9 - in comparison to the "old" with Ubuntu shipped wxWidgets-2.8.8. With the new Library, the problem has disappeared.

So how to address this issue? I think there should be some note in the Ubuntu Tracker, that there is a need for upgrading wxWidgets, since there are problems with the old library.

Martin
Title: Re: aMule crash when closing search Tabs
Post by: wuischke on December 11, 2008, 05:58:51 PM
Would you be so kind as to write this note? This would help many Ubuntu users like you. :)
Title: Re: aMule crash when closing search Tabs
Post by: raveboy on December 11, 2008, 10:33:10 PM
I will try my best. I know a lot about technology, but don't know much about the process of how to address certain topics - even in the Ubuntu community. Especially I don't like to piss of somebody ..

So update now, I have sad news. Again, after closing the last search tab, I got a Seg Fault. Here is the backtrace. I'm running: aMule-SVN-r9252-RELEASE-2_2_X on Ubuntu x64, wxWidgets-2.8.9 freshly comiled and installed.


Martin

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f2638b1c6f0 (LWP 19288)]
0x00007f26358e236a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0x00007f26358e236a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00007f26358c787f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0x00007f2634c2bbbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007f2634c3fbc8 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007f2634c40f6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007f2634c41633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007f26359cee55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007f26358c0b92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007f26358c1b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007f263552b58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x00007f2634386364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0x00007f2634389675 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f2634389995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0x00007f26358c1f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007f26374031cd in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#15 0x00007f26374869bb in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0x00007f2636d133ec in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x000000000061e7ea in main (argc=1, argv=0x7fff40b4a148) at amule-gui.cpp:95
(gdb) bt full
#0  0x00007f26358e236a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#1  0x00007f26358c787f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#2  0x00007f2634c2bbbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#3  0x00007f2634c3fbc8 in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#4  0x00007f2634c40f6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#5  0x00007f2634c41633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#6  0x00007f26359cee55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#7  0x00007f26358c0b92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#8  0x00007f26358c1b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#9  0x00007f263552b58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#10 0x00007f2634386364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x00007f2634389675 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#12 0x00007f2634389995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#13 0x00007f26358c1f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#14 0x00007f26374031cd in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No locals.
#15 0x00007f26374869bb in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No locals.
#16 0x00007f2636d133ec in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
No locals.
(gdb) thread apply all bt

Thread 4 (Thread 0x42fd6950 (LWP 19301)):
#0  0x00007f263871ce1d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f2636d74279 in wxConditionInternal::WaitTimeout () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00007f2636d74b4e in wxSemaphoreInternal::WaitTimeout () from /usr/lib/libwx_baseu-2.8.so.0
#3  0x000000000073e23e in CTimerThread::Entry (this=0xf5ac40) at Timer.cpp:64
#4  0x00007f2636d753da in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x00007f26387183f7 in start_thread () from /lib/libpthread.so.0
#6  0x00007f2636026b3d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x414b2950 (LWP 19299)):
#0  0x00007f263871fe81 in nanosleep () from /lib/libpthread.so.0
#1  0x00007f2636d7aafc in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#2  0x00000000005a38e8 in UploadBandwidthThrottler::Entry (this=0x6c6ddc0)
    at UploadBandwidthThrottler.cpp:324
#3  0x00007f2636d753da in wxThreadInternal::PthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#4  0x00007f26387183f7 in start_thread () from /lib/libpthread.so.0
#5  0x00007f2636026b3d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f2638b1c6f0 (LWP 19288)):
#0  0x00007f26358e236a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00007f26358c787f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0x00007f2634c2bbbf in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007f2634c3fbc8 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007f2634c40f6f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#5  0x00007f2634c41633 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007f26359cee55 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007f26358c0b92 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007f26358c1b35 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007f263552b58c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x00007f2634386364 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#11 0x00007f2634389675 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007f2634389995 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0x00007f26358c1f03 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007f26374031cd in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#15 0x00007f26374869bb in wxAppBase::MainLoop () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0x00007f2636d133ec in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#17 0x000000000061e7ea in main (argc=1, argv=0x7fff40b4a148) at amule-gui.cpp:95
(gdb)
Title: Re: aMule crash when closing search Tabs
Post by: cmonopoly72 on December 21, 2008, 04:55:23 PM
 This problem has always happened to me. For me, it's happened even with only one search tab. The second I click on the close button it crashes. I didn't know about posting backtraces but, now that I do, I'll run aMule/gdb and post whatever I get.

 edit: I just ran gdb/amule and had a crash upon closing a tab, should I start my own thread or post it here along with raveboy's?
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 07:57:16 PM
First time I get this, using aMule for more than a month.

Setup: Ubuntu Intrepid 8.10 (sorry for that :)), amule git from today, wxwidgets 2.8.9 (installed as a deb, but stock code)

I closed a search tab and then amule crashed. I wasn't doing anything too fancy, but I had about 40 download. It seems amule stability is inversely proportional to the number of active downloads. This points to a multithread-related bug [excuse my ignorance]

I had other kind of crashes but they dissapeared as soon as I went to the git version.

Backtrace, (bt, bt full, apply all bt, aa bt full, in two posts as it exceeds the max mess size):

Code: [Select]
(gdb) bt
#0  0xb70553e0 in gtk_notebook_button_release (widget=0xb161970,
    event=0xccb64c0) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
#1  0xb7036036 in _gtk_marshal_BOOLEAN__BOXED (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb7055390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#2  0xb6c9a3c9 in g_type_class_meta_marshal (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
#3  0xb6c9bc4b in IA__g_closure_invoke (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#4  0xb6cb1d3d in signal_emit_unlocked_R (node=0xae9cf20, detail=0,
    instance=0xb161970, emission_return=0xbff39108,
    instance_and_params=0xb47e2e00)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
#5  0xb6cb362b in IA__g_signal_emit_valist (instance=0xb161970, signal_id=31,
    detail=0,
    var_args=0xbff39160 "x\221���d�\fp\031\026\v6\026\025�p\031\026\v\020\203�\n") at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
#6  0xb6cb3c26 in IA__g_signal_emit (instance=0xb161970, signal_id=31,
---Type <return> to continue, or q <return> to quit---
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#7  0xb714b33e in gtk_widget_event_internal (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#8  0xb702eb4c in IA__gtk_propagate_event (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#9  0xb702fef7 in IA__gtk_main_do_event (event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#10 0xb6ec650a in gdk_event_dispatch (source=0x9a44b40, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#11 0xb6bfe6f8 in IA__g_main_context_dispatch (context=0x9a1ac38)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#12 0xb6c01da3 in g_main_context_iterate (context=0x9a1ac38, block=1,
    dispatch=1, self=0x9a1c200)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#13 0xb6c022c2 in IA__g_main_loop_run (loop=0xb47004a0)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#14 0xb70303a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#15 0xb77e0215 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb7876d4e in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb7876921 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75addaa in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#19 0xb75adfa7 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x082a8518 in main (argc=185980600, argv=0x5) at amule-gui.cpp:94
(gdb) bt full
#0  0xb70553e0 in gtk_notebook_button_release (widget=0xb161970,
    event=0xccb64c0) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
page = (GtkNotebookPage *) 0x0
#1  0xb7036036 in _gtk_marshal_BOOLEAN__BOXED (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb7055390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
data1 = (gpointer) 0xb161970
data2 = <value optimized out>
v_return = <value optimized out>
__PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#2  0xb6c9a3c9 in g_type_class_meta_marshal (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
callback = <value optimized out>
#3  0xb6c9bc4b in IA__g_closure_invoke (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
marshal = (GClosureMarshal) 0xb6c9a380 <g_type_class_meta_marshal>
marshal_data = (gpointer) 0xb4
__PRETTY_FUNCTION__ = "IA__g_closure_invoke"
---Type <return> to continue, or q <return> to quit---
#4  0xb6cb1d3d in signal_emit_unlocked_R (node=0xae9cf20, detail=0,
    instance=0xb161970, emission_return=0xbff39108,
    instance_and_params=0xb47e2e00)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
accumulator = (SignalAccumulator *) 0xae9cf50
emission = {next = 0x0, instance = 0xb161970, ihint = {signal_id = 31,
    detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN,
  chain_type = 185969880}
class_closure = (GClosure *) 0xae9da40
handler_list = (Handler *) 0xb1e6a00
return_accu = (GValue *) 0xbff38fd0
accu = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0,
      v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = 31
max_sequential_handler_number = 69728
return_value_altered = 1
#5  0xb6cb362b in IA__g_signal_emit_valist (instance=0xb161970, signal_id=31,
    detail=0,
    var_args=0xbff39160 "x\221���d�\fp\031\026\v6\026\025�p\031\026\v\020\203�\n") at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
return_value = {g_type = 20, data = {{v_int = 0, v_uint = 0,
---Type <return> to continue, or q <return> to quit---
      v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
      v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}}}
error = <value optimized out>
signal_return_type = 20
param_values = (GValue *) 0xb47e2e14
node = (SignalNode *) 0xae9cf20
i = 1
n_params = 1
__PRETTY_FUNCTION__ = "IA__g_signal_emit_valist"
#6  0xb6cb3c26 in IA__g_signal_emit (instance=0xb161970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
No locals.
#7  0xb714b33e in gtk_widget_event_internal (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
signal_num = <value optimized out>
return_val = 0
#8  0xb702eb4c in IA__gtk_propagate_event (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
tmp = (GtkWidget *) 0xb271b00
handled_event = 214656192
__PRETTY_FUNCTION__ = "IA__gtk_propagate_event"
---Type <return> to continue, or q <return> to quit---
#9  0xb702fef7 in IA__gtk_main_do_event (event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
event_widget = (GtkWidget *) 0xb161970
grab_widget = (GtkWidget *) 0xb161970
window_group = (GtkWindowGroup *) 0xb271b00
rewritten_event = (GdkEvent *) 0x0
tmp_list = <value optimized out>
__PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#10 0xb6ec650a in gdk_event_dispatch (source=0x9a44b40, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
display = <value optimized out>
event = <value optimized out>
#11 0xb6bfe6f8 in IA__g_main_context_dispatch (context=0x9a1ac38)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
No locals.
#12 0xb6c01da3 in g_main_context_iterate (context=0x9a1ac38, block=1,
    dispatch=1, self=0x9a1c200)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
max_priority = 0
timeout = 0
some_ready = 1
nfds = 284
allocated_nfds = <value optimized out>
---Type <return> to continue, or q <return> to quit---
fds = (GPollFD *) 0xe71ce40
__PRETTY_FUNCTION__ = "g_main_context_iterate"
#13 0xb6c022c2 in IA__g_main_loop_run (loop=0xb47004a0)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
self = (GThread *) 0x9a1c200
__PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#14 0xb70303a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
tmp_list = (GList *) 0x0
functions = (GList *) 0x0
init = (GtkInitFunction *) 0xb4700480
loop = (GMainLoop *) 0xb47004a0
#15 0xb77e0215 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#16 0xb7876d4e in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#17 0xb7876921 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#18 0xb75addaa in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#19 0xb75adfa7 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#20 0x082a8518 in main (argc=185980600, argv=0x5) at amule-gui.cpp:94
No locals.


If it's needed, I can compile wxwidgets with full debug support, but given how hard is the bug to reproduce for me I doubt the usefullness of that.

Thanks for your work! (and don't hesitate to ask me for more details)

Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 07:57:49 PM
The rest of the backtrace

Code: [Select]
(gdb) thread apply all bt

Thread 4 (Thread 0xb5050b90 (LWP 14595)):
#0  0xb8037430 in __kernel_vsyscall ()
#1  0xb7ff23a2 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb7610907 in wxConditionInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb761095f in wxCondition::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb7611fe4 in wxSemaphoreInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#5  0xb761206f in wxSemaphore::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#6  0x083e3f44 in CTimerThread::Entry (this=0xb35e3b0) at Timer.cpp:64
#7  0xb7612203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb761227d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#9  0xb7fee50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb738c7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb6052b90 (LWP 14593)):
#0  0xb8037430 in __kernel_vsyscall ()
#1  0xb7ff5906 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0xb7618578 in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb76185a1 in wxMilliSleep () from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb761075d in wxThread::Sleep () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x081fc1eb in UploadBandwidthThrottler::Entry (this=0xb1a3880)
    at UploadBandwidthThrottler.cpp:324
#6  0xb7612203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#7  0xb761227d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb7fee50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb738c7ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb686b700 (LWP 14588)):
#0  0xb70553e0 in gtk_notebook_button_release (widget=0xb161970,
    event=0xccb64c0) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
#1  0xb7036036 in _gtk_marshal_BOOLEAN__BOXED (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb7055390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#2  0xb6c9a3c9 in g_type_class_meta_marshal (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
#3  0xb6c9bc4b in IA__g_closure_invoke (closure=0xae9da40,
---Type <return> to continue, or q <return> to quit---
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#4  0xb6cb1d3d in signal_emit_unlocked_R (node=0xae9cf20, detail=0,
    instance=0xb161970, emission_return=0xbff39108,
    instance_and_params=0xb47e2e00)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
#5  0xb6cb362b in IA__g_signal_emit_valist (instance=0xb161970, signal_id=31,
    detail=0,
    var_args=0xbff39160 "x\221���d�\fp\031\026\v6\026\025�p\031\026\v\020\203�\n") at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
#6  0xb6cb3c26 in IA__g_signal_emit (instance=0xb161970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#7  0xb714b33e in gtk_widget_event_internal (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#8  0xb702eb4c in IA__gtk_propagate_event (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#9  0xb702fef7 in IA__gtk_main_do_event (event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#10 0xb6ec650a in gdk_event_dispatch (source=0x9a44b40, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#11 0xb6bfe6f8 in IA__g_main_context_dispatch (context=0x9a1ac38)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
---Type <return> to continue, or q <return> to quit---
#12 0xb6c01da3 in g_main_context_iterate (context=0x9a1ac38, block=1,
    dispatch=1, self=0x9a1c200)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#13 0xb6c022c2 in IA__g_main_loop_run (loop=0xb47004a0)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#14 0xb70303a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#15 0xb77e0215 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb7876d4e in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb7876921 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75addaa in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb75adfa7 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x082a8518 in main (argc=185980600, argv=0x5) at amule-gui.cpp:94
(gdb)
(gdb) thread apply all bt full

Thread 4 (Thread 0xb5050b90 (LWP 14595)):
#0  0xb8037430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ff23a2 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb7610907 in wxConditionInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#3  0xb761095f in wxCondition::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#4  0xb7611fe4 in wxSemaphoreInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#5  0xb761206f in wxSemaphore::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#6  0x083e3f44 in CTimerThread::Entry (this=0xb35e3b0) at Timer.cpp:64
now = 1609705760
sinceLast = 0
timeout = 100
---Type <return> to continue, or q <return> to quit---
evt = {<> = {<No data fields>}, <No data fields>}
lastEvent = 1609705760
#7  0xb7612203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#8  0xb761227d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#9  0xb7fee50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#10 0xb738c7ee in clone () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.

Thread 2 (Thread 0xb6052b90 (LWP 14593)):
#0  0xb8037430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7ff5906 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0xb7618578 in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#3  0xb76185a1 in wxMilliSleep () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#4  0xb761075d in wxThread::Sleep () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#5  0x081fc1eb in UploadBandwidthThrottler::Entry (this=0xb1a3880)
    at UploadBandwidthThrottler.cpp:324
timeSinceLastLoop = 0
minFragSize = 1300
doubleSendSize = 2600
bytesToSpend = 3456
sleepTime = 625
thisLoopTick = 1609705430
TIME_BETWEEN_UPLOAD_LOOPS = 1
lastLoopTick = 1609705430
realBytesToSpend = 3456831
allowedDataRate = 18432
rememberedSlotCounter = 4
extraSleepTime = 625
sendLock = {m_isOk = 96, m_mutex = @0xb6052310}
#6  0xb7612203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#7  0xb761227d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#8  0xb7fee50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#9  0xb738c7ee in clone () from /lib/tls/i686/cmov/libc.so.6
---Type <return> to continue, or q <return> to quit---
No symbol table info available.

Thread 1 (Thread 0xb686b700 (LWP 14588)):
#0  0xb70553e0 in gtk_notebook_button_release (widget=0xb161970,
    event=0xccb64c0) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
page = (GtkNotebookPage *) 0x0
#1  0xb7036036 in _gtk_marshal_BOOLEAN__BOXED (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb7055390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
data1 = (gpointer) 0xb161970
data2 = <value optimized out>
v_return = <value optimized out>
__PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#2  0xb6c9a3c9 in g_type_class_meta_marshal (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
callback = <value optimized out>
#3  0xb6c9bc4b in IA__g_closure_invoke (closure=0xae9da40,
    return_value=0xbff38fd0, n_param_values=2, param_values=0xb47e2e00,
    invocation_hint=0xbff38fbc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
---Type <return> to continue, or q <return> to quit---
marshal = (GClosureMarshal) 0xb6c9a380 <g_type_class_meta_marshal>
marshal_data = (gpointer) 0xb4
__PRETTY_FUNCTION__ = "IA__g_closure_invoke"
#4  0xb6cb1d3d in signal_emit_unlocked_R (node=0xae9cf20, detail=0,
    instance=0xb161970, emission_return=0xbff39108,
    instance_and_params=0xb47e2e00)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
accumulator = (SignalAccumulator *) 0xae9cf50
emission = {next = 0x0, instance = 0xb161970, ihint = {signal_id = 31,
    detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN,
  chain_type = 185969880}
class_closure = (GClosure *) 0xae9da40
handler_list = (Handler *) 0xb1e6a00
return_accu = (GValue *) 0xbff38fd0
accu = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0,
      v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = 31
max_sequential_handler_number = 69728
return_value_altered = 1
#5  0xb6cb362b in IA__g_signal_emit_valist (instance=0xb161970, signal_id=31,
    detail=0,
---Type <return> to continue, or q <return> to quit---
    var_args=0xbff39160 "x\221���d�\fp\031\026\v6\026\025�p\031\026\v\020\203�\n") at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
return_value = {g_type = 20, data = {{v_int = 0, v_uint = 0,
      v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
      v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}}}
error = <value optimized out>
signal_return_type = 20
param_values = (GValue *) 0xb47e2e14
node = (SignalNode *) 0xae9cf20
i = 1
n_params = 1
__PRETTY_FUNCTION__ = "IA__g_signal_emit_valist"
#6  0xb6cb3c26 in IA__g_signal_emit (instance=0xb161970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
No locals.
#7  0xb714b33e in gtk_widget_event_internal (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
signal_num = <value optimized out>
return_val = 0
#8  0xb702eb4c in IA__gtk_propagate_event (widget=0xb161970, event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
---Type <return> to continue, or q <return> to quit---
tmp = (GtkWidget *) 0xb271b00
handled_event = 214656192
__PRETTY_FUNCTION__ = "IA__gtk_propagate_event"
#9  0xb702fef7 in IA__gtk_main_do_event (event=0xccb64c0)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
event_widget = (GtkWidget *) 0xb161970
grab_widget = (GtkWidget *) 0xb161970
window_group = (GtkWindowGroup *) 0xb271b00
rewritten_event = (GdkEvent *) 0x0
tmp_list = <value optimized out>
__PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#10 0xb6ec650a in gdk_event_dispatch (source=0x9a44b40, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
display = <value optimized out>
event = <value optimized out>
#11 0xb6bfe6f8 in IA__g_main_context_dispatch (context=0x9a1ac38)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
No locals.
#12 0xb6c01da3 in g_main_context_iterate (context=0x9a1ac38, block=1,
    dispatch=1, self=0x9a1c200)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
max_priority = 0
timeout = 0
---Type <return> to continue, or q <return> to quit---
some_ready = 1
nfds = 284
allocated_nfds = <value optimized out>
fds = (GPollFD *) 0xe71ce40
__PRETTY_FUNCTION__ = "g_main_context_iterate"
#13 0xb6c022c2 in IA__g_main_loop_run (loop=0xb47004a0)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
self = (GThread *) 0x9a1c200
__PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#14 0xb70303a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
tmp_list = (GList *) 0x0
functions = (GList *) 0x0
init = (GtkInitFunction *) 0xb4700480
loop = (GMainLoop *) 0xb47004a0
#15 0xb77e0215 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#16 0xb7876d4e in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#17 0xb7876921 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#18 0xb75addaa in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#19 0xb75adfa7 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#20 0x082a8518 in main (argc=185980600, argv=0x5) at amule-gui.cpp:94
No locals.
Title: Re: aMule crash when closing search Tabs
Post by: cmonopoly72 on December 22, 2008, 08:44:35 PM
Well... here's mine. I use Ubuntu 8.10.
Code: [Select]
(gdb) bt
#0  0xb705c3e0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0xb703d036 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0xb6ca13c9 in ?? () from /usr/lib/libgobject-2.0.so.0
#3  0xb6ca2c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#4  0xb6cb8d3d in ?? () from /usr/lib/libgobject-2.0.so.0
#5  0xb6cba62b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#6  0xb6cbac26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0xb715233e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8  0xb7035b4c in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0xb7036ef7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb6ecd50a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0xb6c066f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0xb6c09da3 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0xb6c0a2c2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#14 0xb70373a9 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb780ee95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb78a55ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb78a51a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75dca7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb75dcc77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x08145a70 in ?? ()
#21 0xb72c8685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
---Type <return> to continue, or q <return> to quit---
#22 0x08085261 in ?? ()

(gdb) bt full
#0  0xb705c3e0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#1  0xb703d036 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#2  0xb6ca13c9 in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#3  0xb6ca2c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#4  0xb6cb8d3d in ?? () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#5  0xb6cba62b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#6  0xb6cbac26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
No symbol table info available.
#7  0xb715233e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#8  0xb7035b4c in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#9  0xb7036ef7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#10 0xb6ecd50a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#11 0xb6c066f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#12 0xb6c09da3 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#13 0xb6c0a2c2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#14 0xb70373a9 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
No symbol table info available.
#15 0xb780ee95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#16 0xb78a55ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#17 0xb78a51a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#18 0xb75dca7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#19 0xb75dcc77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#20 0x08145a70 in ?? ()
No symbol table info available.
#21 0xb72c8685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#22 0x08085261 in ?? ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.

(gdb) thread apply all bt

Thread 4 (Thread 0xb4cdab90 (LWP 6844)):
#0  0xb7f45430 in __kernel_vsyscall ()
#1  0xb7f063a2 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb763e907 in wxConditionInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb763e95f in wxCondition::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb763ffe4 in wxSemaphoreInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#5  0xb764006f in wxSemaphore::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#6  0x08221307 in ?? ()
#7  0xb7640203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb764027d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#9  0xb7f0250f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb73937ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb5cdcb90 (LWP 6842)):
#0  0xb7f45430 in __kernel_vsyscall ()
#1  0xb7f09906 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0xb7646588 in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb76465b1 in wxMilliSleep () from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb763e75d in wxThread::Sleep () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x0811d204 in ?? ()
#6  0xb7640203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#7  0xb764027d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb7f0250f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb73937ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb687b970 (LWP 6829)):
#0  0xb705c3e0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#1  0xb703d036 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#2  0xb6ca13c9 in ?? () from /usr/lib/libgobject-2.0.so.0
#3  0xb6ca2c4b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#4  0xb6cb8d3d in ?? () from /usr/lib/libgobject-2.0.so.0
#5  0xb6cba62b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#6  0xb6cbac26 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#7  0xb715233e in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8  0xb7035b4c in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#9  0xb7036ef7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb6ecd50a in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0xb6c066f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#12 0xb6c09da3 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0xb6c0a2c2 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#14 0xb70373a9 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb780ee95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb78a55ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb78a51a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75dca7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb75dcc77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x08145a70 in ?? ()
#21 0xb72c8685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#22 0x08085261 in ?? ()
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 08:56:48 PM
I have more info about this bug. See:

http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg459645.html
http://bugzilla.gnome.org/show_bug.cgi?id=477454

[Keep in mind that I'm not proficient in gtk+]

A hypothesis is the crash happens because the release_button event on the tabpage happens when the tabpage is already gone, and GTK+ doesn't guard itself against this. In temporal order (see also MuleNotebook.cpp):

 - User press down the mouse in the close button on a page (MouseClick happens)
 - DeletePage(tab) is called, and so wxNoteBook::DeletePage
 - ¿This invokes the GTK function for destroyin a page?
 - The user releases the button, action which somehow causes gtk_notebook_release_button to be called with an invalid page.
 - BOOM.

I don't know who to blame, as I'm not an expert neither in GTK+ or wxWidget. I think however the logic in MuleNotebook::MouseClick may be flawed, but an expert in the event model of both toolkits to assess this bug.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 09:00:25 PM
Well... here's mine. I use Ubuntu 8.10.

Dear cmonopoly72, this backtrace is next to useless as it lacks important debug info.

As you are using Ubuntu, could you install the following packages [you can remove them afterwards]


and try to get a new backtrace. This way I'll see if I can support my hypothesis.

Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 22, 2008, 09:33:48 PM
Interesting.

Everybody who can reproduce it please try if this patch fixes the problem.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 09:36:01 PM
I don't know who to blame, as I'm not an expert neither in GTK+ or wxWidget. I think however the logic in MuleNotebook::MouseClick may be flawed, but an expert in the event model of both toolkits to assess this bug.

After a quick look to gtk+ sourcecode, I believe the bug is in GTK+

Look a the motion_notify source:
Code: [Select]
static gint
gtk_notebook_motion_notify (GtkWidget      *widget,
   GdkEventMotion *event)
{
  GtkNotebook *notebook = GTK_NOTEBOOK (widget);
  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
  GtkNotebookPage *page;
  // btkaos ....

  page = notebook->cur_page;

  if (!page)
    return FALSE;

So the code in motion_notify assumes cur_page may be null, whereas the code in button_release not:

Code: [Select]
static gint
gtk_notebook_button_release (GtkWidget      *widget,
    GdkEventButton *event)
{
  GtkNotebook *notebook;
  GtkNotebookPrivate *priv;
  GtkNotebookPage *page;

  if (event->type != GDK_BUTTON_RELEASE)
    return FALSE;

  notebook = GTK_NOTEBOOK (widget);
  priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
  page = notebook->cur_page;

  if (!priv->during_detach &&
      page->reorderable &&      // btkaos: BOOM!!!!
      event->button == priv->pressed_button)

The patch I propose is:

Code: [Select]
--- gtk/gtknotebook.c.old 2008-12-22 21:26:31.000000000 +0100
+++ gtk/gtknotebook.c 2008-12-22 21:26:23.000000000 +0100
@@ -2822,6 +2822,9 @@
   priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
   page = notebook->cur_page;
 
+  if (!page)
+    return FALSE;
+
   if (!priv->during_detach &&
       page->reorderable &&
       event->button == priv->pressed_button)

[update: STU Redman added an aMule patch. Try it first]

Can any of you guys patch gtk+ and see if the crash is gone? I cannot reproduce it.

To patch this issue in Ubuntu 8.10, save the patch to a file (let's say amule-gtk.patch) and do
Code: [Select]
$ apt-get source libgtk2.0-0
$ cd gtk+2.0-2.14.4
$ cat ../amule-gtk.patch | patch -p0
$ sudo apt-get build-dep libgtk2.0-0
$ debuild
$ cd ..
$ sudo dpkg -i libgtk2.0-0*deb
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 22, 2008, 09:51:13 PM
Let's first try the aMule patch above. Even if the GTK patch works out it will take a while until it's in all distros.  ;)
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 22, 2008, 11:32:38 PM
Let's first try the aMule patch above. Even if the GTK patch works out it will take a while until it's in all distros.  ;)

I've tried and both patches seem to solve the issue for me (I finally managed to reproduce the bug, it involves some tricky timing) Other users please confirm.

However the aMule patch shows the expeted effect wrt to the right button menu. Fixing this in aMule will depends on whether we can ask if currpage is alive and block page deletion until the release event has been received by the widget. I think this level of sync is not possible, so the fix must be in GTK+

This seems like a really complicate bug involving gtk and wxwidgets event queue. After some inspection I can imagine what is going on but I'm not sure. What I'm 99% sure is that the GTK+ patch should be applied.

Someone with an account in buzgilla.gnome.org should push for it.


Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 22, 2008, 11:57:29 PM
However the aMule patch shows the expeted effect wrt to the right button menu. Fixing this in aMule will depends on whether we can ask if currpage is alive and block page deletion until the release event has been received by the widget. I think this level of sync is not possible, so the fix must be in GTK+
Sorry, don't get you. Please explain.
The aMule patch simply swallows up the offending (and unnecessary) mouse-button-release events. Why should this not work ?

Of course GTK should be fixed, but that's a different project.
Title: Re: aMule crash when closing search Tabs
Post by: legolas558 on December 23, 2008, 12:06:57 AM
Interesting.

Everybody who can reproduce it please try if this patch fixes the problem.

Unfortunately I no more have gentoo, I have ubuntu 8.10.

I get this:
Code: [Select]
configure: error: zlib >= 1.1.4 is required for aMule

I will now try the GTK+ patch
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 12:16:29 AM
However the aMule patch shows the expeted effect wrt to the right button menu. Fixing this in aMule will depends on whether we can ask if currpage is alive and block page deletion until the release event has been received by the widget. I think this level of sync is not possible, so the fix must be in GTK+
Sorry, don't get you. Please explain.

The aMule patch simply swallows up the offending (and unnecessary) mouse-button-release events. Why should this not work ?

Of course GTK should be fixed, but that's a different project.

Sorry STU Redman my explanation was confusing indeed.

What I mean is ignoring the button-release events is wrong in this case (the notebook doesn't really work as expected, try it yourself)
So your patch cannot go as is to aMule.

Then I wonder if we could write a button release handler in aMule which fixes the bug. In order to fix the bug in aMule, the handler would look like [in pseudo-code]

Code: [Select]
MuleNoteBook::MouseRelease(wxMouseEvent &event) {
   // the check could race with a delete
   forbidPageDeletion();

   if (!this->curTab)
      return FALSE;
  
   // Ok we are safe, call the parent's handler
   wxNoteBook:MouseRelease(event);
   enablePageDeletion();
}

I don't believe an implementation of forbidPageDeletion() is possible without messing with both event queues of GTK+ and wxWidgets in a non-trivial way. (You should delete pending events, etc...)

Anyways, in my humble opinion the bug is in GTK+, so we can use whatever workaround we'd like in amule but the bug will bite again. In case of looking for a quick workaround doing it directly in WX may bring us better luck.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 12:26:18 AM

Unfortunately I no more have gentoo, I have ubuntu 8.10.

I get this:
Code: [Select]
configure: error: zlib >= 1.1.4 is required for aMule

I will now try the GTK+ patch
Hi legolas, thank you for trying out the patches.

I suggest you use the latest svn version of aMule, as the last 2.2.2 version was crashing a lot for me, I upgraded to svn 9266 and everything is fine. IMHO compiling wxwidget is a waste of time, but be warned that aMule developers do not support Ubuntu WX.

Ubuntu WX 2.8.8/9 is almost stock and only has 5 trivial patches. To be fair, I upgraded my WX and no crash did disappear. However upgrading to amule svn (and disabling optimizations) was a big stability win.

To solve your zlib problem you can run

$ apt-get build-dep amule

This will install the necessary packages for compiling amule. I recommend to use GNU stow in order to cleanly install and test different versions.

As an alternative you can follow the directions in http://www.amule.org/wiki/index.php/HowTo_Compile_In_Debian#What_developement_packages_do_I_need_for_compiling.3F

If you want to try out the GTK+ patch it is really wonderful. However be advised that compiling GTK+ takes a long time and I'd say it's kinda advanced stuff to do :)
Title: Re: aMule crash when closing search Tabs
Post by: cmonopoly72 on December 23, 2008, 05:42:06 AM
Thanks btkaos. I'm installing those libs now to get  better output from dbg. I'm also applying your patch right now. I'll let you know how it goes. Thanks to both btkaos and Stu Redman for the quick action. That's amazing. I wish I had taken computer programming way back when!
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 23, 2008, 12:00:23 PM
What I mean is ignoring the button-release events is wrong in this case (the notebook doesn't really work as expected, try it yourself)
I tried it right now and noticed no difference (except for the missing crash, haha). How exactly is the notebook misbehaving for you ? The right-click context menu stayed visible after releasing the right button before too.
I don't know if catching the right-up event is necessary at all since nobody bothered telling if the app crashed on closing the tab clicking the 'x' or using the context menu.

@legolas: if you have more compilation problems please post them in the "compilation problems" board, not here.
Title: Re: aMule crash when closing search Tabs
Post by: phoenix on December 23, 2008, 12:48:57 PM
Just reporting, rev.  9262 svn still randomly crashes on the last search tab closing.
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 23, 2008, 02:39:48 PM
So please try the patch (which is not yet commited) and see if it fixes the problem for you.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 03:24:30 PM
What I mean is ignoring the button-release events is wrong in this case (the notebook doesn't really work as expected, try it yourself)
I tried it right now and noticed no difference (except for the missing crash, haha). How exactly is the notebook misbehaving for you ? The right-click context menu stayed visible after releasing the right button before too.
I don't know if catching the right-up event is necessary at all since nobody bothered telling if the app crashed on closing the tab clicking the 'x' or using the context menu.

AFAIK the release event is necessary for drag&drop and reordering matters. It misbehaves in the following way:


WRT to the right button, I agree, I don't see how the bug may happen when using the menu.
Title: Re: aMule crash when closing search Tabs
Post by: cmonopoly72 on December 23, 2008, 03:32:38 PM
 I tried your patch btkaos but, it still crashes on closing tabs. I'm not that good at Ubuntu source building so I may have messed up the process somewhere. Here's the output from dbg:

Code: [Select]
(gdb) bt
#0  0xb703a3e0 in gtk_notebook_button_release (widget=0x9439970,
    event=0x8e8cb30) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
#1  0xb701b036 in _gtk_marshal_BOOLEAN__BOXED (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb703a390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#2  0xb6c7f3c9 in g_type_class_meta_marshal (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
#3  0xb6c80c4b in IA__g_closure_invoke (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#4  0xb6c96d3d in signal_emit_unlocked_R (node=0x91626c8, detail=0,
    instance=0x9439970, emission_return=0xbfa25408,
    instance_and_params=0x936be50)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
#5  0xb6c9862b in IA__g_signal_emit_valist (instance=0x9439970, signal_id=31,
    detail=0, var_args=0xbfa25460 "xT��0��\bp\231C\t6f\023�p\231C\t��\025\t")
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
#6  0xb6c98c26 in IA__g_signal_emit (instance=0x9439970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
---Type <return> to continue, or q <return> to quit---
#7  0xb713033e in gtk_widget_event_internal (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#8  0xb7013b4c in IA__gtk_propagate_event (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#9  0xb7014ef7 in IA__gtk_main_do_event (event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#10 0xb6eab50a in gdk_event_dispatch (source=0x8e95580, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#11 0xb6be46f8 in IA__g_main_context_dispatch (context=0x8e6f348)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#12 0xb6be7da3 in g_main_context_iterate (context=0x8e6f348, block=1,
    dispatch=1, self=0x8e70848)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#13 0xb6be82c2 in IA__g_main_loop_run (loop=0x8edd8e8)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#14 0xb70153a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#15 0xb77ece95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb78835ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb78831a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75baa7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb75bac77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
---Type <return> to continue, or q <return> to quit---
#20 0x08145a70 in ?? ()
#21 0xb72a6685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#22 0x08085261 in ?? ()
(gdb) bt full
#0  0xb703a3e0 in gtk_notebook_button_release (widget=0x9439970,
    event=0x8e8cb30) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
page = (GtkNotebookPage *) 0x0
#1  0xb701b036 in _gtk_marshal_BOOLEAN__BOXED (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb703a390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
data1 = (gpointer) 0x9439970
data2 = <value optimized out>
v_return = <value optimized out>
__PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#2  0xb6c7f3c9 in g_type_class_meta_marshal (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
callback = <value optimized out>
#3  0xb6c80c4b in IA__g_closure_invoke (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
marshal = (GClosureMarshal) 0xb6c7f380 <g_type_class_meta_marshal>
marshal_data = (gpointer) 0xb4
__PRETTY_FUNCTION__ = "IA__g_closure_invoke"
---Type <return> to continue, or q <return> to quit---
#4  0xb6c96d3d in signal_emit_unlocked_R (node=0x91626c8, detail=0,
    instance=0x9439970, emission_return=0xbfa25408,
    instance_and_params=0x936be50)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
accumulator = (SignalAccumulator *) 0x91627a0
emission = {next = 0x0, instance = 0x9439970, ihint = {signal_id = 31,
    detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN,
  chain_type = 154505320}
class_closure = (GClosure *) 0x9162690
handler_list = (Handler *) 0x94cf300
return_accu = (GValue *) 0xbfa252d0
accu = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0,
      v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
signal_id = 31
max_sequential_handler_number = 9123
return_value_altered = 1
#5  0xb6c9862b in IA__g_signal_emit_valist (instance=0x9439970, signal_id=31,
    detail=0, var_args=0xbfa25460 "xT��0��\bp\231C\t6f\023�p\231C\t��\025\t")
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
return_value = {g_type = 20, data = {{v_int = 0, v_uint = 0,
      v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0,
---Type <return> to continue, or q <return> to quit---
      v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0,
      v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0,
      v_pointer = 0x0}}}
error = <value optimized out>
signal_return_type = 20
param_values = (GValue *) 0x936be64
node = (SignalNode *) 0x91626c8
i = 1
n_params = 1
__PRETTY_FUNCTION__ = "IA__g_signal_emit_valist"
#6  0xb6c98c26 in IA__g_signal_emit (instance=0x9439970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
No locals.
#7  0xb713033e in gtk_widget_event_internal (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
signal_num = <value optimized out>
return_val = 0
#8  0xb7013b4c in IA__gtk_propagate_event (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
tmp = (GtkWidget *) 0x954cfa0
handled_event = 149474096
__PRETTY_FUNCTION__ = "IA__gtk_propagate_event"
#9  0xb7014ef7 in IA__gtk_main_do_event (event=0x8e8cb30)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
event_widget = (GtkWidget *) 0x9439970
grab_widget = (GtkWidget *) 0x9439970
window_group = (GtkWindowGroup *) 0x954cfa0
rewritten_event = (GdkEvent *) 0x0
tmp_list = <value optimized out>
__PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#10 0xb6eab50a in gdk_event_dispatch (source=0x8e95580, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
display = <value optimized out>
event = <value optimized out>
#11 0xb6be46f8 in IA__g_main_context_dispatch (context=0x8e6f348)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
No locals.
#12 0xb6be7da3 in g_main_context_iterate (context=0x8e6f348, block=1,
    dispatch=1, self=0x8e70848)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
max_priority = 0
timeout = 0
some_ready = 1
nfds = 9
allocated_nfds = <value optimized out>
fds = (GPollFD *) 0x96f8ec0
---Type <return> to continue, or q <return> to quit---
__PRETTY_FUNCTION__ = "g_main_context_iterate"
#13 0xb6be82c2 in IA__g_main_loop_run (loop=0x8edd8e8)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
self = (GThread *) 0x8e70848
__PRETTY_FUNCTION__ = "IA__g_main_loop_run"
#14 0xb70153a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
tmp_list = (GList *) 0x0
functions = (GList *) 0x0
init = (GtkInitFunction *) 0x9582eb8
loop = (GMainLoop *) 0x8edd8e8
#15 0xb77ece95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#16 0xb78835ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#17 0xb78831a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
No symbol table info available.
#18 0xb75baa7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#19 0xb75bac77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#20 0x08145a70 in ?? ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#21 0xb72a6685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#22 0x08085261 in ?? ()
No symbol table info available.
(gdb) thread apply all bt

Thread 4 (Thread 0xb4e50b90 (LWP 6122)):
#0  0xb7f26430 in __kernel_vsyscall ()
#1  0xb7ee43a2 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb761c907 in wxConditionInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb761c95f in wxCondition::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb761dfe4 in wxSemaphoreInternal::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#5  0xb761e06f in wxSemaphore::WaitTimeout ()
   from /usr/lib/libwx_baseu-2.8.so.0
#6  0x08221307 in ?? ()
#7  0xb761e203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb761e27d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#9  0xb7ee050f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#10 0xb73717ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb5e52b90 (LWP 6120)):
#0  0xb7f26430 in __kernel_vsyscall ()
#1  0xb7ee7906 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0xb7624588 in wxMicroSleep () from /usr/lib/libwx_baseu-2.8.so.0
#3  0xb76245b1 in wxMilliSleep () from /usr/lib/libwx_baseu-2.8.so.0
#4  0xb761c75d in wxThread::Sleep () from /usr/lib/libwx_baseu-2.8.so.0
#5  0x0811d204 in ?? ()
#6  0xb761e203 in wxThreadInternal::PthreadStart ()
   from /usr/lib/libwx_baseu-2.8.so.0
#7  0xb761e27d in wxPthreadStart () from /usr/lib/libwx_baseu-2.8.so.0
#8  0xb7ee050f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb73717ee in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb6859970 (LWP 6107)):
#0  0xb703a3e0 in gtk_notebook_button_release (widget=0x9439970,
    event=0x8e8cb30) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
#1  0xb701b036 in _gtk_marshal_BOOLEAN__BOXED (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb703a390)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmarshalers.c:84
#2  0xb6c7f3c9 in g_type_class_meta_marshal (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
    invocation_hint=0xbfa252bc, marshal_data=0xb4)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:878
#3  0xb6c80c4b in IA__g_closure_invoke (closure=0x9162690,
    return_value=0xbfa252d0, n_param_values=2, param_values=0x936be50,
---Type <return> to continue, or q <return> to quit---
    invocation_hint=0xbfa252bc)
    at /build/buildd/glib2.0-2.18.2/gobject/gclosure.c:767
#4  0xb6c96d3d in signal_emit_unlocked_R (node=0x91626c8, detail=0,
    instance=0x9439970, emission_return=0xbfa25408,
    instance_and_params=0x936be50)
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3282
#5  0xb6c9862b in IA__g_signal_emit_valist (instance=0x9439970, signal_id=31,
    detail=0, var_args=0xbfa25460 "xT��0��\bp\231C\t6f\023�p\231C\t��\025\t")
    at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2987
#6  0xb6c98c26 in IA__g_signal_emit (instance=0x9439970, signal_id=31,
    detail=0) at /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:3034
#7  0xb713033e in gtk_widget_event_internal (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:4745
#8  0xb7013b4c in IA__gtk_propagate_event (widget=0x9439970, event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:2391
#9  0xb7014ef7 in IA__gtk_main_do_event (event=0x8e8cb30)
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1596
#10 0xb6eab50a in gdk_event_dispatch (source=0x8e95580, callback=0,
    user_data=0x0) at /build/buildd/gtk+2.0-2.14.4/gdk/x11/gdkevents-x11.c:2365
#11 0xb6be46f8 in IA__g_main_context_dispatch (context=0x8e6f348)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#12 0xb6be7da3 in g_main_context_iterate (context=0x8e6f348, block=1,
    dispatch=1, self=0x8e70848)
---Type <return> to continue, or q <return> to quit---
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#13 0xb6be82c2 in IA__g_main_loop_run (loop=0x8edd8e8)
    at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2986
#14 0xb70153a9 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.14.4/gtk/gtkmain.c:1200
#15 0xb77ece95 in wxEventLoop::Run () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#16 0xb78835ce in wxAppBase::MainLoop ()
   from /usr/lib/libwx_gtk2u_core-2.8.so.0
#17 0xb78831a1 in wxAppBase::OnRun () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#18 0xb75baa7a in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#19 0xb75bac77 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
#20 0x08145a70 in ?? ()
#21 0xb72a6685 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#22 0x08085261 in ?? ()

I'll see if I can manage Stu's amule patch.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 05:52:53 PM
I tried your patch btkaos but, it still crashes on closing tabs. I'm not that good at Ubuntu source building so I may have messed up the process somewhere. Here's the output from dbg:

Code: [Select]
(gdb) bt full
#0  0xb703a3e0 in gtk_notebook_button_release (widget=0x9439970,
    event=0x8e8cb30) at /build/buildd/gtk+2.0-2.14.4/gtk/gtknotebook.c:2825
page = (GtkNotebookPage *) 0x0

This means you are using the unpatched library.

Did you install the new debs? I didn't realize this way of building packages, whenever you run system update the old gtk library will overwrite the new one. I did upload a fixed binary library at http://www.2shared.com/file/4508245/5d5c478d/libgtk20-0_2144-0ubuntu1_i386.html . Download it and install it with dpkg -i $file

Be careful, because as soon as you install the library Ubuntu will complain and tell you a new update for gtk is available. If you apply this update you will install the unpatched library again.
[As it is a binary, install at your own risk, it could eat you kitten]

As an alternative, this is a better patch which creates a new version for the package:
Code: [Select]
diff -ur gtk+2.0-2.14.4/debian/changelog gtk+2.0-2.14.4.bk/debian/changelog
--- gtk+2.0-2.14.4/debian/changelog 2008-12-23 17:47:48.000000000 +0100
+++ gtk+2.0-2.14.4.bk/debian/changelog 2008-12-23 17:51:43.000000000 +0100
@@ -1,3 +1,10 @@
+gtk+2.0 (2.14.4-0ubuntu1.bk0) unstable; urgency=low
+
+  * gtknotebook.c:
+    - gtk_notebook_button_release: Don't access null page.
+
+ -- BTKaos <ateimporta@gmail.com>  Tue, 23 Dec 2008 17:50:39 +0100
+
 gtk+2.0 (2.14.4-0ubuntu1) intrepid; urgency=low
 
   * New upstream version:
diff -ur gtk+2.0-2.14.4/gtk/gtknotebook.c gtk+2.0-2.14.4.bk/gtk/gtknotebook.c
--- gtk+2.0-2.14.4/gtk/gtknotebook.c 2008-12-23 17:49:57.000000000 +0100
+++ gtk+2.0-2.14.4.bk/gtk/gtknotebook.c 2008-12-22 21:26:23.000000000 +0100
@@ -2822,6 +2822,9 @@
   priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
   page = notebook->cur_page;
 
+  if (!page)
+    return FALSE;
+
   if (!priv->during_detach &&
       page->reorderable &&
       event->button == priv->pressed_button)

Apply as usual:
Code: [Select]
$ apt-get source libgtk2.0-0
$ cd gtk-2.0-2.14.4
$ patch -p1 < gkt-patch.diff
$ apt-get build-dep libgtk2.0-0
$ debuild
$ cd ..
$ dpkg -i libgtk2.0-0_2.14.4-0ubuntu1.bk0_i386.deb
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 06:38:53 PM
Code: [Select]
$ dpkg -i libgtk2.0-0_2.14.4-0ubuntu1.bk0_i386.deb
I built a package with the previous patch, get it here
http://www.2shared.com/file/4508503/d51c3139/libgtk20-0_2144-0ubuntu1bk0_i386.html

[As any binary, install it at your own risk]
Title: Re: aMule crash when closing search Tabs
Post by: phoenix on December 23, 2008, 07:19:42 PM
So please try the patch (which is not yet commited) and see if it fixes the problem for you.
The problem here is ramdom and with low probability of happenning, to the point I though it was already fixed.

I don't like the patch, can you explain how does it work to solve the issue? Btw, can you explain what the issue is?
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 07:37:27 PM
I don't like the patch, can you explain how does it work to solve the issue? Btw, can you explain what the issue is?
I think all the needed info is in the thread. Basically a button_release event arrives with an empty notebook and GTK+ crashes.

The bug is in GTK+, STU Redman's patch is only a workaround (which breaks other things btw). I'm afraid we need to fix this directly in GTK+.
Title: Re: aMule crash when closing search Tabs
Post by: phoenix on December 23, 2008, 09:31:34 PM
btkaos, I see, but I was refering to the patch, not to the thread. For a patch fixing such a serious issue, it is very, lets say, economic.

Is it possible to test for an empty notebook in the event handler and only ignore it in this case? That would probably not break the behaviour.

I think that the solution is acceptable, but not the way it is posted. It must be well documented in the patch. Also, beeing a GTK+ only problem means it should be properly #ifdef'd to this platform, because if it breaks functionality, we do not want it to happen on Mac for example. And please, if someone pushes the fix to GTK+, do get in touch with us when it gets accepted, so that we can add the proper build dependency on the GTK+ version.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 23, 2008, 10:35:56 PM
btkaos, I see, but I was refering to the patch, not to the thread. For a patch fixing such a serious issue, it is very, lets say, economic.
Ok, sorry for the confusion.

Quote
Is it possible to test for an empty notebook in the event handler and only ignore it in this case? That would probably not break the behaviour.

I think this is not possible to do in a safe way, given that we have two (implicit) event queues. It could well happen that you do the test and the page is alive, but the delete event is in the queue waiting for delivery.

Quote
I think that the solution is acceptable, but not the way it is posted. It must be well documented in the patch. Also, beeing a GTK+ only problem means it should be properly #ifdef'd to this platform, because if it breaks functionality, we do not want it to happen on Mac for example. And please, if someone pushes the fix to GTK+, do get in touch with us when it gets accepted, so that we can add the proper build dependency on the GTK+ version.
I think fixing this properly in aMule is futile, let's hope the GTK+ people react.
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 23, 2008, 11:48:51 PM
For a patch fixing such a serious issue, it is very, lets say, economic.
Many serious problems can be fixed with very economic patches.  :D
Seriously, this was just an idea I wanted to try: if GTK crashes on the mouse-up event following the deletion of the page, well, then just catch it in the app and don't send it on. And it appears to work out. I can easily fine-tune it a bit so that the resulting notebook problems vanish. (And add the ifdef). After Christmas.  ;)

I think this is not possible to do in a safe way, given that we have two (implicit) event queues. It could well happen that you do the test and the page is alive, but the delete event is in the queue waiting for delivery.
I see no problem there. We have a trigger right before the page gets deleted. Just swallow up the next mouse-up within a short time period, and we should be save.

  • When releasing the right button, the contextual menu doesn't disapear.
That's so without the patch too. (Ubuntu Intrepid.)

Btw: can you descripe the click-timing required to crash it ? I'd like to see it myself for once.

Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 24, 2008, 12:37:54 AM
Here's the slightly more sophisticated version of the patch, please test. Should filter only the events that could choke GTK.
Did anybody ever get a crash on closing a tab through the context menu?
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 24, 2008, 01:52:12 AM
Here's the slightly more sophisticated version of the patch, please test. Should filter only the events that could choke GTK.
Did anybody ever get a crash on closing a tab through the context menu?
Thanks a lot STU Redman, this patch looks much better (as ugly as the workaround is). Let me think about it and test it, there come busy days so please be patient.

I'd really like more testers to be sure this is the cause. Both previous patches fix the bug for me and for Luca. legolas, did you make any progress? There are more people in the Ubuntu bug-tracker (https://bugs.launchpad.net/ubuntu/+source/amule/+bug/59138) who can reproduce it, let's see if someone tries the patch.

To reproduce the bug: First make aMule work a lot. This ideally involves having 40+ downloads with a non-optimized build.
Then open at least 3 or 4 tabs in search, and start closing them quickly using the 'x' button. Always close the leftmost tab, until there's none. Try until you crash aMule. This works for me about 33% of times.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 24, 2008, 11:20:48 AM
My 10 cents: I've tried Stu's patch (the first one) and the workaround works on Fedora 10 too. No time to test for side-effects so far.
Glad to hear so. I'll try to get GTK+ fixed upstream.

Meanwhile if a workaround in aMule is convenient, great, I'll inform you guys when GTK+ is patched.
Title: Re: aMule crash when closing search Tabs
Post by: GonoszTopi on December 24, 2008, 11:15:38 PM
I'd much more like to close the notebook tab on the mouse_release event, which would only involve changing the binding of the event handler from EVT_LEFT_DOWN to EVT_LEFT_UP (only for the close event generator, otherwise process EVT_LEFT_DOWN as normal).
Title: Re: aMule crash when closing search Tabs
Post by: GonoszTopi on December 25, 2008, 08:08:21 PM
Ok, I created the patch to accomplish the task mentioned in my previous post. Unfortunately I cannot reproduce the crash so would you be as kind as to test it?
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 25, 2008, 08:34:41 PM
That's of course the best solution.  :)
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 25, 2008, 10:09:24 PM
When I add a little CPU stress I can easily reproduce it (crashing on last close):
Code: [Select]
if ((tab != -1) &&  (flags == wxNB_HITTEST_ONICON)) {
// User did click on a 'x'
DeletePage(tab);
for (double f = 0.0; f < 1.0; f += 0.00000001);
} else {
// Is not a 'x'. Send this event up.
event.Skip();
}
With GonoszTopi's patch it's fine.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 26, 2008, 02:56:25 AM
I'd much more like to close the notebook tab on the mouse_release event, which would only involve changing the binding of the event handler from EVT_LEFT_DOWN to EVT_LEFT_UP (only for the close event generator, otherwise process EVT_LEFT_DOWN as normal).

Yes I was trying to figure out why aMule is the only app bitten by this GTK+ bug, and the reason is every other app closes a page when going up.

So if we change MuleNotebook behaviour the problem hopefully solved without having to wait for the GTK+ guys.

Edit Stu: fixed broken quote
Title: Re: aMule crash when closing search Tabs
Post by: GonoszTopi on December 26, 2008, 04:10:37 PM
Yes I was trying to figure out why aMule is the only app bitten by this GTK+ bug, and the reason is every other app closes a page when going up.

The "standard" behaviour for close buttons requires that both the click and the release event happens on the same close button. The patch only checks that a left-release event happens on the 'x', but I think it's enough if it works around the bug in GTK.
Title: Re: aMule crash when closing search Tabs
Post by: btkaos on December 27, 2008, 05:56:18 AM
The "standard" behaviour for close buttons requires that both the click and the release event happens on the same close button. The patch only checks that a left-release event happens on the 'x', but I think it's enough if it works around the bug in GTK.
Well, this behavior allows the user to think twice and cancel the closing by moving the pointer away of the x while the button is pressed. Certainly, checking that the pointer is on the x when button release happens will make MuleNotebook more conformant with what seems to be standart GTK+ behavior.

However, I don't know what is expected in other toolkits.
Title: Re: aMule crash when closing search Tabs
Post by: phoenix on December 31, 2008, 11:03:29 AM
For the record, it also sometimes crashes when you close the last notepad in the chat window.
Title: Re: aMule crash when closing search Tabs
Post by: Stu Redman on December 31, 2008, 01:30:33 PM
With SVN >= 9293 ?