aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3

Author Topic: aMule crash when closing search Tabs  (Read 28027 times)

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule crash when closing search Tabs
« Reply #15 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.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

legolas558

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 39
  • THX1138
    • Legolas558's lair
Re: aMule crash when closing search Tabs
« Reply #16 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
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #17 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.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #18 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 :)
Logged

cmonopoly72

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: aMule crash when closing search Tabs
« Reply #19 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!
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule crash when closing search Tabs
« Reply #20 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.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: aMule crash when closing search Tabs
« Reply #21 on: December 23, 2008, 12:48:57 PM »

Just reporting, rev.  9262 svn still randomly crashes on the last search tab closing.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: aMule crash when closing search Tabs
« Reply #22 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.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #23 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:

  • Create 3 tabs (either as searches or as categories). Then you cannot change between them using only the left button, only the 2 first changes work. You can still move with alternative left and right clicks.
  • When releasing the right button, the contextual menu doesn't disapear.

WRT to the right button, I agree, I don't see how the bug may happen when using the menu.
Logged

cmonopoly72

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: aMule crash when closing search Tabs
« Reply #24 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.
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #25 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
« Last Edit: December 23, 2008, 06:07:54 PM by btkaos »
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #26 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]
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: aMule crash when closing search Tabs
« Reply #27 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?
Logged

btkaos

  • Global Moderator
  • Sr. Member
  • *****
  • Karma: 110
  • Offline Offline
  • Posts: 486
  • Kaos is infinite!
Re: aMule crash when closing search Tabs
« Reply #28 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+.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: aMule crash when closing search Tabs
« Reply #29 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.
Logged
Pages: 1 [2] 3