Bug #68402 Workbench crashes after deleting a database schema from a model
Submitted: 16 Feb 2013 11:32 Modified: 26 Jun 2013 6:32
Reporter: Mike Lischke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.46 OS:Linux (Debian GNU/Linux Stable/Testing hybrid (Squeeze/Wheezy))
Assigned to: CPU Architecture:Any
Tags: delete schema

[16 Feb 2013 11:32] Mike Lischke
Description:
On behalf of Craig Fowler:

Using the official downloadable .deb package for Ubuntu 10.04 (the 12.04 package will not install on Debian Wheezy due
to missing dependencies).

Problem summary
===============
Workbench crashes after deleting a database schema from a model.

Command-line output from Workbench when reproducing this bug
============================================================
craig@craig-laptop:~/Projects/MyProject$ mysql-workbench "Database schema.mwb"
Initializing AdvancedSidebar factory method
Initializing mforms factory
** Message: Gnome keyring daemon seems to not be available. Stored passwords will be lost once quit
Creating WBOptions
/bin/sh: 1: ifconfig: not found
Ready.

** Message: overview.home built-in command is being overwritten
Segmentation fault
*** Segmentation fault
Register dump:

 RAX: 00007fff36596e40   RBX: 0000000002ef5470   RCX: 0000000002ba1490
 RDX: 0000000000000000   RSI: 0000000000000000   RDI: 0000000000000000
 RBP: 00007fff36596e40   R8 : 0000000002c87940   R9 : 0000000000007065
 R10: 0000000003e7b580   R11: 00007f3012758420   R12: 0000000002dfeba0
 R13: 0000000002c312a0   R14: 00007fff36596e80   R15: 000000000304fff0
 RSP: 00007fff36596e28

 RIP: 00007f30139cb1c0   EFLAGS: 00010202

 CS: 0033   FS: 0000   GS: 0000

 Trap: 0000000e   Error: 00000004   OldMask: 00000000   CR2: 00000000

 FPUCW: 0000037f   FPUSW: 00000020   TAG: 00007f30
 RIP: 0d787fff   RDP: 365959d0

 ST(0) 0000 0000000000000000   ST(1) 0000 0000000000000000
 ST(2) 0000 0000000000000000   ST(3) 0000 0000000000000000
 ST(4) 0000 0000000000000000   ST(5) 0000 0000000000000000
 ST(6) ffff d3c8000000000000   ST(7) 8000 8000000000000000
 mxcsr: 1fa4
 XMM0:  000000000000000000000000ff000000 XMM1:  000000000000000000000000ff000000
 XMM2:  000000000000000000000000ff000000 XMM3:  000000000000000000000000ff000000
 XMM4:  000000000000000000000000ff000000 XMM5:  000000000000000000000000ff000000
 XMM6:  000000000000000000000000ff000000 XMM7:  000000000000000000000000ff000000
 XMM8:  000000000000000000000000ff000000 XMM9:  000000000000000000000000ff000000
 XMM10: 000000000000000000000000ff000000 XMM11: 000000000000000000000000ff000000
 XMM12: 000000000000000000000000ff000000 XMM13: 000000000000000000000000ff000000
 XMM14: 000000000000000000000000ff000000 XMM15: 000000000000000000000000ff000000

Backtrace:
/usr/lib/libgtkmm-2.4.so.1(_ZN3Gtk13TreeSelection12unselect_allEv+0x0)[0x7f30139cb1c0]
/usr/lib/mysql-workbench/liblinux_utilities.so.0(_ZN9MultiView11select_nodeERKN3bec6NodeIdE+0x3c)[0x7f30186c08ac]
/usr/libexec/mysql-workbench-bin(_ZN13OverviewPanel27item_list_selection_changedERKSt6vectorIN3bec6NodeIdESaIS2_EEP9MultiView+0x62)[0x6993a2]
/usr/lib/mysql-workbench/liblinux_utilities.so.0(_ZN9MultiView22icon_selection_changedEv+0x3e7)[0x7f30186c2e77]
/usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1(_ZN4Glib17SignalProxyNormal19slot0_void_callbackEP8_GObjectPv+0x28)[0x7f301241e748]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_closure_invoke+0x190)[0x7f30107bc6e0]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x22966)[0x7f30107cd966]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0xdac)[0x7f30107d56bc]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7f30107d5852]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x11ca8a)[0x7f3012758a8a]
/usr/lib/libgtkmm-2.4.so.1(_ZN3Gtk6Widget21on_button_press_eventEP15_GdkEventButton+0x47)[0x7f30139d71a7]
/usr/lib/mysql-workbench/liblinux_utilities.so.0(_ZN16EditableIconView21on_button_press_eventEP15_GdkEventButton+0x30)[0x7f30186c4820]
/usr/lib/libgtkmm-2.4.so.1(_ZN3Gtk12Widget_Class27button_press_event_callbackEP10_GtkWidgetP15_GdkEventButton+0x63)[0x7f30139d9fc3]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x13f099)[0x7f301277b099]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_closure_invoke+0x190)[0x7f30107bc6e0]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x224d0)[0x7f30107cd4d0]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x9cb)[0x7f30107d52db]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x82)[0x7f30107d5852]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x25693e)[0x7f301289293e]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_propagate_event+0xc4)[0x7f3012779434]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_main_do_event+0x27b)[0x7f301277978b]
/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0(+0x5d7ac)[0x7f3011d4b7ac]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x135)[0x7f300f3c0355]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a688)[0x7f300f3c0688]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x72)[0x7f300f3c0a82]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_main+0xa7)[0x7f3012778797]
/usr/libexec/mysql-workbench-bin(main+0x794)[0x67d184]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7f300cfcbead]
??:0(??)[0x67c7e9]

How to repeat:
1)  Create or open a MySQL Workbench model document that contains two schemata, it does not seem to matter whether the
    schemata in the model contain any objects or not.

2)  Delete one of those two schemata by right-clicking on its schema tab.  Workbench does not crash immediately but the
    next piece of UI that you click with the cursor will cause a crash (with the backtrace given below).

3)  FYI in an earlier version of Workbench - I believe version 5.2.44 although I won't swear to it - the same bug is
    present except that Workbench crashes immediately upon performing the deletion.

Suggested fix:
Workaround
==========
My current workaround for this crash is to (after deleting a schema from a model) to immediately save the model document
using the Ctrl-S shortcut.  This does not trigger the inevitible crash.  Then, once the model is saved, the crash can
be triggered but the document would have been saved successfully, and can be re-opened.
[18 Feb 2013 8:09] MySQL Verification Team
Hello Mike,

Thank you for the report.

Verified as described on reported(MySQL Workbench 5.2.46) and later versions(MySQL Workbench 5.2.47).

Thanks,
Umesh
[26 Jun 2013 6:32] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.x release, and here's the changelog entry:

On Linux, MySQL Workbench would crash after deleting a database schema from a
model.

Thank you for the bug report.