getCodecs.m causes fatal Matlab crash

Hi Chris,

When I try to use getCodecs.m to analyze data files collected with MWorks, Matlab crashes fatally. I have previously used getCodecs.m to get data successfully, but only recently has it become an issue. Its very strange because files I had previous success on no longer work either. The only change I’ve made is upgrading to R2014b, but getCodecs.m doesn’t work in R2013a (my previous Matlab version). I’ll paste the error report below.

Thanks,
Seth

MATLAB crash file:/Users/jazlab-5/matlab_crash_dump.403-1:


   Segmentation violation detected at Wed Nov  5 11:26:09 2014

Configuration:
Crash Decoding : Disabled
Current Visual : Quartz
Default Encoding : ISO-8859-1
MATLAB Architecture: maci64
MATLAB Root : /Applications/MATLAB_R2014b.app
MATLAB Version : 8.4.0.150421 (R2014b)
Operating System : Darwin 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Processor ID : x86 Family 6 Model 23 Stepping 10, GenuineIntel
Software OpenGL : 0
Virtual Machine : Java 1.7.0_55-b13 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
Window System : Quartz

Fault Count: 1

Abnormal termination:
Segmentation violation

Register State (from fault):
RAX = 0000000113b81128 RBX = 00000000000008b7
RCX = 00000000000f8ad0 RDX = 0000000000000010
RSP = 00007ff0d348b6f0 RBP = 00007ff0d348b6f0
RSI = 00007ff000000001 RDI = 00007ff00000c000

R8 = 00007ff0d3400000 R9 = 00007ff0d348b700
R10 = 000000010f285000 R11 = 00007ff0d34cc1c8
R12 = 0000000113b81128 R13 = 0000000113b80e58
R14 = 00007ff0d34cc1c8 R15 = 00007ff0d3841d80

RIP = 0000000113b80f50 RFL = 00000001280c7706

CS = 00007ff0d3841d80 FS = 0000000113b81140 GS = 000000000000002f

