Bug #32328 Clicking the "Save Model" icon crashes Workbench
Submitted: 13 Nov 2007 17:00 Modified: 10 Mar 2008 12:01
Reporter: Peter Lavin Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.8 beta OS:Microsoft Windows (XP)
Assigned to: Sergei Tkachenko
Tags: model, save model

[13 Nov 2007 17:00] Peter Lavin
Clicking the "Save Model" icon crashes Workbench.

How to repeat:
Click the "Save Model" icon on the upper left. The application crashes. Here's the Windows error message:

EventType : BEX     P1 : MySQLWorkbench.exe     P2 :     
P3 : 472a5847     P4 : mscorwks.dll     P5 : 2.0.50727.832     P6 : 461f2e2a
P7 : 0021e171     P8 : c0000409     P9 : 00000000  

The following files are also created:


I can supply these files if they are of use.

This is similar to bugs:
#27414  	Workbench - Open Model, Application Freeze and
#31873  	WB crash and/or hangs on Model -> Reporting...
[13 Nov 2007 17:11] Alfredo Kojima
I am unable to repeat this, can you provide more info like what do you do
before pressing the Save icon? Does saving from the File menu work?
[13 Nov 2007 17:31] Peter Lavin
It seems that canceling the action rather than actually saving the model is what triggers the crash.
[13 Nov 2007 18:33] Johannes Taxacher
verified in 5.0.8 beta

apples to save-icon and save in filemenu (not to "save as")
[13 Nov 2007 21:19] Andrii Nikitin
able to reproduce on local release rev. 2112. (w/o debugger attached)
debug version doesn't crash.
[13 Nov 2007 21:29] Andrii Nikitin
after adding debug info into wb.be.dll got this piece of stack:
>	wb.be.dll!wb::WBContext::RefreshRequest::RefreshRequest(const wb::WBContext::RefreshRequest & __that={...})  + 0x24 bytes	C++
 	wb.be.dll!std::list<wb::WBContext::RefreshRequest,std::allocator<wb::WBContext::RefreshRequest> >::max_size()  Line 610	C++
 	wb.be.dll!std::list<wb::WBContext::RefreshRequest,std::allocator<wb::WBContext::RefreshRequest> >::_Incsize(unsigned int _Count=0)  Line 1211 + 0x8 bytes	C++
 	wb.be.dll!sigc::slot3<void,enum wb::RefreshType,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,__int64>::operator()(const wb::RefreshType & _A_a1=RefreshMenubar, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _A_a2="", const __int64 & _A_a3=0)  Line 674 + 0x1c bytes	C++
 	wb.be.dll!wb::WBContext::flush_idle_tasks()  Line 723 + 0x2f bytes	C++

seems that WBContext::_pending_refreshes contains std::string members which are trying to share access to character array.
It is usual problem when several copies of std::string are shared between threads and they have reference counting problems.

Will try ti rewrite that piece of code to avoid std::string common buffer sharing problem.
[10 Mar 2008 12:01] Sergei Tkachenko
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.