Bug #60856 Workbench crashes when use query is issued twice in a row
Submitted: 13 Apr 2011 19:09 Modified: 25 May 2011 1:29
Reporter: Henry Gernhardt Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.33 OS:Linux (Ubuntu 10.10)
Assigned to: CPU Architecture:Any

[13 Apr 2011 19:09] Henry Gernhardt
Description:
When switching databases in the SQL editor using the USE command, workbench crashes upon the second consecutive issuance of said command.

How to repeat:
* Open a connection in the SQL editor.
* In the SQL query text editor, type USE <dbname>, where <dbname> is an extant database.
* Press control-enter to execute the query.
* OPTIONAL:  Replace the original <dbname> with a a different extant database.
* Press control-enter again to execute the query.
* If that doesn't do it, just hit control-enter again right after the previous query completes.

Suggested fix:
I'm not sure how to fix it, but here's an excerpt of the console log:

sql_workspaces/tcintake-1.autosave
Log levels '0111000'
disabling log level 0
enabling log level 1
enabling log level 2
enabling log level 3
disabling log level 4
disabling log level 5
disabling log level 6
Starting thread...
Thread started
33738 INFO Connecting to SSH server at <deleted> using key <deleted>...
New client connection
client connection established
33738 INFO Tunnel now open ('127.0.0.1', 45192) -> ('<deleted>', 22) -> ('127.0.0.1', 3306)
New client connection
client connection established
33738 INFO Tunnel now open ('127.0.0.1', 45193) -> ('<deleted>', 22) -> ('127.0.0.1', 3306)
** Message: query.explain built-in command is being overwritten

(mysql-workbench-bin:16880): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed

(mysql-workbench-bin:16880): Gtk-CRITICAL **: gtk_tree_view_unref_tree_helper: assertion `node != NULL' failed

(mysql-workbench-bin:16880): Gtk-WARNING **: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators

(mysql-workbench-bin:16880): Gtk-WARNING **: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators
Segmentation fault
*** Segmentation fault
Register dump:

 RAX: 0000000000000000   RBX: 0000000002634f70   RCX: 00007fc8f4944960
 RDX: 0000000000000000   RSI: 0000000000000000   RDI: 0000000000000002
 RBP: 00000000024e3e30   R8 : 00007fc8dc9d1090   R9 : 0000000000000001
 R10: 00000000000000a0   R11: 0000000000000001   R12: 00000000024e3db0
 R13: 00007fff90e1b890   R14: 00007fc8dc9d9380   R15: 00007fff90e1ba9c
 RSP: 00007fff90e1b750

 RIP: 00007fc8f0bd6fcb   EFLAGS: 00010206

 CS: 0033   FS: 0000   GS: 0000

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

 FPUCW: 0000037f   FPUSW: 00000000   TAG: 00000000
 RIP: 00000000   RDP: 00000000

 ST(0) 0000 000000000000000f   ST(1) 0000 0000000000000031
 ST(2) 0000 0012000000000000   ST(3) 0000 0000000000000009
 ST(4) 0000 0000000000000000   ST(5) ffff ffffffff99999800
 ST(6) 0000 0000000000000000   ST(7) 0000 0000000000000000
 mxcsr: 1fa0
 XMM0:  000000000000000000000000ffffff00 XMM1:  000000000000000000000000ffffff00
 XMM2:  000000000000000000000000ffffff00 XMM3:  000000000000000000000000ffffff00
 XMM4:  000000000000000000000000ffffff00 XMM5:  000000000000000000000000ffffff00
 XMM6:  000000000000000000000000ffffff00 XMM7:  000000000000000000000000ffffff00
 XMM8:  000000000000000000000000ffffff00 XMM9:  000000000000000000000000ffffff00
 XMM10: 000000000000000000000000ffffff00 XMM11: 000000000000000000000000ffffff00
 XMM12: 000000000000000000000000ffffff00 XMM13: 000000000000000000000000ffffff00
 XMM14: 000000000000000000000000ffffff00 XMM15: 000000000000000000000000ffffff00

Backtrace:
/usr/lib/libgtk-x11-2.0.so.0(+0x1dafcb)[0x7fc8f0bd6fcb]
/usr/lib/libgtk-x11-2.0.so.0(+0x1dbd2e)[0x7fc8f0bd7d2e]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_layout_get_line_display+0x11d)[0x7fc8f0bdf19d]
/usr/lib/libgtk-x11-2.0.so.0(+0x1e6fca)[0x7fc8f0be2fca]
/usr/lib/libgtk-x11-2.0.so.0(+0x1c667d)[0x7fc8f0bc267d]
/usr/lib/libgtk-x11-2.0.so.0(+0x1c69fa)[0x7fc8f0bc29fa]
/usr/lib/libgtk-x11-2.0.so.0(gtk_text_layout_validate+0xc7)[0x7fc8f0be1bf7]
/usr/lib/libgtk-x11-2.0.so.0(+0x1f15b2)[0x7fc8f0bed5b2]
/usr/lib/libgdk-x11-2.0.so.0(+0x1d626)[0x7fc8f00e5626]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1f2)[0x7fc8ecfa3342]
/lib/libglib-2.0.so.0(+0x442a8)[0x7fc8ecfa72a8]
/lib/libglib-2.0.so.0(g_main_loop_run+0x195)[0x7fc8ecfa77b5]
/usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xa7)[0x7fc8f0b303e7]
/usr/bin/mysql-workbench-bin(main+0xa4b)[0x56406b]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7fc8eabc9d8e]
??:0(??)[0x563419]
[14 Apr 2011 2:29] Alfredo Kojima
crashes as described
[25 May 2011 1:29] Paul DuBois
Noted in 5.2.34 changelog.

Multiple USE commands to change databases in the SQL Editor caused
Workbench to crash.