Bug #67446 Synchronize model and enum type
Submitted: 1 Nov 2012 9:13 Modified: 12 Mar 2013 13:46
Reporter: Valter Kungla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.44 OS:MacOS (Darwin 12.2.0)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[1 Nov 2012 9:13] Valter Kungla
Description:
enum type field differenses with indexes cause MySQLWorkbench to crash when synchronizing with model

----- Developer Notes -----

MySQL Workbench CE for Mac OS X version 5.2.44  revision 9933
Configuration Directory: /Users/kungla/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
Cairo Version: 1.9.1
OS: Darwin 12.2.0
CPU: 8x Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz, 4.0 GB RAM

Process:         MySQLWorkbench [5459]
Path:            /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
Identifier:      com.oracle.mysql.workbench
Version:         5.2.44 (1)
Code Type:       X86 (Native)
Parent Process:  launchd [852]
User ID:         501

Date/Time:       2012-11-01 11:04:13.320 +0200
OS Version:      Mac OS X 10.8.2 (12C60)
Report Version:  10

Interval Since Last Report:          545774 sec
Crashes Since Last Report:           47
Per-App Interval Since Last Report:  83317 sec
Per-App Crashes Since Last Report:   26
Anonymous UUID:                      B795CC1F-9A52-2D21-D04D-2C5750DA3A92

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000008

VM Regions Near 0x8:
--> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- SM=NUL  /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
    __TEXT                 0000000000001000-0000000000086000 [  532K] r-x/rwx SM=COW  /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench

Application Specific Information:
Performing @selector(performNext:) from sender NSButton 0x10399e00

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libgrt.dylib                  	0x003928bb grt::internal::Object::set_member(std::string const&, grt::ValueRef const&) + 9
1   db.mysql.wbp.dylib            	0x0c54bf8b ChangesApplier::apply_change_to_model(boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject>) + 527
2   db.mysql.wbp.dylib            	0x0c54ebf2 boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >::operator()(ChangesApplier*, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject>) const + 86
3   db.mysql.wbp.dylib            	0x0c54eb46 void boost::_bi::list3<boost::_bi::value<ChangesApplier*>, boost::arg<1>, boost::_bi::value<grt::Ref<GrtNamedObject> > >::operator()<boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >, boost::_bi::list1<boost::shared_ptr<grt::DiffChange> const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >&, boost::_bi::list1<boost::shared_ptr<grt::DiffChange> const&>&, int) + 78
4   db.mysql.wbp.dylib            	0x0c54d48e boost::_bi::bind_t<void, boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >, boost::_bi::list3<boost::_bi::value<ChangesApplier*>, boost::arg<1>, boost::_bi::value<grt::Ref<GrtNamedObject> > > > std::for_each<__gnu_cxx::__normal_iterator<boost::shared_ptr<grt::DiffChange> const*, std::vector<boost::shared_ptr<grt::DiffChange>, std::allocator<boost::shared_ptr<grt::DiffChange> > > >, boost::_bi::bind_t<void, boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >, boost::_bi::list3<boost::_bi::value<ChangesApplier*>, boost::arg<1>, boost::_bi::value<grt::Ref<GrtNamedObject> > > > >(__gnu_cxx::__normal_iterator<boost::shared_ptr<grt::DiffChange> const*, std::vector<boost::shared_ptr<grt::DiffChange>, std::allocator<boost::shared_ptr<grt::DiffChange> > > >, __gnu_cxx::__normal_iterator<boost::shared_ptr<grt::DiffChange> const*, std::vector<boost::shared_ptr<grt::DiffChange>, std::allocator<boost::shared_ptr<grt::DiffChange> > > >, boost::_bi::bind_t<void, boost::_mfi::mf2<void, ChangesApplier, boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject> >, boost::_bi::list3<boost::_bi::value<ChangesApplier*>, boost::arg<1>, boost::_bi::value<grt::Ref<GrtNamedObject> > > >) + 77
5   db.mysql.wbp.dylib            	0x0c54c1a3 ChangesApplier::apply_change_to_model(boost::shared_ptr<grt::DiffChange>, grt::Ref<GrtNamedObject>) + 1063
6   db.mysql.wbp.dylib            	0x0c543ea5 ChangesApplier::apply_node_to_model(DiffNode const*) + 187
7   db.mysql.wbp.dylib            	0x0c54d43b boost::_mfi::mf1<void, ChangesApplier, DiffNode const*>::operator()(ChangesApplier*, DiffNode const*) const + 41
8   db.mysql.wbp.dylib            	0x0c54d3e2 boost::_bi::bind_t<void, boost::_mfi::mf1<void, ChangesApplier, DiffNode const*>, boost::_bi::list2<boost::_bi::value<ChangesApplier*>, boost::arg<1> > > std::for_each<__gnu_cxx::__normal_iterator<DiffNode* const*, std::vector<DiffNode*, std::allocator<DiffNode*> > >, boost::_bi::bind_t<void, boost::_mfi::mf1<void, ChangesApplier, DiffNode const*>, boost::_bi::list2<boost::_bi::value<ChangesApplier*>, boost::arg<1> > > >(__gnu_cxx::__normal_iterator<DiffNode* const*, std::vector<DiffNode*, std::allocator<DiffNode*> > >, __gnu_cxx::__normal_iterator<DiffNode* const*, std::vector<DiffNode*, std::allocator<DiffNode*> > >, boost::_bi::bind_t<void, boost::_mfi::mf1<void, ChangesApplier, DiffNode const*>, boost::_bi::list2<boost::_bi::value<ChangesApplier*>, boost::arg<1> > >) + 62
9   db.mysql.wbp.dylib            	0x0c543f5e ChangesApplier::apply_node_to_model(DiffNode const*) + 372
….. (lines removed)

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 6
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 3767
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=251.5M resident=140.2M(56%) swapped_out_or_unallocated=111.3M(44%)
Writable regions: Total=250.6M written=62.2M(25%) resident=95.5M(38%) swapped_out=0K(0%) unallocated=155.1M(62%)
 
