Bug #63651 Negative value for "SplitterDistance"
Submitted: 7 Dec 2011 16:32 Modified: 16 Dec 2011 16:34
Reporter: Jonas Carson Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.2.36 CE OS:Windows (XP SP3)
Assigned to: CPU Architecture:Any

[7 Dec 2011 16:32] Jonas Carson
Description:
I receive an error message when I try to connect to a database in the 'SQL Development' section of the program. Opening as a "New Connection", from the "Manage Connections", or "Edit Table Data" all result in a positive connection to the database, but fails to display the 'SQL Development' section, and results in the error message being displayed. Connecting to the Database through "Create EER Model from Existing Database" works as expected. This message occurs whether I am connected to just the single screen of my laptop at  1600 x 900 resolution AND if I am connected to both the laptop screen and a 1280 x 1024 second screen.

Error Message text:
Value of '-2' is not valid for 'SplitterDistance'. 'SplitterDistance' must be greater than 0.

I marked this as Critical since the prgram fails to prgress to the next screen  (the 'SQL Development' tab fails to open) and I am unable to complete any other actions within the connected database as a result of this error. 

How to repeat:
(Disclaimer: I am new to mySQL Workbench, and this was my first time running through the program itself. As this error is preventing me reopening the MySQL Development tab, I am unable to recreate the error) 

I had successfully opened and viewed a database within the 'SQL Development' section. I viewed various tables and schemas using the quick commands to view the table contents. I toggeled the right pane to 'off' at some point during my exploration of the 'SQL Development' section. Closed out the Workbench, and upon reopening and attempting to connect to the database in the 'MySQL Development' section, I received the aforementioned error message. 

Results of Help->System Info:
MySQL Workbench CE for Windows version 5.2.36  revision 8542
Configuration Directory: C:\Documents and Settings\****\Application Data\MySQL\Workbench
Data Directory: C:\Program Files\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
Rendering Mode: OpenGL is available on this system, so OpenGL is used for rendering.
OpenGL Driver Version: 3.0.0 - Build 6.14.10.5328
OS: Microsoft Windows XP Professional Service Pack 3 (build 2600)
CPU: 4x Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 3.4 GiB RAM
Active video adapter (0): ConfigMgr Remote Control Driver
Installed video RAM: 1024 MB
Current video mode: 1600 x 900 x 4294967296 colors
Used bit depth: 32
Driver version: NULL
Installed display drivers: igxprd32.dll
Current user language: English (United States)

Suggested fix:
Change 'SplitterDistance' error handling to reset the paramater to some accepted/default value on the error rather than preventing continuation of the user's request.
[7 Dec 2011 20:01] Jonas Carson
I was able to get the application working properly by doing the following:

1) Downloaded and Unzipped the "No Install" version of MySQL Workbench from the MySQL Download page.

2) I renamed the "MySQL" directory (located in a standard install at "C:\Documents and Settings\<username>\Application Data\") to "MySQL_BACKUP"

3) I ran the "No Install" version of the workbench which caused it to recreate the "MySQL" directory, then closed out the program.

4) From that point on, running the original installed version ran properly.

Specifically The file "~/MySQL/Workbench/wb_state.xml" seems to be causing the issue described in the bug report. To recreate the issue I replaced the "good" copy of "wb_state.xml" with a copy of a "bad" copy that I had saved, and the workbench exhibited the error. 

Here is the text of the BAD version that causes the error on my machine:
<?xml version="1.0"?>
<data grt_format="2.0" document_type="MySQL Workbench Application State" version="1.0.0">
  <value _ptr_="0F4D3DE8" type="dict">
    <value type="string" key="global:last-run-as">5.2.36</value>
    <value type="string" key="home:WBCentralCollapsedInVersion"></value>
    <value type="string" key="home:WBHomeGroupStateAdministration"></value>
    <value type="string" key="home:WBHomeGroupStateSQLDev"></value>
    <value type="int" key="mainform:height">836</value>
    <value type="int" key="mainform:left">5</value>
    <value type="int" key="mainform:outputvisible">0</value>
    <value type="int" key="mainform:top">65</value>
    <value type="int" key="mainform:width">1200</value>
    <value type="int" key="mainform:windowstate">2</value>
    <value type="int" key="model_diagram:sidebar_width">336</value>
    <value type="int" key="query_editor:output_height">200</value>
    <value type="int" key="query_editor:output_visible">1</value>
    <value type="int" key="query_editor:recordset_height">410</value>
    <value type="int" key="query_editor:sidebar_visible">1</value>
    <value type="int" key="query_editor:sidebar_width">302</value>
    <value type="int" key="query_editor:support_sidebar_visible">1</value>
    <value type="int" key="query_editor:support_sidebar_width">228</value>
  </value>
</data>

And here is a GOOD version that does not cause the error on my machine:
<?xml version="1.0"?>
<data grt_format="2.0" document_type="MySQL Workbench Application State" version="1.0.0">
  <value _ptr_="0F5BA858" type="dict">
    <value type="string" key="global:last-run-as">5.2.36</value>
    <value type="string" key="home:WBCentralCollapsedInVersion"></value>
    <value type="string" key="home:WBHomeGroupStateAdministration"></value>
    <value type="string" key="home:WBHomeGroupStateSQLDev"></value>
    <value type="int" key="mainform:height">820</value>
    <value type="int" key="mainform:left">176</value>
    <value type="int" key="mainform:outputvisible">0</value>
    <value type="int" key="mainform:top">64</value>
    <value type="int" key="mainform:width">1200</value>
    <value type="int" key="mainform:windowstate">0</value>
    <value type="int" key="query_editor:output_height">200</value>
    <value type="int" key="query_editor:sidebar_width">252</value>
    <value type="int" key="query_editor:support_sidebar_width">228</value>
  </value>
</data>
[7 Dec 2011 20:03] Jonas Carson
Good version of the wb_state.xml file that does NOT cause the error

Attachment: GOOD_wb_state.xml (text/xml), 999 bytes.

[7 Dec 2011 20:03] Jonas Carson
BAD version of wb_state.xml that DOES cause the error

Attachment: BAD_wb_state.xml (text/xml), 1.31 KiB.

[8 Dec 2011 7:21] Valeriy Kravchuk
Looks like a duplicate of Bug #63582. Please, check.