Bug #80786 Object reference not set to an instance, when moving a table onto an empty layer
Submitted: 17 Mar 2016 20:39 Modified: 18 Mar 2016 5:54
Reporter: Richard Pennenga Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.1.6.11834 OS:Microsoft Windows (Win7 Professional SP1)
Assigned to: CPU Architecture:Any
Tags: crash, diagram, layer, mwb

[17 Mar 2016 20:39] Richard Pennenga
Description:
MWB showed a dialog box saying "Object reference not set to an instance", and it appeared to be ready to close the application and lose my changes (it didn't as it happens).

How to repeat:
I opened an existing MWB file (created using current version, 6.1.6)
Using MWB, I forward-engineered it successfully to a Linux server.
I added a dozen new tables on the Linux instance of MySQL using "CREATE TABLE" scripted commands.
Using the same running instance of MWB, I closed the "Model" tab of the database I had fwd-engineered, and initiated "reverse-engineering" the database on the remote Linux server.
I created a new EER diagram and dragged a few tables onto it and arranged them.
I created a second EER diagram and dragged a few more tables onto it.
Using "Model->Diagram Properties and Size..." I tried to set the size of the diagram to Width==2, Height==1 - it refused - it insisted on keeping the Height at 2, even though the up/down count went down to "1" and I hit OK.
Finally I conceded defeat and went on to other things - I created a layer on this diagram, and attempted to drag a table onto the layer.

At this point I got the pop-up saying "Object reference not set to an instance".

I intend to attach two screen shots.

Note: MWB did *not* close.  In fact, after I got the dialog, I tried a fourth time to change the diagram size to 2x1 and this time it worked!

Suggested fix:
Um, don't get the exception?
[17 Mar 2016 20:40] Richard Pennenga
screen shot of error

Attachment: mwb_crash_160317.png (image/png, text), 185.33 KiB.

[17 Mar 2016 20:41] Richard Pennenga
version of MWB

Attachment: mwb_crash_version-screen_160317.png (image/png, text), 14.93 KiB.

[17 Mar 2016 20:46] Richard Pennenga
Hm, not as happy as I thought. Continuing during the same session with MWB, with the same model, I tried to drag the table off the layer, and after I clicked to select the table I got the same dialog.  Then I got it just about every time I tried to drag any table.  I quit without saving.
[18 Mar 2016 5:54] Umesh Shastry
Hello Richard,

Thank you for the report.
MySQL Workbench 6.1.6 is very old and many bugs were fixed since then. Please download and use latest GA MySQL Workbench 6.3.6, try with it and inform us if you are still having the issue with the model file and WB log.
Re-sizing issue is already noted in Bug #80730, and upgrade is to avoid the exception that you are seeing in 6.1.6. 

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Umesh