Bug #77488 MySQL Workbench hs been Stopped working on Windows 8.1
Submitted: 25 Jun 2015 17:46 Modified: 17 Oct 2015 23:15
Reporter: Akshay Mohan MK Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.3.4.0 OS:Windows (8.1)
Assigned to: CPU Architecture:Any
Tags: StoppedWorking, workbench

[25 Jun 2015 17:46] Akshay Mohan MK
Description:
My Sql Work Bench has been stopped working while creating blocked statements.

How to repeat:
While creating blocked statemnt(BEGIN. . .END) when activating autocomplete feaature the workbench has been stopped working.

Suggested fix:
An unhandled exception of type 'System.AccessViolationException' occurred in wbprivate.wr.dll
[30 Jun 2015 15:30] MySQL Verification Team
Thank you for the bug report. That's repeatable all the time ? If yes please provide the complete statement you are doing when the exception happens. Thanks.
[30 Jun 2015 17:12] Akshay Mohan MK
While creating Blocked statements like Stored Procedure,Function,etc.
and when starts to specify "TableName".
[15 Aug 2015 21:00] Dimitri Germain
I Got the same problem after creating a Procedure. The first error it gave me was...

An unhandled Microsoft .NET Framework exception occurred in MySQL Workbench.exe[208]

After debugging with Visual Studios it gave me....

An unhandled exception of type 'System.AccessViolationException' occurred in wbprivate.wr.dll

with a gree arrow pointing to "00000057   jmp          00000226"
[2 Sep 2015 6:21] MySQL Verification Team
Thank you for the feedback.
Verified as described on Win7 with WB 6.3.4

Thanks,
Umesh
[2 Sep 2015 6:22] MySQL Verification Team
//

D:\Workbench\MySQL Workbench 6.3.4 CE (winx64)>MySQLWorkbench.exe -log-level=debug3

D:\Workbench\MySQL Workbench 6.3.4 CE (winx64)>Logger set to level 'debug3'. '0111111'

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indi
cation that other memory is corrupt.
   at wb.WBContext.flush_idle_tasks(WBContext* )
   at MySQL.Workbench.WbContext.flush_idle_tasks()
   at MySQL.GUI.Workbench.Program.timer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.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.UnsafeNativeMethods.IMsoComponentManager.FP
ushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at MySQL.GUI.Workbench.Program.Main(String[] Args)

D:\Workbench\MySQL Workbench 6.3.4 CE (winx64)>
[2 Sep 2015 6:23] MySQL Verification Team
// How to repeat

-- Paste below test case some 5-6 times and make sure SQL edito's line numbers reach ~80-90

create database if not exists test;
use test;
drop table if exists keyvalue;
CREATE TABLE `keyvalue` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name1` varchar(250),
  `name2` varchar(250),
  `name3` varchar(250),
  `name4` varchar(250),
  PRIMARY KEY (`id`)
) ENGINE=innodb;

set @id:=0;

 insert into `keyvalue` values 
  (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
,  (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000));

-- Copy/Paste Below 

CREATE DEFINER = 'admin'@'localhost' PROCEDURE account_count()
BEGIN

End

-- Try to write SELECT query and wait for auto completion

CREATE DEFINER = 'admin'@'localhost' PROCEDURE account_count()
BEGIN

SELECT * FROM t<--wait here to see crashing

End

// 

D:\Workbench\MySQL Workbench 6.3.4 CE (winx64)>Logger set to level 'debug3'. '0111111'

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indi
cation that other memory is corrupt.
   at wb.WBContext.flush_idle_tasks(WBContext* )
   at MySQL.Workbench.WbContext.flush_idle_tasks()
   at MySQL.GUI.Workbench.Program.timer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.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.UnsafeNativeMethods.IMsoComponentManager.FP
ushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at MySQL.GUI.Workbench.Program.Main(String[] Args)

D:\Workbench\MySQL Workbench 6.3.4 CE (winx64)>
[8 Sep 2015 16:43] Akshay Mohan MK
Yes It is Repeated all time
[23 Sep 2015 11:00] MySQL Verification Team
Bug #78529 marked as duplicate of this
[17 Oct 2015 23:15] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.5 release, and here's the changelog entry:

On Windows, creating blocked statements (such as BEGIN...END) with
auto-complete activated would cause MySQL Workbench to emit an unhandled
exception

Thank you for the bug report.