Bug #35159 Deleting relationships causes exceptions (sooner or later)
Submitted: 8 Mar 2008 1:19 Modified: 8 Mar 2008 8:01
Reporter: Markus Fischer Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.0.14 OS:Windows (XP Pro SP2)
Assigned to: CPU Architecture:Any
Tags: 5.0.14, delete relationship, regression, workbench

[8 Mar 2008 1:19] Markus Fischer
Description:
For all the examples below, the following setup applies:
* "table1" with column "idtable1" non-null primary key
* "table2" with column "idtable2" non-null primary key

During the tests it also occurred that the application was no longer visibly running but still the Windows Task-Manager showed a MySQLWorkbench.exe process running which had to be terminated manually.

Attached is the test.wbm file used.

How to repeat:
(After all the testing, these two are really just examples. Any deletion of relationships causes exception sooner or later).

Select "1:n non-identifying relationship", click on table1 and then on table2. Right-click on newly created relationship and select delete. Select "Yes" when asked to delete columns used by the foreign key. A message appears "Unknown Exception caught in c:\dokuments and settings\mysqldev\my documents\visual studio 2005\projects\mysql-workbench-pro\backend\windows\wb.wr\src\Canvas.h at line 146". The application is unstable from now on.

Select "1:n non-identifying relationship", click on table1 and then on table2. Right-click on newly created relationship and select delete. Select "No" when asked to delete columns used by the foreign key. When dragging table2, a message appears with title "test.mwb* - MySQL Workbench" and message (translater rom german) "Uncaught exception in application. Click "continue" to ignore the error and continue working. Click "exit" to quit the application. The application tried to read or write to a protected memory. The "details" button reveals the following (copy & paste):

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
   bei mdc.CanvasView.handle_mouse_move(CanvasView* , Int32 , Int32 , EventState )
   bei MySQL.GUI.Mdc.BaseWindowsCanvasView.OnMouseMove(MouseEventArgs e, Keys keystate, MouseButtons buttons)
   bei MySQL.Utilities.WindowsCanvasViewerPanel.OnMouseMove(MouseEventArgs e)
   bei System.Windows.Forms.Control.WmMouseMove(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Geladene Assemblys **************
mscorlib
    Assembly-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
    Assembly-Version: 5.0.14.2649.
    Win32-Version: 5.0.14.2649.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/MySQLWorkbench.exe.
----------------------------------------
wb.wr
    Assembly-Version: 0.0.0.0.
    Win32-Version: .
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/wb.wr.DLL.
----------------------------------------
grt.wr
    Assembly-Version: 0.0.0.0.
    Win32-Version: .
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/grt.wr.DLL.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.1433 (REDBITS.050727-1400).
    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.1433 (REDBITS.050727-1400).
    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.1433 (REDBITS.050727-1400).
    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:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/MySQLCsUtilities.DLL.
----------------------------------------
msvcm80
    Assembly-Version: 8.0.50727.1433.
    Win32-Version: 8.00.50727.1433.
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2/msvcm80.dll.
----------------------------------------
MySQLGrtShell
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/MySQLGrtShell.EXE.
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.0.0.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/WeifenLuo.WinFormsUI.Docking.DLL.
----------------------------------------
System.Xml
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.1433 (REDBITS.050727-1400).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
mscorlib.resources
    Assembly-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.
----------------------------------------
System.Configuration
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.1433 (REDBITS.050727-1400).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
MySQLWorkbenchEditors
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/MySQLWorkbenchEditors.DLL.
----------------------------------------
Aga.Controls
    Assembly-Version: 1.6.0.0.
    Win32-Version: 1.6.0.0.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/Aga.Controls.DLL.
----------------------------------------
grt.helpers.be
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Dokumente%20und%20Einstellungen/mfischer/Desktop/MySQL%20Workbench%205.0.14%20OSS%20Beta/grt.helpers.be.DLL.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.42 (RTM.050727-4200).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

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

Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
[8 Mar 2008 1:20] Markus Fischer
Test file with two tables each with non-null primary keys

Attachment: test.mwb (application/octet-stream, text), 3.98 KiB.

[8 Mar 2008 1:21] Markus Fischer
Added relationship tag.
[8 Mar 2008 6:12] Valeriy Kravchuk
Duplicate of bug #34816.
[8 Mar 2008 8:01] Markus Fischer
Synced tags with bug #34816.