#9 ✓resolved
Christopher Stawarz

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

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.

New-ticket Create new ticket

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

Shared Ticket Bins

People watching this ticket

Pages