After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165363 - Crash segfault SIGSEGV when moving the last element from the lower toolbar to the upper toolbar
Crash segfault SIGSEGV when moving the last element from the lower toolbar to...
Status: RESOLVED WONTFIX
Product: galeon
Classification: Deprecated
Component: User interface
1.3.19
Other Linux
: Normal minor
: 1.3.20
Assigned To: galeon-maint
galeon-maint
Depends on:
Blocks:
 
 
Reported: 2005-01-26 23:35 UTC by Loïc Minier
Modified: 2011-02-14 13:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace (68.68 KB, text/plain)
2005-01-26 23:40 UTC, Loïc Minier
Details

Description Loïc Minier 2005-01-26 23:35:48 UTC
Hi,
Francesco Potorti` reported Debian bug <http://bugs.debian.org/286647> where he
explains that dragging the latest item from the Galeon toolbar hosting the URL
bar into the upper toolbar crashes Galeon.

Once Debian's glib-dbg package fixed, he got a long stack trace which I thought
would end up in glib, but ends in egg_editable_toolbar_get_type ().

I think egg_editable_toolbar_get_type is in a Galeon specific widget, and I'll
ask the submitter to rebuild Galeon with debugging symbols, do you have any idea
of where this bug could come from?  I can't reproduce it.  :(
Comment 1 Loïc Minier 2005-01-26 23:40:57 UTC
Created attachment 36577 [details]
Backtrace

The submitter gets the following warning:
(galeon:3765): Gtk-CRITICAL **: file gtkcontainer.c: line 1285
(gtk_container_foreach): assertion `GTK_IS_CONTAINER (container)' failed

and the attched backtrace.
Comment 2 Loïc Minier 2005-02-01 09:34:06 UTC
Here's a new backtrace, full of debugging symbols.

Sadly, I noticed that the debugging symbols build of Galeon is broken, I'm
working on fixing this, but don't rely on the stacktrace 100%.

$ LD_LIBRARY_PATH=/usr/lib/debug/: gdb galeon
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/bin/galeon
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 30747)]
[New Thread 32769 (LWP 30748)]
[New Thread 16386 (LWP 30749)]
[New Thread 32771 (LWP 30754)]
[New Thread 49156 (LWP 30755)]
[Thread 49156 (LWP 30755) exited]
[New Thread 65541 (LWP 30756)]
[New Thread 81926 (LWP 30758)]
[Thread 81926 (LWP 30758) exited]
[Thread 65541 (LWP 30756) exited]
[New Thread 98311 (LWP 30782)]
[New Thread 114696 (LWP 30784)]
[New Thread 131081 (LWP 30785)]
[New Thread 147466 (LWP 30786)]
[New Thread 163851 (LWP 30787)]
LoadPlugin: failed to initialize shared library
/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so
[/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]
LoadPlugin: failed to initialize shared library
/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so
[/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]
LoadPlugin: failed to initialize shared library
/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so
[/var/opt/j2sdk1.4.0/jre/plugin/i386/ns610/libjavaplugin_oji140.so: undefined
symbol: GetGlobalServiceManager__16nsServiceManagerPP17nsIServiceManager]
[New Thread 180236 (LWP 30793)]
[Thread 98311 (LWP 30782) exited]
[Thread 163851 (LWP 30787) exited]
[Thread 131081 (LWP 30785) exited]
[Thread 114696 (LWP 30784) exited]
[Thread 180236 (LWP 30793) exited]
[Thread 147466 (LWP 30786) exited]
[New Thread 196621 (LWP 30866)]

