Bug #50613 File > Page Setup > Exception: System.AccessViolation
Submitted: 26 Jan 2010 4:34 Modified: 27 Jan 2010 12:56
Reporter: Roman Hultay Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:5.2.14 OS:Microsoft Windows (Windows 7)
Assigned to: CPU Architecture:Any
Tags: printing, workbench

[26 Jan 2010 4:34] Roman Hultay
Description:
When accessing Page Setup from the File Menu, the following error message is displayed by JIT:

************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at grt.Ref<grt::internal::String>.{ctor}(Ref<grt::internal::String>* , Ref<grt::internal::String>* )
   at GrtObject.name(GrtObject* , Ref<grt::internal::String>* )
   at MySQL.Workbench.PageSettings..ctor(Ref<app_PageSettings>* settings)
   at MySQL.Workbench.WbContext.get_page_settings()
   at MySQL.GUI.Workbench.PageSettingsForm.PageSettingsForm_Shown(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnShown(EventArgs e)
   at System.Windows.Forms.Form.CallShownEvent()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MySQLWorkbench
    Assembly Version: 5.2.14.4990
    Win32 Version: 5.2.14.4990
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/MySQLWorkbench.exe
----------------------------------------
wbprivate.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/wbprivate.wr.DLL
----------------------------------------
wbpublic.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/wbpublic.wr.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
MySQLCsUtilities
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/MySQLCsUtilities.DLL
----------------------------------------
msvcm90
    Assembly Version: 9.0.30729.4926
    Win32 Version: 9.00.30729.4926
    CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a/msvcm90.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.2.3672.32280
    Win32 Version: 2.2.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
WbPlugins
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/WbPlugins.DLL
----------------------------------------
Aga.Controls
    Assembly Version: 1.6.0.0
    Win32 Version: 1.6.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/Aga.Controls.DLL
----------------------------------------
grt.db.fe
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/grt.db.fe.DLL
----------------------------------------
wb.updater.wbp.fe
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/wb.updater.wbp.fe.DLL
----------------------------------------
wb.updater.wbp.wr
    Assembly Version: 0.0.0.0
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files%20(x86)/MySQL/MySQL%20Workbench%205.2%20OSS/wb.updater.wbp.wr.DLL
----------------------------------------

How to repeat:
Load MySQL Workbench
 - File > Page Setup

Suggested fix:
(shrug)
[26 Jan 2010 6:48] Perry Cappadocia
windows xp pro sp3
Page setup seems to throw an exception when page setup is selected, but no model is currently open.
Case 1: Start WB, do not select a model, try page setup -> exception.
Case 2: Start WB, open a model, try page setup -> OK, close model tab, try page setup -> exception.
[27 Jan 2010 12:56] Alfredo Kojima
This is a duplicate of bug #49488