Bug#404241: qalculate-gtk bug: segfault when pressing Arrow-Down twice
hoi :-) On Wed, Jan 17, 2007 at 08:57:43PM +0100, Niklas Knutsson wrote: I have now come up with a better solution. I have attached a patch. thank you for your fast response. I will test it as soon as possible. -- Martin Waitz signature.asc Description: Digital signature
Bug#404241: qalculate-gtk bug: segfault when pressing Arrow-Down twice
I have now come up with a better solution. I have attached a patch. --- src/callbacks.cc 2006-11-02 10:16:50.0 +0100 +++ src/callbacks.cc 2007-01-17 20:47:00.0 +0100 @@ -12890,12 +12890,11 @@ void on_unknown_edit_optionmenu_sign_cha } } -gboolean on_key_press_event(GtkWidget*, GdkEventKey *event, gpointer) { +gboolean on_key_press_event(GtkWidget *o, GdkEventKey *event, gpointer) { if(!GTK_WIDGET_HAS_FOCUS(expression) (event-keyval GDK_Hyper_R || event-keyval GDK_Shift_L)) { - bool return_val = FALSE; GtkWidget *w = gtk_window_get_focus(GTK_WINDOW(glade_xml_get_widget (main_glade, main_window))); - if(w) g_signal_emit_by_name((gpointer) w, key_press_event, event, return_val); - if(return_val) return TRUE; + if(gtk_bindings_activate_event(GTK_OBJECT(o), event)) return TRUE; + if(w gtk_bindings_activate_event(GTK_OBJECT(w), event)) return TRUE; focus_keeping_selection(); } return FALSE;
Bug#404241: qalculate-gtk bug: segfault when pressing Arrow-Down twice
Hi. I thought that I was not able to reproduce this bug, but discovered that it only occurs when qalculate-gtk is compiled with optimizations. qalculate-gtk does not only segfault when pressing Down twice, but whenever the expression entry has lost focus and tries to take it back when some interesting key has been pressed. I have yet to find a good solution. For now the alternatives are to compile qalculate-gtk without optimizations or comment out lines 12894-12900 in src/callbacks.cc (responsible for reclaiming expression entry focus). On Sunday 7 January 2007 22:41, Martin Waitz wrote: hoi :) The debian Bug Tracking System has a report on a segfault in qalculate-gtk: http://bugs.debian.org/404241 It got reported agains 0.9.4 but also affects 0.9.5. It is quite easy to reproduce: start qalculate-gtk and hit Arrow-Down two times. (gdb) bt #0 0x41c7 in ?? () #1 0xb7d5325f in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #2 0xb761698b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #3 0xb7626f2d in g_signal_chain_from_overridden () from /usr/lib/libgobject-2.0.so.0 #4 0xb7628208 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #5 0xb76285d9 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #6 0xb7e3ce84 in gtk_widget_get_default_style () from /usr/lib/libgtk-x11-2.0.so.0 #7 0xb7d4cc0a in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #8 0xb7d4de07 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #9 0xb7be5eea in _gdk_events_init () from /usr/lib/libgdk-x11-2.0.so.0 #10 0xb733ab21 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #11 0xb733db96 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #12 0xb733df57 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #13 0xb7d4e281 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #14 0x080664d3 in main (argc=Cannot access memory at address 0xa ) at main.cc:293 the 0xb7d5325f inside _gtk_marshal_BOOLEAN__BOXED is the return address after a call to g_value_set_boolean which then seems to wrack havoc. But unfortunately I don't know how to debug this thing deeper to find the corrupt signal that gets emitted. Can you help? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#404241: qalculate-gtk bug: segfault when pressing Arrow-Down twice
hoi :) The debian Bug Tracking System has a report on a segfault in qalculate-gtk: http://bugs.debian.org/404241 It got reported agains 0.9.4 but also affects 0.9.5. It is quite easy to reproduce: start qalculate-gtk and hit Arrow-Down two times. (gdb) bt #0 0x41c7 in ?? () #1 0xb7d5325f in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #2 0xb761698b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #3 0xb7626f2d in g_signal_chain_from_overridden () from /usr/lib/libgobject-2.0.so.0 #4 0xb7628208 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #5 0xb76285d9 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #6 0xb7e3ce84 in gtk_widget_get_default_style () from /usr/lib/libgtk-x11-2.0.so.0 #7 0xb7d4cc0a in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #8 0xb7d4de07 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #9 0xb7be5eea in _gdk_events_init () from /usr/lib/libgdk-x11-2.0.so.0 #10 0xb733ab21 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #11 0xb733db96 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 #12 0xb733df57 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #13 0xb7d4e281 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #14 0x080664d3 in main (argc=Cannot access memory at address 0xa ) at main.cc:293 the 0xb7d5325f inside _gtk_marshal_BOOLEAN__BOXED is the return address after a call to g_value_set_boolean which then seems to wrack havoc. But unfortunately I don't know how to debug this thing deeper to find the corrupt signal that gets emitted. Can you help? -- Martin Waitz signature.asc Description: Digital signature