Bug #16933 segmentation fault with latest glib
Submitted: 31 Jan 2006 13:18 Modified: 31 Jan 2006 21:31
Reporter: Scott Douglass Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.1.18 OS:Linux (Fedora Core Rawhide)
Assigned to: Miguel Solorzano CPU Architecture:Any

[31 Jan 2006 13:18] Scott Douglass
Description:
Can't run the query browser as it crashes with segmentation fault. 

Intel P4 (x86) system with 2GB RAM.
glib2-2.9.5-1
gtk2-2.8.11-1
/usr/lib/libglib-2.0.so.0
/usr/lib/libglib-2.0.so.0.902.3
/usr/lib/libgmodule-2.0.so.0
/usr/lib/libgmodule-2.0.so.0.902.3
/usr/lib/libgobject-2.0.so.0
/usr/lib/libgobject-2.0.so.0.902.3
/usr/lib/libgthread-2.0.so.0
/usr/lib/libgthread-2.0.so.0.902.3

added gdb to mysql-query-browser script:

Program received signal SIGSEGV, Segmentation fault.
---Type <return> to continue, or q <return> to quit---
[Switching to Thread 4253360 (LWP 22867)]
0x08538586 in Gtk::Widget::set_sensitive ()
(gdb) bt
#0  0x08538586 in Gtk::Widget::set_sensitive ()
#1  0x08295257 in MQBookmarkBrowser::bookmark_select ()
#2  0x0829678e in SigC::ObjectSlot0_<void, MQBookmarkBrowser>::proxy ()
#3  0x0858c5fa in Glib::SignalProxyNormal::slot0_void_callback ()
#4  0x0037c8c8 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#5  0x0036fdbd in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#6  0x00381265 in g_signal_override_class_closure ()
   from /usr/lib/libgobject-2.0.so.0
#7  0x00382402 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#8  0x003826a5 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#9  0x010f91cb in gtk_tree_model_sort_new_with_model ()
   from /usr/lib/libgtk-x11-2.0.so.0
#10 0x01109f65 in gtk_tree_view_set_model () from /usr/lib/libgtk-x11-2.0.so.0
#11 0x082cccd0 in MGBrowserList::set_store ()
#12 0x0829360a in MQBookmarkBrowser::MQBookmarkBrowser ()
#13 0x0828d3de in MQBookmarks::MQBookmarks ()
#14 0x0822e78a in MQMainWindow::MQMainWindow ()
#15 0x08230911 in MGGladeXML::get_widget_derived<MQMainWindow> ()
#16 0x0822eb79 in MQMainWindow::create ()
#17 0x0821a196 in main ()

How to repeat:
run mysql-query-browser

Suggested fix:
Don't have any idea. Sorry. Can't build from source as I don't have gtkhtml 3.0 (Fedora is up to 3.9.5 at this time)
[31 Jan 2006 21:31] Miguel Solorzano
I was unable for to repeat on FC4. I know it isn't Rawhide but that installation
isn't in development stage?
[3 Feb 2006 1:09] Izaak Branderhorst
It would seem I have the same problem; it gets a seg fault and gdb stops at the same point.

Kernel / CPU: Linux 2.6.14.4 #5 PREEMPT i686 Intel(R) Pentium(R) III Mobile CPU      1133MHz GenuineIntel

Distribution: Arch Linux

I have a feeling it might be a library conflict, since Arch Linux is fairly bleeding edge if you keep your packages up to date (which I have). I'll attach a list of my installed packages in case it helps.

I'll also attach a gzip'd strace output of mysql-query-browser-bin (from modifying mysql-query-browser).
[3 Feb 2006 1:12] Izaak Branderhorst
I forgot to mention that I've confirmed that it doesn't make a difference whether I compile from source or use a binary package (such as mysql-query-browser-1.1.18-linux-i386.tar.gz). They stop at the same point.

Also, I'm not allowed to attach any files - if needed I can open a related bug.
[3 Feb 2006 18:50] Izaak Branderhorst
This is apparently the same bug as #15903 (for 1.1.17) for which someone has already posted a patch. It works for me (modified to work against 1.1.18).

--- mysql-query-browser-1.1.18.orig/mysql-query-browser/source/linux/MQBookmarkBrowser.cc      2005-10-13 04:22:40.000000000 -0400
+++ mysql-query-browser-1.1.18/mysql-query-browser/source/linux/MQBookmarkBrowser.cc    2006-02-03 13:35:05.000000000 -0500
@@ -257,7 +257,8 @@
   {
     for (unsigned int i=0; i < _menu.items().size(); i++)
       _menu.items()[i].set_sensitive(false);
-    _menu.items()[3].set_sensitive(true); // New Folder
+    if( _menu.items().size() > 3 )
+      _menu.items()[3].set_sensitive(true); // New Folder
   }
 }