Bug #63278 Memory Corrupt after connecting from NetBeans
Submitted: 16 Nov 2011 5:16 Modified: 16 Nov 2011 13:38
Reporter: Aravind Velandi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S1 (Critical)
Version:5.2.16 OS:Windows
Assigned to: CPU Architecture:Any
Tags: Connection, corrupt, database, Memory, netbeans

[16 Nov 2011 5:16] Aravind Velandi
Description:
I created connection for my PHP project to MySQL from NetBeans. I am able to access my DB only from NetBeans after that, but not from my MySQL WorkBench.
I get this message:

Exception = System.AccessViolationException
Message = Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
FullText = System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at std.basic_string<char,std::char_traits<char>,std::allocator<char> >.{ctor}(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , SByte* )
   at MySQL.Forms.UtilitiesImpl.load_passwords()
   at MySQL.Forms.UtilitiesImpl.find_password(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* service, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* account, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* password)
   at MySQL.MCallback3<bool\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > \&>.cpp_callback(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a1, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a2, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a3)
   at MySQL.Forms.DrawBoxImpl.drawbox_mouse_double_click(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
Create connection from IDE (here NetBeans) to MySQL database.
Then open the MySQL workbench and open a connection to start querying
[16 Nov 2011 10:05] Valeriy Kravchuk
Please, check if the same problem still happens with a newer version of Workbench, 5.2.35.1.
[16 Nov 2011 13:21] Aravind Velandi
I couldn't install the newer version. It says "installation ended prematurely"
[16 Nov 2011 13:38] Aravind Velandi
Please find workbench_user_data.dat in C:\Documents and Settings\aravind\Application Data\MySQL\Workbench. The file might have been corrupted.
Solution is, rename the file to anything you want. Close the instance of Workbench and reopen it after a while and there you go.
(A new file workbench_user_data.dat will be created in the same location in addition to the one that you renamed.)