Stack Trace (from fault):
[ 0] 0x00000001080b6e64 /Applications/MATLAB_R2014b.app/bin/maci64/libmwfl.dylib+00028260 _ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+00000052
[ 1] 0x00000001080baa2a /Applications/MATLAB_R2014b.app/bin/maci64/libmwfl.dylib+00043562 _ZN2fl4test17terminate_handledEv+00000906
[ 2] 0x00000001080ba477 /Applications/MATLAB_R2014b.app/bin/maci64/libmwfl.dylib+00042103 _ZN2fl4diag13terminate_logEPKcPK17__darwin_ucontext+00000119
[ 3] 0x0000000107b1ab7a /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00387962 _Z32mnRunPathDependentInitializationv+00003146
[ 4] 0x0000000107b1ae58 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00388696 _Z32mnRunPathDependentInitializationv+00003880
[ 5] 0x0000000107b18733 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00378675 mnFatalSignalHandler+00000275
[ 6] 0x00007fff87af15aa /usr/lib/system/libsystem_platform.dylib+00013738 _sigtramp+00000026
[ 7] 0x0000000000000000 +00000000
[ 8] 0x00000001280c7706 /Users/jazlab-5/analysis/MWorksMatlab/+mworks/mwfeval.mexmaci64+00026374 _ZN2mw6matlab19convertDatumToArrayERKNS_5DatumE+00003034
[ 9] 0x00000001280c7100 /Users/jazlab-5/analysis/MWorksMatlab/+mworks/mwfeval.mexmaci64+00024832 _ZN2mw6matlab19convertDatumToArrayERKNS_5DatumE+00001492
[ 10] 0x00000001280c949c /Users/jazlab-5/analysis/MWorksMatlab/+mworks/mwfeval.mexmaci64+00033948 _ZN2mw6matlab9getEventsERNS0_9MEXInputsERNS0_10MEXOutputsE+00000530
[ 11] 0x00000001280c2684 /Users/jazlab-5/analysis/MWorksMatlab/+mworks/mwfeval.mexmaci64+00005764 mexFunction+00000244
[ 12] 0x000000010cafbeeb /Applications/MATLAB_R2014b.app/bin/maci64/libmex.dylib+00069355 mexRunMexFile+00000091
[ 13] 0x000000010caf7f41 /Applications/MATLAB_R2014b.app/bin/maci64/libmex.dylib+00053057 ZN7Mfh_mex30runMexFileWithSignalProtectionEiPP11mxArray_tagiS2+00000113
[ 14] 0x000000010caf8130 /Applications/MATLAB_R2014b.app/bin/maci64/libmex.dylib+00053552 ZN7Mfh_mex13dispatch_fileEiPP11mxArray_tagiS2+00000304
[ 15] 0x000000010cb84c28 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00400424 ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2+00000600
[ 16] 0x000000010cd68e8e /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+01093262 ZNK4mcos17MScopedMethodInfo6invokeEPKNS_9COSClientERiPNS_8COSValueEiPKS5+00000606
[ 17] 0x000000010cd06597 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+00689559 _ZN24OpaqueMethodCallMetaData11callMMethodEPN4mcos13COSMethodInfoEPP11mxArray_tagPKNS0_9COSClientE+00000359
[ 18] 0x000000010cd09e63 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+00704099 _ZN24OpaqueMethodCallMetaData23callMethodOrConstructorEP11mxArray_tagbiPS1_iPPKS0_bPKN4mcos9COSClientEPS9_PPNS6_13COSMethodInfoE+00000259
[ 19] 0x000000010cd08d41 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+00699713 _Z22omCallMethodWithClientP11mxArray_tagbS0_iPS0_iPPKS_PKN4mcos9COSClientEPS8_PPNS5_13COSMethodInfoE+00000417
[ 20] 0x000000010cd94ee8 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+01273576 Z18omCallStaticMethodP11mxArray_tagiPS0_iPPKS+00000088
[ 21] 0x000000010ce1de64 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+01834596 ZN17Mfh_opaque_static11dispatch_mfEiPP11mxArray_tagiS2+00000116
[ 22] 0x000000010cb2812d /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00020781 ZN13Mfh_MATLAB_fn11dispatch_fhEiPP11mxArray_tagiS2+00000333
[ 23] 0x000000010ce1aacc /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcos.dylib+01821388 ZN10Mfh_opaque11dispatch_fhEiPP11mxArray_tagiS2+00000028
[ 24] 0x000000010d4e2d62 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01523042 _Z19inDispatchFromStackiPKcii+00001650
[ 25] 0x000000010d484dd8 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01138136 inPcodeWalker+00022552
[ 26] 0x000000010d481917 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01124631 inPcodeWalker+00009047
[ 27] 0x000000010d47cfb7 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01105847 inInterPcode+00000935
[ 28] 0x000000010d47e1c6 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01110470 _Z26inExecuteMFunctionOrScriptP6Mfh_mpb+00000886
[ 29] 0x000000010d5201f1 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01774065 _Z10inRunMfileiPP11mxArray_tagiS1_P6Mfh_mpP15inWorkSpace_tag+00002337
[ 30] 0x000000010cb84fa0 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00401312 ZN8Mfh_file11dispatch_fhEP20_mdUnknown_workspaceiPP11mxArray_tagiS4+00000624
[ 31] 0x000000010cb3e461 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00111713 Z30callViamdMxarrayFunctionHandlePviPP11mxArray_tagiS2+00000033
[ 32] 0x000000010d6de337 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03601207 ZN20ResolverFunctionDesc12CallFunctionEiPP11mxArray_tagiS2+00000663
[ 33] 0x000000010d6dea9a /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03603098 _ZN8Resolver13CallMFunctionEiiP10_m_operandP17m_operand_storageiS1_S3_Pi+00001626
[ 34] 0x000000010d6df647 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03606087 _Z22inResolveMFunctionCallP16_m_function_desciiP10_m_operandP17m_operand_storageiS2_S4_PiP13inMarshalTypeiPK19mpsTypeSequenceNlhsPFP11mxArray_tagiE+00000231
[ 35] 0x000000010d54da0b /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01960459 _ZN9accelImpl13MFunctionCallEPP8_accelOp+00000411
[ 36] 0x000000010d54e0a4 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01962148 _ZN9accelImpl4ExecEv+00000180
[ 37] 0x000000010d54de0e /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01961486 _ZNK9accelCode4CallEP13inMarshalTypePi+00000094
[ 38] 0x000000010d68d9fb /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03271163 _ZN5inJit17ExecuteHotSegmentEP15_inJitAccelInfoP7opcodesPiPl+00002523
[ 39] 0x000000010d47f988 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01116552 inPcodeWalker+00000968
[ 40] 0x000000010d47cfb7 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01105847 inInterPcode+00000935
[ 41] 0x000000010d47e1c6 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01110470 _Z26inExecuteMFunctionOrScriptP6Mfh_mpb+00000886
[ 42] 0x000000010d5201f1 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01774065 _Z10inRunMfileiPP11mxArray_tagiS1_P6Mfh_mpP15inWorkSpace_tag+00002337
[ 43] 0x000000010cb84c28 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00400424 ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2+00000600
[ 44] 0x000000010d4e2d62 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01523042 _Z19inDispatchFromStackiPKcii+00001650
[ 45] 0x000000010d484dd8 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01138136 inPcodeWalker+00022552
[ 46] 0x000000010d481917 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01124631 inPcodeWalker+00009047
[ 47] 0x000000010d47cfb7 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01105847 inInterPcode+00000935
[ 48] 0x000000010d47e1c6 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01110470 _Z26inExecuteMFunctionOrScriptP6Mfh_mpb+00000886
[ 49] 0x000000010d5201f1 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01774065 _Z10inRunMfileiPP11mxArray_tagiS1_P6Mfh_mpP15inWorkSpace_tag+00002337
[ 50] 0x000000010cb84c28 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00400424 ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2+00000600
[ 51] 0x000000010d6de158 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03600728 ZN20ResolverFunctionDesc12CallFunctionEiPP11mxArray_tagiS2+00000184
[ 52] 0x000000010d6dea9a /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03603098 _ZN8Resolver13CallMFunctionEiiP10_m_operandP17m_operand_storageiS1_S3_Pi+00001626
[ 53] 0x000000010d6df647 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03606087 _Z22inResolveMFunctionCallP16_m_function_desciiP10_m_operandP17m_operand_storageiS2_S4_PiP13inMarshalTypeiPK19mpsTypeSequenceNlhsPFP11mxArray_tagiE+00000231
[ 54] 0x000000010d54da0b /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01960459 _ZN9accelImpl13MFunctionCallEPP8_accelOp+00000411
[ 55] 0x000000010d54e0a4 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01962148 _ZN9accelImpl4ExecEv+00000180
[ 56] 0x000000010d54de0e /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01961486 _ZNK9accelCode4CallEP13inMarshalTypePi+00000094
[ 57] 0x000000010d68d9fb /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+03271163 _ZN5inJit17ExecuteHotSegmentEP15_inJitAccelInfoP7opcodesPiPl+00002523
[ 58] 0x000000010d47e0a4 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01110180 _Z26inExecuteMFunctionOrScriptP6Mfh_mpb+00000596
[ 59] 0x000000010d5201f1 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01774065 _Z10inRunMfileiPP11mxArray_tagiS1_P6Mfh_mpP15inWorkSpace_tag+00002337
[ 60] 0x000000010cb84c55 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_dispatcher.dylib+00400469 ZN8Mfh_file11dispatch_fhEiPP11mxArray_tagiS2+00000645
[ 61] 0x000000010d4c348b /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01393803 _Z23inEvalPcodeHeaderToWordP15_memory_contextiPP11mxArray_tagP12_pcodeheaderP6Mfh_mpj+00000219
[ 62] 0x000000010d475f4b /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01077067 _Z25in_local_call_with_setjmpIN5boost3_bi6bind_tIvPFvP15_memory_contextPiPP11mxArray_tagP12_pcodeheaderjENS1_5list5INS1_5valueIS4_EENS0_3argILi1EEENSG_ILi2EEENSE_ISA_EENSE_IiEEEEEEEN6mlutil14cmddistributor17inExecutionStatusET_S5_S8_b+00000171
[ 63] 0x000000010d471221 /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01057313 _Z12inEvalStringP15_memory_contextRKSbItSt11char_traitsItESaItEE8EvalTypeiPP11mxArray_tag12inDebugCheckP12_pcodeheaderPib+00002769
[ 64] 0x000000010d4717cd /Applications/MATLAB_R2014b.app/bin/maci64/libmwm_interpreter.dylib+01058765 _ZN12InterpBridge22EvalCmdWithLocalReturnERKSbItSt11char_traitsItESaItEEPibb+00000141
[ 65] 0x000000010ca9611d /Applications/MATLAB_R2014b.app/bin/maci64/libmwbridge.dylib+00061725 _Z28evalCommandWithLongjmpSafetyRKSbItSt11char_traitsItESaItEE+00000093
[ 66] 0x000000010ca96804 /Applications/MATLAB_R2014b.app/bin/maci64/libmwbridge.dylib+00063492 _Z8mnParserv+00000772
[ 67] 0x0000000107b02832 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00288818 _ZN11mcrInstance30mnParser_on_interpreter_threadEv+00000034
[ 68] 0x0000000107add0d1 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00135377 _ZN3mcr7runtime17InterpreterThread4Impl22TypedInvocationRequestIvE29doNotRethrowMxArrayExceptionsERKN5boost8functionIFvvEEE+00000033
[ 69] 0x0000000107addd89 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00138633 _ZN5boost6detail11task_objectIvNS_3_bi6bind_tIvPFvRKNS_8functionIFvvEEEENS2_5list1INS2_5valueIS6_EEEEEEE6do_runEv+00000025
[ 70] 0x0000000107add586 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00136582 _ZN5boost6detail9task_baseIvE3runEv+00000166
[ 71] 0x0000000107add377 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00136055 _ZN3mcr7runtime17InterpreterThread4Impl22TypedInvocationRequestIvE3runEv+00000023
[ 72] 0x0000000107ad8f90 /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00118672 _ZN3mcr7runtime17InterpreterThread4Impl26invocation_request_handlerEl+00000032
[ 73] 0x000000010761b005 /Applications/MATLAB_R2014b.app/bin/maci64/libmwservices.dylib+00196613 _ZN10eventqueue18UserEventQueueImpl5flushEv+00001205
[ 74] 0x000000010df33a65 /Applications/MATLAB_R2014b.app/bin/maci64/libmwuix.dylib+00043621 _Z25isHandleUserEventCallbackPFvPvE+00000501
[ 75] 0x00000001076eaa45 /Applications/MATLAB_R2014b.app/bin/maci64/libmwservices.dylib+01047109 _Z21svWS_ProcessCallbacksv+00016693
[ 76] 0x00000001076e6152 /Applications/MATLAB_R2014b.app/bin/maci64/libmwservices.dylib+01028434 _Z25svWS_ProcessPendingEventsiib+00000834
[ 77] 0x00000001076e5e5e /Applications/MATLAB_R2014b.app/bin/maci64/libmwservices.dylib+01027678 _Z25svWS_ProcessPendingEventsiib+00000078
[ 78] 0x0000000107ad918f /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00119183 _ZN3mcr7runtime17InterpreterThread4Impl14process_eventsERKN5boost10shared_ptrIS2_EE+00000095
[ 79] 0x0000000107ad949f /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00119967 _ZN3mcr7runtime17InterpreterThread4Impl3runERKN5boost10shared_ptrIS2_EEPNS2_12init_contextE+00000335
[ 80] 0x0000000107abfd1b /Applications/MATLAB_R2014b.app/bin/maci64/libmwmcr.dylib+00015643 _Z26run_init_and_handle_eventsPv+00000059
[ 81] 0x00007fff82b30899 /usr/lib/system/libsystem_pthread.dylib+00006297 _pthread_body+00000138
[ 82] 0x00007fff82b3072a /usr/lib/system/libsystem_pthread.dylib+00005930 _pthread_struct_init+00000000
[ 83] 0x00007fff82b34fc9 /usr/lib/system/libsystem_pthread.dylib+00024521 thread_start+00000013

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:
Contact Us - MATLAB & Simulink

A technical support engineer might contact you with further information.

Thank you for your help.

Hi Seth,

I see from the crash log that you’ve copied /Library/Application Support/MWorks/Scripting/Matlab to /Users/jazlab-5/analysis/MWorksMatlab. I strongly recommend that you do not do this, and I suspect this is the source of your problem.

The issue here is that +mworks/mwfeval.mexmaci64 links against the MWorksCore framework. If you update your MWorks installation but don’t update your copy of the MATLAB stuff, then you may end up with binary compatibility issues between the MEX file and the framework. Such issues would likely manifest as mysterious crashes, much like the one you reported.

Can you try using the MATLAB files installed in /Library/Application Support/MWorks/Scripting/Matlab and see if that resolves the issue? If not, then I’ll probably need a copy of your data file, as I haven’t been able to induce a crash using any data file I have on hand.

Cheers,
Chris

Hi Chris,

Yup, that solved it. Thanks!

Best,
Seth