Bug #68755 DBDoc - Model Reporting has GIANT memory leak that eventually crashes MWB
Submitted: 23 Mar 2013 0:33 Modified: 28 Jun 2013 0:11
Reporter: Karl Nicoletti Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.46 SE OS:Windows (Windows 7 Pro 64Bit SP 1)
Assigned to: CPU Architecture:Any
Tags: crash, memory leaks, model reporting

[23 Mar 2013 0:33] Karl Nicoletti
Description:
In the MWB 5.2.46 SE, running 'DBDoc-Model Reporting' on a large model, eats up more and more memory, never releasing it when the report has completed. Then, when attempting to do a File->Export->Export to PNG you get this error dialog:

   +--------------------------------------------------
   | MySQL Workbench
   |--------------------------------------------------
   | X   Export to PNG
   |
   |     Error creating cairo context: out of memory.
   |
   |                            Close
   +---------------------------------------------------

Clicking "Close" closed the error dialog.  Trying to generate another PNG or PDF 
results in the same dialog.  If you try to run another report, then the program eventually crashes issuing this error dialog

   +--------------------------------------------------
   | MySQL Workbench
   |--------------------------------------------------
   |[\]  MySQL Workbench has stopped working
   |
   |     A problem cause the program to stop working
   |     correctly. Please close the program.
   |
   |       => Close the program
   |
   +--------------------------------------------------

How to repeat:
Window 7 64bit SP1
4GB RAM

To Reproduce:
   1) Load the attached model file.
   2) Select Model->DBDoc-Model Reporting
   3) Select a folder for the report files.
   4) Click "Generate"

When the report finishes...

   a) Select File->Export->Export as PNG
   b) BAM! "cairo context" error

Now let's just crash and burn the whole thing...

   i) Select Model->DBDoc-Model Reporting
  ii) Select a folder for the report files.
 iii) Click "Generate"
  iv) BAM! "MySQL Workbench has stopped working" error
[25 Mar 2013 19:36] Karl Nicoletti
Screen shot of the Win7 resource monitor following DBDoc generation.

Attachment: PostReportGeneration.doc (application/msword, text), 91.50 KiB.

[27 Mar 2013 17:41] MySQL Verification Team
memory message

Attachment: wb_memory.png (image/png, text), 47.75 KiB.

[27 Mar 2013 17:42] MySQL Verification Team
Thank you for the bug report. Verified as described.
[28 Jun 2013 0:11] Philip Olson
Fixed as of the upcoming MySQL Workbench 6.0.3 release, and here's the changelog entry:

Executing "Model", "DBDoc", "Model Reporting" created a memory link. Then
after the report was generated, executing "File", "Export", "Export as
PNG" would fail and report that MySQL Workbench ran out of memory.

Thank you for the bug report.