0.4.4 MATLAB window crashes client
Reported by Christopher Stawarz | July 14th, 2010 @ 01:01 PM | in 0.4.5 (closed)
The MATLAB window shipped with MWorks 0.4.4 seems to crash the client pretty consistently. Here's a typical stack trace:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000114c54825 in MathWorks::System::ThrowMessageCodeCommand::_execute ()
0x0000000114c55125 in ut_ghash_query_element ()
0x0000000114c553e2 in ut_ghash_query ()
0x0000000113b3cb90 in mxIsVector2D ()
0x0000000113b15d35 in mxGetField_730 ()
0x00000001037bd5ad in insertDatumIntoEventList (eventlist=0x13f9921d0, index=2, datum=0x125a7d030) at /Users/mwdev/.buildbot_slave/build_mw_datatools/build/MWorksStreamUtilities/mWorksStreamUtilities.cpp:387
0x00000001037b4c5d in -[MATLABInterface createDataStruct:withCodec:] (self=0x1012eeef0, _cmd=0x1012a8a10, dataEventList=0x13fba7210, codec=0x116186c40) at /Users/cstawarz/Documents/Work/McGovern/mworks/dicarlolab_mwsuite/dicarlolab_mwclient_plugins/MATLABWindow/MATLABInterface.m:150
0x00000001037b3169 in -[MWMATLABWindowController MATLABExecutionLoop:] (self=0x1012ef270, _cmd=0x1012adf30, obj=0x0) at /Users/cstawarz/Documents/Work/McGovern/mworks/dicarlolab_mwsuite/dicarlolab_mwclient_plugins/MATLABWindow/MWMATLABWindowController.m:428
0x00007fff87e95e8d in __NSThread__main__ ()
0x00007fff821bc456 in _pthread_start ()
0x00007fff821bc309 in thread_start ()
Strangely, the problem seems to stem from moving shared code to MWorksStreamUtilities, because it disappears when I revert this commit. Is this some unexpected side effect of using a C++ static library in Objective-C++ code?
My only other guess is that the plugin is using the (non-threadsafe) MATLAB API from multiple threads, and that's causing the crash. However, that should still be the case when I revert the code-sharing change, and it doesn't crash then.
Comments and changes to this ticket
-
Christopher Stawarz July 14th, 2010 @ 04:32 PM
- State changed from open to resolved
Fixed in commit df227f807a96ef47c7202b16cf6dc82f0cf24ecc.
Turns out the cause was just basic programmer error: The plugin's version of
insertDatumIntoEventList
had one line of code that MWorksStreamUtilities's doesn't, and I failed to move it into[MATLABInterface createDataStruct:withCodec:]
. -
Christopher Stawarz April 17th, 2012 @ 01:33 PM
- Milestone set to 0.4.5
- Milestone order changed from 6 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
DiCarlo Lab plugins for the MWorks core framework and client application