Bug #79364 Can crash WB by connecting to MariaDB 10
Submitted: 20 Nov 2015 15:16 Modified: 20 Nov 2015 23:40
Reporter: Arnaud Adant Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:6.3.5 OS:Windows (W7)
Assigned to: CPU Architecture:Any
Tags: crash, MariaDB, W7, workbench

[20 Nov 2015 15:16] Arnaud Adant
Description:
WB 6.3.5 (and also older release like 6.1.7) can connect to MariaDB.

How to repeat:
1. Download WB 6.3.5 CE 64 bit (32 bit has the same issue)
2. Download MariaDB 10.0.22 64 bit windows
3. Start MariaDB using mysqld --console
4. Create a new connection using WB : testing the connection works
5. Connect to the database ( may or may not crash) : a SQL tab opens
6. Connect to the same database : crashes : it says MySQL workbench has stopped working : a new SQL tab can not open

c:\dev>cd "MySQL Workbench 6.3.5 CE (winx64)"

c:\dev\MySQL Workbench 6.3.5 CE (winx64)>MySQLWorkbench.exe -log-level=debug3

c:\dev\MySQL Workbench 6.3.5 CE (winx64)>Logger set to level 'debug3'. '0111111'

Unhandled Exception: System.AccessViolationException: Attempted to read or write
 protected memory. This is often an indication that other memory is corrupt.
   at mforms.MenuItem.callback(MenuItem* )
   at MenuItemEventTarget.MenuItemClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, In
t32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Uns
afeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int
32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 r
eason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason
, ApplicationContext context)
   at MySQL.GUI.Workbench.Program.Main(String[] Args)

Suggested fix:
The MySQL client works, so WB should be able to connect.
[20 Nov 2015 15:17] Arnaud Adant
general log for the 2 connections

Attachment: general_log.txt (text/plain), 1.62 KiB.

[20 Nov 2015 15:30] Arnaud Adant
WB logs debug level 3

Attachment: wb_debug3.txt (text/plain), 24.29 KiB.

[20 Nov 2015 15:30] Arnaud Adant
I can upload the full crash dump if you need it.
[20 Nov 2015 15:31] Arnaud Adant
also happens in 6.1.7
[20 Nov 2015 23:32] MySQL Verification Team
Thank you for the bug report. Looks like you have the reason for in the log:

15:14:22 [ERR][      WBContext]: Unsupported server version: mariadb.org binary distribution 10.0.22-MariaDB
[20 Nov 2015 23:40] Arnaud Adant
Well, I have it twice. The first time it works, the second time, it crashes.
Even though not supported, you have an issue in the code to handle the exception. I pasted the stack trace. It can also be reproduced following the steps I provided. Please fix it so that the behavior is consistent.