Bug #63017 Object reference not set to an instance of an object
Submitted: 30 Oct 2011 1:30 Modified: 2 Dec 2011 10:51
Reporter: Eric Kent Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.35 CE Rev 7915 OS:Microsoft Windows (Windows 7)
Assigned to: CPU Architecture:Any

[30 Oct 2011 1:30] Eric Kent
Description:
I was renaming a layer name, and I got this:

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.PhysicalLayerEditor.RefreshFormData()
   at MySQL.GUI.Workbench.Plugins.ObjectEditorPlugin.CallRefreshFormData()
   at MySQL.GUI.Workbench.Plugins.ObjectEditorPlugin.RefreshFormDataInvoke()
   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 LayerEditorBE.set_name(LayerEditorBE* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
   at MySQL.Grt.LayerEditorBE.set_name(String name)
   at MySQL.GUI.Workbench.Plugins.PhysicalLayerEditor.nameTextBox_TextChanged(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
   at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
   at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.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:
Don't know, but I have been regularly getting errors when editing a model in workbench
[30 Oct 2011 2:23] Eric Kent
Error happened again: I was re-sizing a layer and received this error.
After I closed the bug dialog, the workbench crashed.

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.PhysicalLayerEditor.RefreshFormData()
   at MySQL.GUI.Workbench.Plugins.ObjectEditorPlugin.CallRefreshFormData()
   at MySQL.GUI.Workbench.Plugins.ObjectEditorPlugin.RefreshFormDataInvoke()
   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 wb.ModelDiagramForm.handle_mouse_button(ModelDiagramForm* , MouseButton , Boolean , Int32 , Int32 , EventState )
   at MySQL.Workbench.ModelViewForm.OnMouseUp(MouseEventArgs e, Int32 X, Int32 Y, Keys keystate, MouseButtons buttons)
   at MySQL.GUI.Workbench.ModelDiagramForm.CanvasPanel_MouseUp(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
   at MySQL.Utilities.WindowsCanvasViewerPanel.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.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)
[31 Oct 2011 10:05] Miguel Solorzano
Could you please provide the output of Help->System Info. I couldn't repeat on my Windows 7 64-bit box. Thanks.
[31 Oct 2011 12:15] Eric Kent
System Info:

MySQL Workbench CE for Windows version 5.2.35
Configuration Directory: C:\Users\Eric\AppData\Roaming\MySQL\Workbench
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.
OpenGL Driver Version: 3.1.0 - Build 8.15.10.2462
OS: Microsoft Windows 7 Home Premium Edition Service Pack 1 (build 7601), 64-bit
CPU: 4x Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz, 3.9 GiB RAM
Active video adapter: Intel(R) HD Graphics Family
Installed video RAM: 1813 MB
Current video mode: 1366 x 768 x 4294967296 colors
Used bit depth: 32
Driver version: 8.15.10.2462
Installed display drivers: igdumd64.dll,igd10umd64.dll,igd10umd64.dll,igdumdx32,igd10umd32,igd10umd32
Current user language: English (United States)

See also my other bug reports: 
Bug #63025
Bug #62951
[1 Nov 2011 10:31] Valeriy Kravchuk
Can you provide some .mwb file that you've got a problem with while changing layers in it?
[1 Nov 2011 12:57] Eric Kent
The error does not happen consistently.  It happened twice when modify layers, and the same error occurred a couple of times when moving individual tables in the diagram.  The mwb file is 142 kb.  I have been working with it full time for the past couple of weeks, making many changes.

I have not been able to reproduce the problem with a small sample model, but since it only occurs sporadically, that is not surprising.

Let me know if you still want a copy of the data model file.
[2 Nov 2011 10:51] Valeriy Kravchuk
Yes, please. Maybe models I tried to use were too simple to demonstrate the problem.
[3 Dec 2011 7:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".