Bug #49242 Crash on Load File in SQL Scripts of MySQL Model
Submitted: 1 Dec 2009 0:07 Modified: 8 Dec 2009 10:33
Reporter: Kolbe Kegel Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.2.10 Beta OS:Linux
Assigned to: Alfredo Kojima CPU Architecture:Any

[1 Dec 2009 0:07] Kolbe Kegel
Description:
Workbench crashes when I try to load the sakila-data.sql file under the SQL Scripts section of the MySQL Model tab.

How to repeat:
1) Create a new EER Model
2) Expand the SQL Scripts section
3) Click Add Script
4) Double-click new script file icon
5) Click Load File...
6) Select sakila-data.sql

glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: File '/home/kolbe/Downloads/sakila-db/sakila-data.sql' contains invalid UTF-8 data.

Suggested fix:
1) WB should not crash whether or not the utf-8 data is invalid.
2) This file does not, as far as I can tell, contain any invalid data. It's possible to execute this file using the MySQL command-line client without any errors or warnings.

WB should open sakila-data.sql without any errors, warnings, or crashes.

(For what its worth, WB opens this file fine in SQL Development mode.)
[1 Dec 2009 18:15] Kolbe Kegel
Crash still occurs as described in 5.2.10.
[2 Dec 2009 0:40] Alfredo Kojima
Added a check for non-utf8 or ASCII data files when loading them. If such data is found, a dialog will popup asking for the file encoding and will convert the data before loading. If the file is saved, it will saved as UTF-8.
[4 Dec 2009 21:26] Johannes Taxacher
fix confirmed as describd by developer.
will be included in 5.2.11
[8 Dec 2009 10:33] Tony Bedford
An entry was added to the 5.2.11 changelog:

When an attempt was made to load the sakila.sql script file in the SQL Scripts section of the Model tab, MySQL Workbench crashed with the following error:

glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: File '/home/kolbe/Downloads/sakila-db/sakila-data.sql' contains invalid UTF-8
data.