Bug #47534 Workbench always crashes on startup
Submitted: 23 Sep 2009 7:20 Modified: 14 Oct 2009 16:47
Reporter: The Assimilator Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.2.3 Alpha/Revision 3880 OS:Windows (XP Pro SP2)
Assigned to: Johannes Taxacher CPU Architecture:Any

[23 Sep 2009 7:20] The Assimilator
When attempting to run Workbench, the splash screen appears and then the app immediately crashes (gives the "Send error report to Microsoft" dialog). I debugged it with Visual Studio 2008 and found it's throwing a TypeLoadException:

Could not load type 'WeifenLuo.WinFormsUI.Docking.ActiveDocumentClosingEventArgs' from assembly 'WeifenLuo.WinFormsUI.Docking, Version=2.2.3428.40956, Culture=neutral, PublicKeyToken=null'.

I inspected that assembly (in the MySQL install directory) with .NET Reflector and verified that there is no type called "ActiveDocumentClosingEventArgs" defined.

How to repeat:
Download and (attempt to) run the latest available version of MySQL Workbench (5.2.3 Alpha, Revision 3880 at the time of this writing).

Suggested fix:
Test products before you release them. Yes, I know this is an alpha release, but if you're going to provide downloadable binaries, ensure that they actually work.
[23 Sep 2009 7:27] Valeriy Kravchuk
Thank you for the problem report. Is it 64-bit XP?
[23 Sep 2009 7:55] The Assimilator
32-bit XP.
[23 Sep 2009 8:02] Peter Laursen
There are already verified reports like this I think, when 5.23 is installed on top of 5.22. So I think you should tell if an earlier 5.2x version was installed before.
[23 Sep 2009 8:31] Valeriy Kravchuk
Please, reply to Peter's question: did you have older version of WB 5.2.x on this box?

I have no problem like this on 32-bit XP where 5.2.3 was the first 5.2.x version installed.
[23 Sep 2009 9:12] The Assimilator
Yes, I installed this version over 5.2.1 Alpha, Revision 5969. Must older versions be uninstalled to prevent compatibility issues? If so, you should add a note to that effect to the Workbench Download page.
[23 Sep 2009 9:17] Mike Lischke
ActiveDocumentClosingEventArgs was recently added and I just checked that it is included in the assembly (and indeed it is). So there seems to be a problem with replacing this dll. However, I used the no-install zip for verification. Perhaps the msi installer does not replace the dll? Can you manually replace the DLL (take the one from the zip package)? Please also let us know which version the assembly has.

In the zip file the version is 2.2.3541.34468, so yours should be the same (or newer, but since the zip package and the msi are created from the same bin folder there shouldn't be any difference).

Thank you, also for the excellent debug help. Very useful info indeed.
[23 Sep 2009 9:35] The Assimilator
Downloaded the noinstall ZIP as per Mike's advice. I then compared the hashcodes of the separate files with interesting results:

C:\Program Files\MySQL\MySQL Workbench 5.2 OSS>php -r "echo sha1_file('WeifenLuo.WinFormsUI.Docking.dll');"

C:\Downloads\workbench-noinstall>php -r "echo sha1_file('WeifenLuo.WinFormsUI.Docking.dll');"

C:\Program Files\MySQL\MySQL Workbench 5.2 OSS>php -r "echo sha1_file('MySQLWorkbench.exe');"

C:\Downloads\workbench-noinstall>php -r "echo sha1_file('MySQLWorkbench.exe');"

Based on that, I copied the contents of the noinstall ZIP over the folder in C:\Program Files. Workbench is running fine now! :D

The Workbench version in the noinstall ZIP is 5.2.3 Alpha/Revision 3901, as opposed to the MSI which is at r3880. So the fix for this bug is simple: update the downloadable MSI installer to use the contents of the noinstall ZIP.
[13 Oct 2009 12:56] Johannes Taxacher
fixed msi script to always replace already installed files with new ones shipped in package.
fix will be included in 5.2.5
[14 Oct 2009 16:47] Tony Bedford
An entry was added to the 5.2.5 changelog:

When attempting to run MySQL Workbench, the splash screen appeared and then the application immediately crashed, generating the “Send error report to Microsoft” dialog. On debugging it was found that MySQL Workbench was throwing a TypeLoadException:

Could not load type 'WeifenLuo.WinFormsUI.Docking.ActiveDocumentClosingEventArgs' from
assembly 'WeifenLuo.WinFormsUI.Docking, Version=2.2.3428.40956, Culture=neutral,

On inspection of the referenced assembly it was confirmed that there was no type ActiveDocumentClosingEventArgs defined.
[27 Nov 2009 18:05] Johannes Taxacher
Bug #47480 was marked as duplicate of this one.