Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

0.4.4 MATLAB window crashes client

#9

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.

Reported by Christopher Stawarz · July 14th, 2010 @ 01:01 PM

State: resolved
Milestone: 0.4.5
Assigned to: Christopher Stawarz Christopher Stawarz

Activity

  1. Christopher Stawarz
  2. Christopher Stawarz
    Christopher Stawarz
    • 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:].

    July 14th, 2010 @ 04:32 PM

  3. Christopher Stawarz
    Christopher Stawarz
    • Milestone set to 0.4.5
    • Milestone order changed from 6 to 0

    April 17th, 2012 @ 01:33 PM

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.