Bug #38402 A large database with multiple diagrams results in memory errors
Submitted: 28 Jul 2008 12:41 Modified: 7 Aug 2008 13:21
Reporter: Kristoffer Paro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.21, 5.0.23 OS:Windows (XP Professional)
Assigned to: CPU Architecture:Any
Tags: large database, Memory, multiple diagrams

[28 Jul 2008 12:41] Kristoffer Paro
Description:
I have used the MySQL Workbench OSS version before with no problems. Recently I started to make diagrams of quite a large database (147 tables). I decided to split up the database into multiple diagrams to ease the job.

I imported the database tables from an SQL create script. When I began working on my 13th diagram, the program started to bug. Suddenly it stopped working and displayed an error message saying

"cairo error: out of memory"

If I close the error dialog, a new one appears immediately. So the only solution is to kill the program. If I restart the program I can reopen the file, but if I try to do anything, the same error will reappear.

The program does not use more than 80-100MB of memory, so the physical amount of memory installed in my computer should theoretically not be a problem.

How to repeat:
1) Import a database with _a_lot_of_ tables.
2) Start creating multiple diagrams.
[28 Jul 2008 13:24] Johannes Taxacher
Hello Kristoffer,

maybe you can try the latest release (5.0.23). If the issue applies to latest vesion too it would be great if you could supply your file (it's possible to upload files marked as 'private').

thx
[29 Jul 2008 5:36] Kristoffer Paro
I upgraded to version 5.0.23 but the problem remains. This time however, I get another error message with some technical information before I get the same "cairo error: out of memory" message as before.

The message is as following (translated to English):

************** The message of the exception **************
System.Runtime.InteropServices.SEHException: An external component has caused an exception.
   kohteessa MySQL.GUI.Mdc.BaseWindowsCanvasView.OnSizeChanged(Int32 w, Int32 h)
   kohteessa MySQL.Utilities.WindowsCanvasViewerPanel.OnSizeChanged(EventArgs e)
   kohteessa System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   kohteessa System.Windows.Forms.Control.UpdateBounds()
   kohteessa System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   kohteessa System.Windows.Forms.Control.WndProc(Message& m)
   kohteessa System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   kohteessa System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   kohteessa System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   kohteessa System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded libraries **************
mscorlib
    Library version: 2.0.0.0
    Win32 version: 2.0.50727.1433 (REDBITS.050727-1400)
    Codebase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MySQLWorkbench
    Kokoonpanon versio: 5.0.23.3198
    Win32-versio: 5.0.23.3198
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbench.exe
----------------------------------------
wb.wr
    Kokoonpanon versio: 0.0.0.0
    Win32-versio: 
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/wb.wr.DLL
----------------------------------------
grt.wr
    Kokoonpanon versio: 0.0.0.0
    Win32-versio: 
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.wr.DLL
----------------------------------------
System.Windows.Forms
    Kokoonpanon versio: 2.0.0.0
    Win32-versio: 2.0.50727.1433 (REDBITS.050727-1400)
    Koodikanta: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Kokoonpanon versio: 2.0.0.0
    Win32-versio: 2.0.50727.1433 (REDBITS.050727-1400)
    Koodikanta: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Kokoonpanon versio: 2.0.0.0
    Win32-versio: 2.0.50727.1433 (REDBITS.050727-1400)
    Koodikanta: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MySQLCsUtilities
    Kokoonpanon versio: 1.0.0.0
    Win32-versio: 1.0.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLCsUtilities.DLL
----------------------------------------
msvcm80
    Kokoonpanon versio: 8.0.50727.1433
    Win32-versio: 8.00.50727.1433
    Koodikanta: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2/msvcm80.dll
----------------------------------------
MySQLGrtShell
    Kokoonpanon versio: 1.0.0.0
    Win32-versio: 1.0.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLGrtShell.EXE
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Kokoonpanon versio: 2.2.3096.15265
    Win32-versio: 2.2.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
MySQLWorkbenchEditors
    Kokoonpanon versio: 1.0.0.0
    Win32-versio: 1.0.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbenchEditors.DLL
----------------------------------------
Aga.Controls
    Kokoonpanon versio: 1.6.0.0
    Win32-versio: 1.6.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/Aga.Controls.DLL
----------------------------------------
System.Windows.Forms.resources
    Kokoonpanon versio: 2.0.0.0
    Win32-versio: 2.0.50727.42 (RTM.050727-4200)
    Koodikanta: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fi_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
grt.helpers.be
    Kokoonpanon versio: 1.0.0.0
    Win32-versio: 1.0.0.0
    Koodikanta: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.helpers.be.DLL
----------------------------------------
mscorlib.resources
    Kokoonpanon versio: 2.0.0.0
    Win32-versio: 2.0.50727.1433 (REDBITS.050727-1400)
    Koodikanta: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
[29 Jul 2008 15:38] MySQL Verification Team
Thank you for the feedback. I have opened the project file you have provided and not crash. Is there a special instruction for?. Thanks in advance.
[30 Jul 2008 6:07] Kristoffer Paro
The problem seems to depend on some external property. This time after rebooting the computer the MySQL Workbench did not crash when I opened the file. In fact, it has not crashed yet, although I have worked with it for an hour. Earlier, merely opening the file resulted in a program crash.

If the problem was in fact an out of memory error, that error would have to be caused by some external component using up too much memory? Since a reboot helped this time. I find it strange though, since I had about 1.5GB free virtual memory all the time. Could it be a memory limitation set somewhere in software?
[5 Aug 2008 1:47] MySQL Verification Team
I guess is something related to your environment (I didn't noticed the memory usage you have mentioned). Would be nice if you are able to track what is the cause for on your side. Thanks in advance.
[7 Aug 2008 7:03] Kristoffer Paro
The cause seems to be the graphics card. The out-of-memory error is in fact the graphics card's memory running out. (It is a built-in Intel GMA 950.) When I run the program on the laptop's own screen it seems to work just fine. When I connect the external monitor with a higher resolution of 1600x1200 however, the program crashes. 

Once, I received a different error message along with the regular one:

Unknown Exception caught in c:\documents and settings\mysqldev\my documents\visual studio 2005\projects\workbench\backend\windows\wb.wr\src\Canvas.h at line 146

So I guess this is actually not a bug, but a case of insufficient hardware. Nevertheless, it could be helpful for users if the exception were catched and a slightly more friendly message were shown.

Thank you for a great program by the way. Sorry I waste your time. :)
[7 Aug 2008 12:27] MySQL Verification Team
Thank you for the feedback. To record could you please provide the output of Help->System Info?. Thanks in advance.
[7 Aug 2008 12:29] Kristoffer Paro
This is the output:

Looking for user plugins in C:\Documents and Settings\kristofferp\Application Data\MySQL\Workbench\plugins
MySQL Workbench OSS for Windows version 5.0.23
Cairo Version: 1.5.12
Rendering Mode: GDI Rendering
OpenGL Driver Version: Not Detected
OS: Windows XP
CPU: 2x Intel(R) Core(TM)2 CPU         T5600  @ 1.83GHz, 1.0 GB RAM
Video adapter info:
Adapter type: Mobile Intel(R) 945GM Express Chipset Family
Chip Type: Intel(R) GMA 950
BIOS String: Intel Video BIOS
Video Memory: 229376 KB