Bug #49304 Cancel on close workbench closes anyways
Submitted: 1 Dec 2009 21:55 Modified: 29 Jan 2010 11:13
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.10 r4680 OS:Windows (Windows XP)
Assigned to: Mike Lischke CPU Architecture:Any

[1 Dec 2009 21:55] Todd Farmer
Description:
When one experiences an unhandled exception (for whatever reason, still pretty easy to get them), I click Quit.  WB then alerts me that I have unsaved changes, and do I really want to close.  I click "cancel", and WB exits anyways.

How to repeat:
See above.

Suggested fix:
Either require Yes or No (eliminate Cancel as an option), or make Cancel not exit.
[1 Dec 2009 22:08] Todd Farmer
It appears it is not asking me whether or not to exit, but rather whether or not to apply the pending changes.  This time, I click "Yes" to apply, and WB crashes.
[4 Jan 2010 12:42] Mike Lischke
not repeatable for me
[14 Jan 2010 7:26] Susanne Ebrecht
This also is very easy to reproduce with Workbench 5.2.11 on Ubuntu. So it seems to be on Windows and Ubuntu.

Here is my test:

1) Start WB
2) Add new Diagram
3) Just place two tables
4) click the cross on the right top corner
5) click cancel

Workbench will exit ...

Sometimes it will really cancel but most often it will exit immediately. So maybe you need to do the steps above twice.

$ ./bin/mysql-workbench
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb_utils_grt.py' (python)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb.mysql.import.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/table_utils.grt.lua' (lua)
** Message: Initialized Lua module /home/miracee/wb52se/lib/mysql-workbench/modules/table_utils.grt.lua (WbTableUtils)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/forms.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/dbutils.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/db.mysql.sqlparser.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb.mysql.validation.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/tools.grt.lua' (lua)
** Message: Initialized Lua module /home/miracee/wb52se/lib/mysql-workbench/modules/tools.grt.lua (WbTools)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/db.mysql.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/db.mysql.query.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb.validation.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb_admin_grt.py' (python)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/catalog_utils.grt.lua' (lua)
** Message: Initialized Lua module /home/miracee/wb52se/lib/mysql-workbench/modules/catalog_utils.grt.lua (WbUtils)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/db.mysql.sqlide.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/modules/wb.model.grt.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/wb.model.reporting.wbp.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.diff.reporting.wbp.so' (cpp)
** Message: WARNING: Could not open module /home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.diff.reporting.wbp.so (/home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.diff.reporting.wbp.so: undefined symbol: _ZTV9Wb_plugin)    
** Message: WARNING: Could not load db.mysql.diff.reporting.wbp.so: Cannot open /home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.diff.reporting.wbp.so    
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/wb.printing.wbp.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/db.checks.wbp.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.editors.wbp.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/db.mysql.wbp.so' (cpp)
** Message: Trying to load module '/home/miracee/wb52se/lib/mysql-workbench/plugins/wb.model.editors.wbp.so' (cpp)

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

** (mysql-workbench-bin:12369): WARNING **: /home/miracee/.mysql/workbench/wb_options.xml:331: link '4c236f38-00d0-11df-974a-0018decb0fec' <object GrtObject> key=owner could not be resolved
_view_impl has NULL ptr at 14
_app_impl has NULL ptr at 5
** Message: item_activated: 0x31abad0 -> 'plugin:wb.file.newDocument'
The program 'mysql-workbench-bin' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
  (Details: serial 23758 error_code 160 request_code 149 minor_code 7)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[20 Jan 2010 23:17] Alfredo Kojima
The problem in Linux is unrelated to the problem in Windows. The problem in Linux has been fixed.
I don't know what to do in case of Windows, tho. I guess it would skip the
Save confirmation dialog in case you press Quit, but I have no idea how to do that.
[27 Jan 2010 13:33] Mike Lischke
Fixed in 5.2
[28 Jan 2010 10:17] Johannes Taxacher
a new error dialog has been introduced that changes the handling. It presents the user options to go to the bug report page, copy some debug information to the clipboard and to close the dialog.
fix is included in 5.2.15
[29 Jan 2010 11:13] Tony Bedford
An entry has been added to the 5.2.15 changelog:

When a MySQL Workbench unhandled exception occurred and the exception dialog was displayed, if the user clicked Quit, and there were unsaved changes, a new dialog was displayed, warning of unsaved changes. If Cancel was clicked on this dialog, MySQL Workbench would exit, which was not the expected behavior, as changes would then be lost. If Yes was clicked on this dialog, to save changes, then MySQL Workbench crashed. Overall, the behavior of the dialogs was confusing.

A new error dialog has been introduced that changes the handling. It presents the user options to go to the bug report page, copy debug information to the clipboard and to close the dialog.