Bug #51212 cairo error: out of memory when opening existing ERR file
Submitted: 16 Feb 2010 16:49 Modified: 25 May 2010 15:58
Reporter: Clayton Tong Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.16 OS:Windows (32-bit XP)
Assigned to: CPU Architecture:Any
Tags: Cairo, error, Memory

[16 Feb 2010 16:49] Clayton Tong
Description:
Program crashes when attempting to add an ERR Diagram to an existing model.

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at MySQL.GUI.Mdc.BaseWindowsCanvasView.OnSizeChanged(Int32 w, Int32 h)
   at MySQL.Utilities.WindowsCanvasViewerPanel.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   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)

How to repeat:
open the ERR Model in question, go to MySQL Model tab, in the ERR Diagrams pane, click on Add Diagram
[16 Feb 2010 16:50] Clayton Tong
EER file that contains the problem

Attachment: GPS-DS.mwb (application/x-zip-compressed, text), 54.91 KiB.

[16 Feb 2010 16:59] Clayton Tong
for the given file, this happens all the time - it makes this file unusable.
[16 Feb 2010 17:15] Clayton Tong
file with problem that was successfully removed

Attachment: GPS-DS-broken.mwb (application/x-zip-compressed, text), 54.46 KiB.

[16 Feb 2010 17:18] Clayton Tong
2nd file, GPS-DS-broken.mwb, contains an FK with an invalid column definition; upon opening, WB says it successfully recovered from this error.  After this point, the 'cairo error: out of memory' problem was observed.  The 'out of memory' error is now routinely gotten whenever the GPS-DS.mwb file is opened per the original bug directions.
[16 Feb 2010 17:58] MySQL Verification Team
I couldn't repeat with both model files attached, below is my machine system info, please print yours. Thanks in advance.

MySQL Workbench OSS for Windows version 5.2.15
Cairo Version: 1.8.8
Rendering Mode: OpenGL requested (create a diagram to confirm)
OpenGL Driver Version: 3.2.9232
OS: Microsoft Windows Vista Ultimate Edition Service Pack 2 (build 6002), 64-bit
CPU: 4x AMD Phenom(tm) 9650 Quad-Core Processor, 7.8 GiB RAM
Video adapter info:
Adapter type: 
Chip Type: ATI display adapter (0x9610)
BIOS String: BK-ATI VER010.087.000.001.000000
Video Memory: 262144 KB
[16 Feb 2010 18:35] Clayton Tong
initial error conditions

Attachment: GPS-DS-start.mwb (application/x-zip-compressed, text), 48.57 KiB.

[16 Feb 2010 18:39] Clayton Tong
I have recreated the problem going back to the beginning.  I have added another file - GPS-DS-start.mwb.  This should be a clean, good file with no history of problems or errors.  However, when I attempt to Add an EER Diagram (from MySQL Model tab, double click on Add Diagram icon), I always get the error popup - external component has thrown an exception and the following:

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at MySQL.GUI.Mdc.BaseWindowsCanvasView.OnSizeChanged(Int32 w, Int32 h)
   at MySQL.Utilities.WindowsCanvasViewerPanel.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   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)

followed by the cairo error: out of memory.

I am running on the following machine:

MySQL Workbench OSS for Windows version 5.2.15
Cairo Version: 1.8.8
Rendering Mode: GDI requested (create a diagram to confirm)
OpenGL Driver Version: Not Detected
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 2x Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz, 3.3 GiB RAM
Video adapter info:
Adapter type: NVIDIA Quadro NVS 290
Chip Type: Quadro NVS 290
BIOS String: Version 60.86.6C.00.21
Video Memory: 262144 KB
[17 Feb 2010 15:59] MySQL Verification Team
I still can't repeat. Could you please try 5.2.16 released version?. Thanks in advance.
[18 Feb 2010 16:29] Clayton Tong
I have upgraded to 5.2.16; when I open GPS-DS-start.mwb, I get the following error as the file is read:

Exception = System.Runtime.InteropServices.SEHException
Message = External component has thrown an exception.
FullText = System.Runtime.InteropServices.SEHException: External component has thrown an exception.
   at MySQL.GUI.Mdc.BaseWindowsCanvasView.OnSizeChanged(Int32 w, Int32 h)
   at MySQL.Utilities.WindowsCanvasViewerPanel.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   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)

after copying above to clipboard and continueing, I get an error popup with:
"Unknown Exception caught in c:\documents and settings\mysqldev\build\mysql-workbench-oss-5.2.16\backend\windows\wbprivate.wr\src\Wb.h at line 1087"
After clickin OK to dismiss this popup, I am left in MySQL Model tab of WB, completely blank (grey); if I click on Home tab, Home is displayed as expected; if I click back to MySQL Model tab, contents displayed as expected with all tables that were in mwb file and the 4 eer diagrams as well.  Note that diagrams were not automatically opened in a tab as per normal.  attempting to double click any of the eer diagrams results in "cairo error: out of memory".
[18 Feb 2010 16:31] Clayton Tong
the versions that were run for the previous post were:

MySQL Workbench OSS for Windows version 5.2.16
Cairo Version: 1.8.8
Rendering Mode: GDI requested (create a diagram to confirm)
OpenGL Driver Version: Not Detected
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 2x Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz, 3.3 GiB RAM
Video adapter info:
Adapter type: NVIDIA Quadro NVS 290
Chip Type: Quadro NVS 290
BIOS String: Version 60.86.6C.00.21
Video Memory: 262144 KB
[19 Feb 2010 10:51] Susanne Ebrecht
Do you use 64 bit windows or 32 bit windows?
[22 Feb 2010 18:21] Clayton Tong
This problem is on a 32-bit Windows XP machine
[25 Apr 2010 15:58] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behavior on 32-bit Vista. Please try with current version 5.2.19 and inform us if problem still exists.
[25 May 2010 23: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".