Bug #55554 Crash when exporting SELECT results to file
Submitted: 26 Jul 2010 11:38 Modified: 2 Dec 2011 23:17
Reporter: Craig Fowler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.25 OS:Linux (Debian Squeeze 32-bit/Ubuntu 9.10 .deb package)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: crash, csv, export

[26 Jul 2010 11:38] Craig Fowler
Description:
MySQL Workbench crashes when using the "export recordset to an external file" command button on the 'result' pane of the SQL editor.

How to repeat:
1) Connect to a database server using the Workbench SQL editor

2) Perform a SELECT query against that server - I first tried selecting something from an actual database but I have been able to reproduce the crash using this query:

SELECT 1, 2 FROM DUAL;

3) Click the "export recordset to an external file" button on the results pane

4)  Choose XML (although I have been able to reproduce this choosing tab-separated and CSV formats also)

5)  Enter or browse for a filename, the path and filename I used was:

/home/craig/Desktop/foo.xml

6)  Press 'export'.  Workbench crashes.

Commandline output follows:

craig@craig-laptop:~$ mysql-workbench
** Message: Gnome keyring daemon seems to not be available. Stored passwords will be lost once quit
/usr/lib/python2.6/dist-packages/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application uses RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken
  RandomPool_DeprecationWarning)

** (mysql-workbench-bin:6284): WARNING **: Plugin 'wb.tools.quickTables' from module WbTools has invalid type ''

** (mysql-workbench-bin:6284): WARNING **: :145: link 'bf9ec732-98a6-11df-83c2-0019d28b5037' <object GrtObject> key=owner could not be resolved
Starting thread...
Thread started
40669 INFO Connecting to SSH server at testing-server2:22 using key /home/craig/.ssh/id_rsa.pub...
New client connection
client connection established
40669 INFO Tunnel now open ('127.0.0.1', 56807) -> ('172.16.0.14', 22) -> ('127.0.0.1', 3306)
New client connection
client connection established
40669 INFO Tunnel now open ('127.0.0.1', 56808) -> ('172.16.0.14', 22) -> ('127.0.0.1', 3306)

(mysql-workbench-bin:6284): Gtk-WARNING **: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead
** Message: query.explain built-in command is being overwritten
/usr/bin/mysql-workbench-bin: symbol lookup error: /usr/lib/mysql-workbench/libwbpublic.so.0: undefined symbol: _ZN9ctemplate8Template11GetTemplateERKSsNS_5StripE
[26 Jul 2010 14:30] MySQL Verification Team
Not repeatable on Windows.
[27 Jul 2010 16:42] MySQL Verification Team
Not repeatable on Fedora X86_64 too.
[27 Jul 2010 21:10] Alfredo Kojima
This was a packaging error
[18 Aug 2010 16:22] Alfredo Kojima
This has been fixed.
[25 Aug 2010 11:46] Johannes Taxacher
fix confirmed in repository
[8 Sep 2010 15:01] Tony Bedford
An entry has been added to the 5.2.27 changelog:

MySQL Workbench crashed when using the Export recordset to an external file command button on the result pane of the SQL Editor.
[2 Dec 2011 23:00] Martín Rosso
I have the same problem on version 5.2.35.
The command line output:
** Message: query.explain built-in command is being overwritten
/usr/bin/mysql-workbench-bin: symbol lookup error: /usr/lib/mysql-workbench/libwbpublic.so.0: undefined symbol: _ZN9ctemplate8Template11GetTemplateERKSsNS_5StripE

Is there something wrong with me? or the bug has came back?
[2 Dec 2011 23:17] Craig Fowler
I have a vague recollection of speaking with Alfredo Kojima over IRC some months ago whilst troubleshooting an incredibly similar issue, since this fix.  It turned out that the version of ctemplate I had installed was out of date and had caused the inconsistency.  This would also look to be the case with your crash (looking at your backtrace).

I don't remember the exact explanation but I have a feeling that there was some kind of difficulty in specifying the required ctemplate version as a dependency in the .deb file.  IIRC Alfredo suggested that ctemplate could be very 'touchy' :)

Anyway - it would probably be worth trying updating your version of ctemplate installed on your system (and then perhaps reporting here if it worked).  On Debian the package is "libctemplate0".  I have version 0.97-3 (Debian Testing) currently installed on my machine and WB is working (I cannot reproduce this crash).  I see that version 1.0-1 is available in aptitude but not installed on my machine yet.  I don't have the "-dev" package installed by the way (in case you wondered if it was needed).