Bug #60086 MySQL Workbench does not work while the creation of new server instance
Submitted: 10 Feb 2011 12:50 Modified: 17 Mar 2011 7:59
Reporter: chris doula Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.31 OS:Microsoft Windows (2008 R1 SP2)
Assigned to: CPU Architecture:Any
Tags: attempt, Memory, protected, read, workbench, write

[10 Feb 2011 12:50] chris doula
Description:
When I create a new server instance, an error occured during the wizard form : "MySQL Workbench has encountered a problem Attempt to read or write protected memory.".

Here my report bug :

Exception = System.AccessViolationException
Message = Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée.
FullText = System.AccessViolationException: Tentative de lecture ou d'écriture de mémoire protégée. Cela indique souvent qu'une autre mémoire est endommagée.
   à std.basic_string<char,std::char_traits<char>,std::allocator<char> >.c_str(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
   à MySQL.?A0x4861a96a.CppStringToNative(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str)
   à MySQL.Forms.TextEntryImpl.set_text(TextEntry* self, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* text)
   à MySQL.MCallback2<void\,mforms::TextEntry \*\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&>.cpp_callback(TextEntry* a1, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a2)
   à sigc.internal.signal_emit0<void,sigc::nil>.emit(signal_impl* impl)
   à sigc.signal0<void,sigc::nil>.emit(signal0<void\,sigc::nil>* )
   à mforms.Wizard.next_clicked(Wizard* )
   à MySQL.Forms.WizardImpl.nextClick(Object sender, EventArgs arguments)
   à System.Windows.Forms.Control.OnClick(EventArgs e)
   à System.Windows.Forms.Button.OnClick(EventArgs e)
   à System.Windows.Forms.Button.WndProc(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
1) Run as administrator
2) New server instance
Specify host machine :
 Click on 'localhost' option
 Next
Database connection :
 Hostname : localhost
 Port : 3306
 Username : root
 Next
Testing the Database Connection
 "Database connection tested successfully"
 Next
Error Dialog appears => MySQL Workbench has encountered a problem Attempt to read or write protected memory.
[10 Feb 2011 12:57] Valeriy Kravchuk
Do you have a Windows service created for local MySQL server?
[10 Feb 2011 13:09] chris doula
yes I have a Windows service for the local MySQL server.
The version of Mysql is "5.0.68-enterprise-nt-log"
[10 Feb 2011 16:48] MySQL Verification Team
I couldn't repeat please provide the output of Help->System Info.
[10 Feb 2011 16:51] Alfredo Kojima
whats the name of your MySQL service?
[14 Feb 2011 16:03] chris doula
"I couldn't repeat please provide the output of Help->System Info."
Configuration Directory: D:\Documents and Settings\xxxxxx\Application Data\MySQL\Workbench
Data Directory: C:\Program Files\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
Rendering Mode: OpenGL is not available on this system, so GDI is used for rendering.
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 2x Intel(R) Core(TM)2 CPU         T5500  @ 1.66GHz, 3.0 GiB RAM
Active video adapter: Mobile Intel(R) 945GM Express Chipset Family
Installed video RAM: 224 MB
Current video mode: 1280 x 800 x 4294967296 couleurs
Used bit depth: 32
Driver version: 6.14.10.4814
Installed display drivers: igxprd32.dll
Current user language: Français (France)

"whats the name of your MySQL service?"
The service name :  "Windows Database"
[15 Feb 2011 8:51] Valeriy Kravchuk
It's a display name, probably. Please, check in Services what exact service name is used. I need it to check the details on this service with "sc qc" command.
[15 Feb 2011 10:48] chris doula
C:\>sc qc "Windows Database"
[SC] GetServiceConfig SUCCESS

SERVICE_NAME: Windows Database
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\Tools\Wrapper\wrapper.exe -s C:\Database\service\dbservice.properties
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : Windows Database
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem
[15 Feb 2011 14:54] Valeriy Kravchuk
Why do you think this is a service for MySQL server? This is how it looks like, when created by configuration wizard:

C:\Program Files\MySQL\MySQL Server 5.1\bin>sc qc MySQL55
[SC] GetServiceConfig SUCCESS

SERVICE_NAME: MySQL55
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld
" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL55
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : MySQL55
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

MySQL server is usually mysqld.exe or mysqld-nt.exe process. Nothing in common with your service.
[16 Feb 2011 8:59] chris doula
"Why do you think this is a service for MySQL server?"
Because I have created the service through the wrapper.
Which link between the problem and the service ? Workbench do not check only the port ?
[16 Feb 2011 10:34] MySQL Verification Team
The issue exists when you use a service created with the MySQL installer?. Thanks in advance.
[16 Feb 2011 23:39] chris doula
It's a windows service created by myself.
[17 Feb 2011 7:59] Valeriy Kravchuk
Workbench does check --default-file used by service:

--defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini

and thy to parse it. If it can not find one, it crashes (in 5.2.31). This is a know bug, bug #59578. In your case (some) service exists, but it is created in such a way that it is impossible to get --default-file from the command line.

I think this is a duplicate of bug #59578. I tried to prove it with my previous questions.
[18 Mar 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".