Bug #66776 Workbench 5.2.38-40 - segmentation fault on startup, possibly due to parsing err
Submitted: 11 Sep 2012 19:45 Modified: 14 Jan 2013 18:59
Reporter: Andrew Mao Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.42 OS:Linux (Ubuntu 12.04 x64)
Assigned to: CPU Architecture:Any
Tags: parser error, segmentation fault

[11 Sep 2012 19:45] Andrew Mao
Description:
My MySQL workbench didn't close properly on exit for some reason (I got the message in Ubuntu "This application didn't close properly, yadda yadda, do you want to restart it"). This seemed to result in some config files being written improperly.

Since then, workbench segfaults whenever I tried to start it. I updated from 5.2.38 to 5.2.40 on someone's PPA, and the same error occurs. Core dump is attached. All the files shown in the errors at the beginning are empty.

I removed the 4 files and workbench started properly, although now it complains about other files being empty. The files that were messed up now have proper XML in them.

How to repeat:
Create the following empty files (touch if not exist) in ~/.mysql/workbench. (Remove contents if they already exist).

wb_state.xml
wb_options.xml
starters_settings.xml
user_starters.xml

Try to start workbench. Guaranteed segfault for me. (Ubuntu 12.04 LTS x64, Workbench 5.2.38 or 5.2.40; I bet 5.2.42 would do it too, but not tested.)

Suggested fix:
Not sure what is causing this problem. How can a parser error cause a segfault? I suppose it's up to the developers to figure it out.
[11 Sep 2012 19:45] Andrew Mao
Segfault showing errors before crash.

Attachment: workbench.dump (application/octet-stream, text), 63.86 KiB.

[11 Sep 2012 19:46] Andrew Mao
Starts properly after removing problem files,but similar errors for other files.

Attachment: workbench-started.dump (application/octet-stream, text), 377 bytes.

[11 Sep 2012 20:07] MySQL Verification Team
Please try version 5.2.42. Thanks.
[11 Sep 2012 20:16] Andrew Mao
Confirmed on 5.2.42 Ubuntu x64 .deb package. dump attached.

Attachment: workbench-5.2.42.dump (application/octet-stream, text), 64.87 KiB.

[12 Sep 2012 15:59] MySQL Verification Team
If you remove these *.xml files assuming their corruption the application starts without crash?. Thanks.
[12 Sep 2012 16:49] Andrew Mao
Yes, remove them and it starts.

They are not corrupted, they are just 0-byte files. They probably became that way because they were opened for writing but the something happened that caused workbench to crash before anything was written. Further starts then result in the segfault.
[13 Sep 2012 13:51] MySQL Verification Team
Thank you for the feedback.
[14 Jan 2013 18:59] Philip Olson
Fixed as of the upcoming MySQL Workbench 5.2.46, and here's the changelog entry:

MySQL Workbench could crash (segmentation fault) at startup if a configuration
file was corrupt.

Thank you for the bug report.