REGION TYPE                      VIRTUAL
===========                      =======
CG backing stores                  15.1M
CG image                              4K
CG raster data                      184K
CG shared images                    224K
CoreAnimation                       436K
CoreImage                             4K
CoreServices                       1608K
IOKit                              7132K
MALLOC                            201.7M
MALLOC guard page                    64K
Memory tag=240                        4K
Memory tag=242                       12K
Memory tag=243                        4K
Memory tag=35                      2868K
OpenCL                                8K
OpenGL GLSL                         896K
Stack                              67.0M
VM_ALLOCATE                        16.3M
__DATA                             13.5M
__DATA/__OBJC                       188K
__IMAGE                             528K
__IMPORT                             12K
__LINKEDIT                         61.6M
__OBJC                             2732K
__OBJC/__DATA                        44K
__PAGEZERO                            4K
__TEXT                            189.9M
__UNICODE                           544K
mapped file                        95.9M
shared memory                      3204K
===========                      =======
TOTAL                             681.3M

Model: MacBookPro8,3, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.2 GHz, 4 GB, SMC 1.70f5
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB
Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 1024 MB

How to repeat:
on database create enum('text','textarea','date','file','number','email')
on you ERD model enum('text','textarea','date','file','number')
add indexes to both sides.
Now try to sync Database > Synchronize model
[1 Nov 2012 9:20] Valter Kungla
MYSQL Server version: 5.1.63-0ubuntu0.10.04.1 (Ubuntu)
[4 Mar 2013 20:11] Armando Lopez Valencia
Hello.
Can you please provide a Model and DB Dump where you are able to reproduce this problem?
Thanks.
[12 Mar 2013 13:46] Valter Kungla
seems to be gone in latest version. Thanks!