(galeon:30747): Gtk-CRITICAL **: file gtkcontainer.c: line 1285
(gtk_container_foreach): assertion `GTK_IS_CONTAINER (container)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 30747)]
0x0813b132 in get_toolbar_nth (etoolbar=0x82af5e0, position=137033184)
    at egg-editable-toolbar.c:167
167     egg-editable-toolbar.c: No such file or directory.
        in egg-editable-toolbar.c
(gdb) thread apply all bt full

Thread 1 (Thread 16384 (LWP 30747))

  • #0 get_toolbar_nth
    at egg-editable-toolbar.c line 167
  • #1 item_removed_cb
    at egg-editable-toolbar.c line 883
  • #2 _egg_marshal_VOID__INT_INT
    at eggmarshalers.c line 491
  • #3 IA__g_closure_invoke
    at gclosure.c line 437
  • #4 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #5 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #53 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #54 _gtk_drag_dest_handle_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #55 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #56 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #57 g_main_dispatch
    at gmain.c line 1947
  • #58 IA__g_main_context_dispatch
    at gmain.c line 2497
  • #59 g_main_context_iterate
    at gmain.c line 2578
  • #60 IA__g_main_loop_run
    at gmain.c line 2782
  • #61 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #62 main
    at galeon-main.c line 213
The program is running.  Exit anyway? (y or n) y
$
Comment 3 Loïc Minier 2005-02-01 09:36:57 UTC
(The full stack trace is in the Debian bug, I copied only the relevant part.)

Here's a preliminary patch which adds some safety checks, I don't understand how
"position" gets corrupted though.

--- galeon-1.3.19.orig/libegg/egg-editable-toolbar.c    2004-12-15
18:08:20.000000000 +0100
+++ galeon-1.3.19/libegg/egg-editable-toolbar.c 2005-02-01 10:28:41.000000000 +0100
@@ -161,8 +161,15 @@
   GtkWidget *dock;
   GtkWidget *result;

+  /* check the correctness of the parameters passed to this function */
+  g_return_val_if_fail(etoolbar != NULL, NULL);
+
+  /* position should be checked in get_dock_nth() */
   dock = get_dock_nth (etoolbar, position);

+  /* a wrong position was probably passed to this function */
+  g_return_val_if_fail(dock != NULL, NULL);
+
   l = gtk_container_get_children (GTK_CONTAINER (dock));
   result = GTK_WIDGET (l->data);
   g_list_free (l);
@@ -880,9 +887,19 @@
   GtkWidget *toolbar;
   GtkWidget *item;

+  /* check the correctness of the parameters passed to this function */
+  g_return_if_fail(model != NULL);
+  g_return_if_fail(t != NULL);
+
+  /* toolbar_position should be checked in get_toolbar_nth() */
   toolbar = get_toolbar_nth (t, toolbar_position);
+  /* a wrong toolbar_position was probably passed to this function */
+  g_return_val_if_fail(toolbar != NULL);
+
+  /* position should be checked in gtk_toolbar_get_nth_item() */
   item = GTK_WIDGET (gtk_toolbar_get_nth_item
        (GTK_TOOLBAR (toolbar), position));
+  /* a wrong position was probably passed to this function */
   g_return_if_fail (item != NULL);
   gtk_container_remove (GTK_CONTAINER (toolbar), item);

Comment 4 Christian Persch 2005-02-02 16:35:52 UTC
Looks like the same trace as epiphany bug 153541, which I could never track down
either...
Comment 5 Crispin Flowerday (not receiving bugmail) 2005-02-12 00:14:16 UTC
I don't think that the 'position' field is really corrupted, it's probably just
some sort of compiler thing confusing gdb or something. Unfortunately I can't
reproduce this, so apart from bullet-proofing the functions, I'm not too sure
what we can do :-(
Comment 6 Loïc Minier 2005-02-12 10:01:42 UTC
Yeah, I've fixed the old package build process and it now can build debug
binaries correctly, I'll provide a test package to the submitter ASAP, it's
really my next TODO item.
Comment 7 Loïc Minier 2005-02-17 15:56:51 UTC
The submitter provided an updated backtrace, but only the crash is visible, not
the full backtrace.   I hope he'll get the rest of it, but at least we know
where it crashes:
0x08176b2c in get_toolbar_nth (etoolbar=0x86d7a88, position=1) at               
egg-editable-toolbar.c:167                                                      

    157 get_toolbar_nth (EggEditableToolbar *etoolbar,
    158                  int                 position)
    159 {
    160   GList *l;
    161   GtkWidget *dock;
    162   GtkWidget *result;
    163 
    164   dock = get_dock_nth (etoolbar, position);
    165 
    166   l = gtk_container_get_children (GTK_CONTAINER (dock));
    167   result = GTK_WIDGET (l->data);
    168   g_list_free (l);
    169 
    170   return result;
    171 }

And there's still the warning:
(galeon:6907): Gtk-CRITICAL **: gtk_container_foreach: assertion                
`GTK_IS_CONTAINER (container)' failed                                           

prior to the segfault.

Could it be that the count gets wrong at some point in time, or get_dock_nth
returns something wrong?
Comment 8 Loïc Minier 2005-02-17 16:38:22 UTC
(This seems similar to bug 153541.)

Submitter got a cool stack trace:
Program received signal SIGSEGV, Segmentation fault.                            
[Switching to Thread 16384 (LWP 9882)]                                          
0x08176b2c in get_toolbar_nth (etoolbar=0x86d77a0, position=1) at               
egg-editable-toolbar.c:167                                                      
167     egg-editable-toolbar.c: No such file or directory.                      
        in egg-editable-toolbar.c                                               
(gdb) bt full                                                                   
  • #0 get_toolbar_nth
    at egg-editable-toolbar.c line 167
  • #1 item_removed_cb
    at egg-editable-toolbar.c line 883
  • #2 _egg_marshal_VOID__INT_INT
    at eggmarshalers.c line 491
  • #3 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 egg_toolbars_model_remove_item
    at egg-toolbars-model.c line 684
  • #8 drag_data_delete_cb
    at egg-editable-toolbar.c line 209
  • #9 g_cclosure_marshal_VOID__OBJECT
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #14 _gtk_drag_source_handle_event
  • #15 _gtk_marshal_VOID__BOXED_UINT_UINT
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #20 _gtk_selection_property_notify
  • #21 gtk_selection_convert
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_drag_finish
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 drag_data_received_cb
    at egg-editable-toolbar.c line 497
  • #24 _gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #26 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #29 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 _gtk_marshal_VOID__BOXED_UINT
  • #31 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #33 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #34 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #35 _gtk_selection_property_notify
  • #36 gtk_selection_convert
    from /usr/lib/libgtk-x11-2.0.so.0
  • #37 gtk_drag_get_data
    from /usr/lib/libgtk-x11-2.0.so.0
  • #38 toolbar_drag_drop_cb
    at egg-editable-toolbar.c line 581
  • #39 _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT
  • #40 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #41 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #42 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #43 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #44 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #45 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #46 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #47 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #49 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #50 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #51 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #52 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #53 gtk_drag_dest_find_target
    from /usr/lib/libgtk-x11-2.0.so.0
  • #54 _gtk_drag_dest_handle_event
  • #55 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #56 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #57 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #58 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #59 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #60 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #61 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #62 main
    at galeon-main.c line 213

Comment 9 Akhil Laddha 2011-02-14 13:04:55 UTC
Thanks for taking the time to report this bug.
However, you are using a version that is too old and not supported anymore.

Galeon developers won't be fixing or back porting any fixes for this version. Please upgrade to latest stable Galeon version to receive bug fixes.
We are sorry it could not be fixed for your version.