Bug #73496 CTRL+ SHIFT+ Z after altering a View make the Workbench Crash
Submitted: 7 Aug 2014 9:21 Modified: 15 Sep 2014 21:44
Reporter: Babak Bandpey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:6.1.7.11891 / 6.2 CE OS:Microsoft Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: View Edit CTRL+Z Crash WorkBench 6.1/6.2 CE

[7 Aug 2014 9:21] Babak Bandpey
Description:
11:12:24 [ERR][      Workbench]: Object reference not set to an instance of an object.
Exception = System.NullReferenceException
Message = Object reference not set to an instance of an object.
FullText = System.NullReferenceException: Object reference not set to an instance of an object.
   at MySQL.GUI.Workbench.Plugins.DbMysqlViewEditor.RefreshFormData()
   at MySQL.GUI.Workbench.Plugins.ObjectEditorPlugin.CallRefreshFormData()
   at MySQL.Grt.RunWrappedDelegate0<void\,void\,MySQL::Grt::DelegateSlot0<void\,void>::ManagedDelegate>.native_callback()
   at boost.detail.function.void_function_invoker0<void (__cdecl*)(void),void>.invoke(function_buffer* function_ptr)
   at mforms.Wizard.next_clicked(Wizard* )
   at MySQL.Forms.WizardForm.NextClick(Object sender, EventArgs args)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
Just edit a view and save and CRTL+Z
[7 Aug 2014 12:50] Miguel Solorzano
Thank you for the bug report. I couldn't repeat with my own model project are you
able to provide a test model file with a view which can be edited to get the crash
reported. Thanks.
[7 Aug 2014 13:48] Babak Bandpey
I think I have found a solution.

The EER Diagram must be saved as a new file and the old EER Diagram must be disregarded and the new one must be used and No crash will happen.

I think that if the EER Diagram was made with an older version the problem will occur.
[7 Aug 2014 14:32] Babak Bandpey
The Error is still there.

It has something with editing the Views to do and it occurs only a View has been altered.

Very bothering
[11 Aug 2014 16:51] Miguel Solorzano
Which older version you created the model file?. Thanks.
[12 Aug 2014 8:38] Babak Bandpey
Hi,

I believe that it was the version released prior to the 6.1.7.11891. I'm sure that I keep my WB up to date.
[20 Aug 2014 7:14] Babak Bandpey
CTRL+ SHIFT+ Z after altering a View make the Workbench Crash
[20 Aug 2014 11:17] Miguel Solorzano
For me CTRL + SHIFT + Z opens Synchronize Model screen as expected.
[20 Aug 2014 14:41] Babak Bandpey
Dear Miguel Solorzano,

I'm very happy that you don't have the same problem. :)
CTRL+ SHIFT+ Z works fine until the very last step where the synchronization takes place. It is at the very last step that the Bug Screen sometimes comes up and then I know that I have to close the application and restart else none further changes would be saved. Some other time the whole application vanishes as if it was deleted from the runtime memory.

I have reinstalled the Workbench as late as today and the same problem. I don't know if any other application is cause of this but I don't feel so.

If you are kind to tell me where I can find the application log. I believe that I have seen something regarding the some graphic issues which causes the window to vanish.
But so far it is just a guess.

Thank you for your time dear Solorzano
[22 Aug 2014 7:20] Babak Bandpey
Dear Solorenzo,

I have additional info for you. Yesterday I installed the 6.2 RC and almost immediately I had the same problem. 

This is taken from windows event log:
// -----------------------------------------------------------------------
// The application Error
// -----------------------------------------------------------------------
Faulting application name: MySQLWorkbench.exe, version: 6.2.1.12170, time stamp: 0x53ed611a
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000000
Faulting process id: 0x18a4
Faulting application start time: 0x01cfbdd50020c354
Faulting application path: C:\Program Files\MySQL\MySQL Workbench 6.2 CE\MySQLWorkbench.exe
Faulting module path: unknown
Report Id: cfa2d7a8-29ca-11e4-ad96-eca86bf88a38
// -----------------------------------------------------------------------
// .NET Error
// -----------------------------------------------------------------------
Application: MySQLWorkbench.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
   at MySQL.Forms.ViewEventTarget.HandleMouseDown(System.Object, System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at MySQL.GUI.Workbench.Program.Main(System.String[])
// -----------------------------------------------------------------------

I hope it helps your developers to curb this bug.
Have a nice weekend
sincerely
Babak
[22 Aug 2014 7:21] Babak Bandpey
This error is also observed in the latest release as well,
[22 Aug 2014 7:49] Babak Bandpey
Dear Solorenzo,

I've installed this on 64bit windows now and there are no errors.
This thing happens on 32bit machines.
[22 Aug 2014 13:39] Miguel Solorzano
Thank you for the feedback. I tried on 32 bit OS and I can't repeat as well.
[1 Sep 2014 10:25] Babak Bandpey
Hi,

This error is also occurring on 64-bit windows 7 machines as well and it is the latest version I have installed.

CTRL + Shift + Z makes the bug reporting screen come forward after editing the views and only views. The bug reporting screen shows up at the very end after I have confirmed that I wish to synchronize the model with the Database. After that the application is useless and must be restarted. No changes can be saved from this point forward unless restarted.

Thank for a good application anyway. I like it and that is why I report this bugs and I hope that you find a way out.
[2 Sep 2014 9:59] Umesh Shastry
Thank you for the feedback.
I'm able to reproduce this issue with 6.2 on Win7(couldn't hit this with Ubuntu 14.04 and WB 6.1.6)

15:16:11 [ERR][      Workbench]: Object reference not set to an instance of an object.
Exception = System.NullReferenceException
Message = Object reference not set to an instance of an object.
FullText = System.NullReferenceException: Object reference not set to an instance of an object.
   at MySQL.GUI.Workbench.Plugins.DbMysqlViewEditor.RefreshFormData()
   at boost.detail.function.void_function_invoker0<void (__cdecl*)(void),void>.invoke(function_buffer* function_ptr)
   at MySQL.Workbench.WbContext.edit_undo()
   at boost.detail.function.void_function_invoker0<void (__cdecl*)(void),void>.invoke(function_buffer* function_ptr)
   at mforms.MenuItem.callback(MenuItem* )
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
15:17:11 [DB1][ mforms managed]: Opening the URL: C:\Users\ushastry\AppData\Roaming\MySQL\Workbench\log\wb.log
[2 Sep 2014 10:06] Umesh Shastry
// Funny trick to trigger this issue ( instead of Shift, set CapsLock ON)

* Set CapsLock ON
* Place a view on diagram
* Double click view figure to edit the view
* Modify the statement from

CREATE VIEW `view1` AS;

to 

CREATE VIEW `view1` AS SELECT 1;

Close the view window.

* Press Ctr + z ( make sure CapsLock is ON)

^^ Above step triggers Exception, but it allows us to close pop up but later when you try to close the WB - it crashes/hangs
[15 Sep 2014 21:44] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.2.4 release, and here's the changelog entry:

On Windows, using the key combination "Control" + "Shift" + "Z" after
altering a view could cause a crash.

Thank you for the bug report.