Bug #36355 Forward Engineer SQL ALTER Script causes unhandled exception
Submitted: 26 Apr 2008 0:21 Modified: 10 Jul 2008 8:08
Reporter: Rob Conrad Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.21 r3111 OS:Windows (XP SP2)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: SQL ALTER Script, sync, Synch, synchronization

[26 Apr 2008 0:21] Rob Conrad
Description:
When Forward Engineer SQL ALTER Script is run it causes the following error:

"ALTER Script Generation (Script Synchronization)"

With the following error text:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at DbMySQLScriptSync.init_diff_tree(DbMySQLScriptSync* , MYX_GRT_VALUE* , MYX_GRT_VALUE* )
at MySQL.GUI.Workbench.Plugins.DbMySQLScriptSync.DbMySQLScriptSync.init_diff_tree(GrtValue cat1, GrtValue cat2)
at MySQL.GUI.Workbench.Plugins.Sync.DiffTreeControl.InitializeDiffTree(GrtValue catalog1, GrtValue catalog2)
at MySQL.GUI.Workbench.Plugins.Sync.DiffTreeControl..ctor(DbMySQLScriptSync be, GrtValue catalog1, GrtValue catalog2)
at MySQL.GUI.Workbench.Plugins.DbMySQLScriptSync.SQLScriptSyncWizardPages.InitTreePage()
at MySQL.GUI.Workbench.Plugins.WizardPlugin.InitializeActivePage()
at MySQL.GUI.Workbench.Plugins.WizardPlugin.UpdateAfterPageProcessing(String errMsg)
at MySQL.GUI.Workbench.Plugins.WizardPlugin.RestoreControlsState(String errMsg)
at MySQL.GUI.Workbench.Plugins.WizardPlugin.GoToNextPage()
at MySQL.GUI.Workbench.Plugins.WizardPlugin.btnNext_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
MySQLWorkbench
Assembly Version: 5.0.19.3067
Win32 Version: 5.0.19.3067
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbench.exe
----------------------------------------
wb.wr
Assembly Version: 0.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/wb.wr.DLL
----------------------------------------
grt.wr
Assembly Version: 0.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.wr.DLL
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
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.832 (QFE.050727-8300)
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.832 (QFE.050727-8300)
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/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLCsUtilities.DLL
----------------------------------------
msvcm80
Assembly Version: 8.0.50727.762
Win32 Version: 8.00.50727.762
CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700/msvcm80.dll
----------------------------------------
MySQLGrtShell
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLGrtShell.EXE
----------------------------------------
WeifenLuo.WinFormsUI.Docking
Assembly Version: 2.2.3026.40768
Win32 Version: 2.2.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
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.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MySQLWorkbenchEditors
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/MySQLWorkbenchEditors.DLL
----------------------------------------
Aga.Controls
Assembly Version: 1.6.0.0
Win32 Version: 1.6.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/Aga.Controls.DLL
----------------------------------------
grt.helpers.be
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.helpers.be.DLL
----------------------------------------
db.mysql.editors.wbp.fe
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.editors.wbp.fe.DLL
----------------------------------------
db.mysql.editors.wbp.wr
Assembly Version: 0.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.editors.wbp.wr.DLL
----------------------------------------
grt.db.wr
Assembly Version: 0.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/grt.db.wr.DLL
----------------------------------------
ScintillaNet
Assembly Version: 2.0.3026.39852
Win32 Version: 2.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/ScintillaNet.DLL
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
db.mysql.wbp.fe
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.wbp.fe.DLL
----------------------------------------
db.mysql.wbp.wr
Assembly Version: 0.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files/MySQL/MySQL%20Workbench%205.0%20OSS/db.mysql.wbp.wr.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

How to repeat:
Run Forward Engineer SQL ALTER Script
[28 Apr 2008 16:33] MySQL Verification Team
Thank you for the bug report. Could you please try with new 5.0.21 version
and if you still have the same issue could you please provide the file
project model which cause the crash. Thanks in advance.
[28 Apr 2008 18:16] Rob Conrad
Reproduced on latest (3111). Added offending model file and the create script it fails to generate alter statements from.
[11 Jun 2008 13:22] Johannes Taxacher
the fix for this will go into next release (5.0.23).

Source of the problem was an empty schema name. The Access Violation in this case is fixed, but unfortunately we're not able to point the user to the problem with a specific error msg. Instead only a generic MsgBox reading "invalid object name" is displayed.

We agreed on taking better care of such case by adding additional validation in WB version 5.1
[10 Jul 2008 8:08] Tony Bedford
An entry has been added to the 5.0.23 changelog:

When File, Export, Forward Engineer SQL ALTER Script menu item is selected it causes an ALTER Script Generation (Script Synchronization) error.