Hi
While running an example of Acados in Matlab using Mac after compiling Mex successfully it crashes immediately. I guess it is being crashed while executing the below function.
%% create ocp solver
ocp = acados_ocp(ocp_model, ocp_opts);
Please find the below crash report.
--------------------------------------------------------------------------------
Illegal instruction detected at 2022-10-25 10:22:15 +0530
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : maci64
MATLAB Entitlement ID : 870270
MATLAB Root : /Applications/MATLAB_R2022b.app
MATLAB Version : 9.13.0.2049777 (R2022b)
OpenGL : hardware
Operating System : Mac OS Version 12.6 (Build 21G115)
Process ID : 43136
Processor ID : x86 Family 6 Model 44 Stepping 0, GenuineIntel
Session Key : cd20b708-ea5a-47f7-aa5a-613aff5392b9
Window System : Quartz
Fault Count: 1
Abnormal termination:
Illegal instruction
Current Thread: 'MCR 0 interpreter thread' id 0x30fa9e000
Register State (from fault):
RAX = 00007fa561c32200 RBX = 00007fa561c58000
RCX = 00007fa55e75c860 RDX = 00007fa561c32200
RSP = 000000030fa99b58 RBP = 000000030fa99c30
RSI = 000000030fa99be0 RDI = 0000000000000004
R8 = 000000030fa99be8 R9 = 00007fa561c58000
R10 = 000000030fa99be0 R11 = 000000030fa99be8
R12 = 00007fa561c58000 R13 = 00007fa55e75c860
R14 = 0000000000000004 R15 = 00007fa561c58000
RIP = 00000001b2e72104 RFL = 0000000000000246
CS = 000000000000002b FS = 0000000000000000 GS = 0000000000000000
Stack Trace (from fault):
[ 0] 0x000000010fba4b94 /Applications/MATLAB_R2022b.app/bin/maci64/libmwfl.dylib+00007060 _ZN10foundation4core4diag15stacktrace_base7captureERKNS1_14thread_contextEm+00000052
[ 1] 0x000000010fba905a /Applications/MATLAB_R2022b.app/bin/maci64/libmwfl.dylib+00024666 _ZN10foundation4core4test17terminate_handledERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+00006778
[ 2] 0x000000010fba72e5 /Applications/MATLAB_R2022b.app/bin/maci64/libmwfl.dylib+00017125 _ZN10foundation4core4diag13terminate_logEPKcPK17__darwin_ucontext+00000149
[ 3] 0x000000011a8d43fc /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00521212 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00011884
[ 4] 0x000000011a8d2483 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00513155 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00003827
[ 5] 0x000000011a8cfd35 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00503093 mnFatalSignalHandler+00000149
[ 6] 0x00007ff81d7b6dfd /usr/lib/system/libsystem_platform.dylib+00015869 _sigtramp+00000029
[ 7] 0x00000002052b9fed <unknown-module>+00000000
[ 8] 0x00000001adae8f5d /Applications/MATLAB_R2022b.app/bin/maci64/libacados.dylib+00040797 ocp_nlp_approximate_qp_matrices+00000205
[ 9] 0x00000001adafd35b /Applications/MATLAB_R2022b.app/bin/maci64/libacados.dylib+00123739 ocp_nlp_sqp+00000571
[ 10] 0x00000001adb308ab /Applications/MATLAB_R2022b.app/bin/maci64/libacados.dylib+00333995 ocp_nlp_solve+00000043
[ 11] 0x000000011f0a6851 /Applications/MATLAB_R2022b.app/bin/maci64/libmex.dylib+00378961 _ZNK18C_DispatchStrategy8dispatchEiPP11mxArray_tagiS2_+00000305
[ 12] 0x000000011f0a6770 /Applications/MATLAB_R2022b.app/bin/maci64/libmex.dylib+00378736 _ZNK18C_DispatchStrategy8dispatchEiPP11mxArray_tagiS2_+00000080
[ 13] 0x000000011f0a715d /Applications/MATLAB_R2022b.app/bin/maci64/libmex.dylib+00381277 _ZNK24SCCompatDispatchStrategy8dispatchEiPP11mxArray_tagiS2_+00000061
[ 14] 0x000000011f0a65d6 /Applications/MATLAB_R2022b.app/bin/maci64/libmex.dylib+00378326 _ZN7Mfh_mex30dispatch_file_with_protectionsEiPP11mxArray_tagiS2_+00000470
[ 15] 0x000000011f08dae6 /Applications/MATLAB_R2022b.app/bin/maci64/libmex.dylib+00277222 _ZN7Mfh_mex13dispatch_fileEiPP11mxArray_tagiS2_+00000150
[ 16] 0x000000011acda173 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_dispatcher.dylib+00762227 _ZN8Mfh_file8dispatchEiPNSt3__110unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEEiPPS2_+00000387
[ 17] 0x000000011f67f7d6 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00501718 _ZN9MathWorks3lxe13LxeDispatcher12apply_handleEP13Mfh_MATLAB_fnmPNS0_6xvalueEmPKS4_RKNS0_12LxeTypesBaseENS0_9ApplyTypeE+00001206
[ 18] 0x0000000123e41ea0 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+05615264 _ZN9MathWorks3lxe16ans_apply_handleEPvNS_2ts4TypeEPKvS1_S1_+00000256
[ 19] 0x0000000123d7350e /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+04769038 _ZN9MathWorks3lxe38cpp_primitive_template_fn_with_contextIXadL_ZNS0_16ans_apply_handleEPvNS_2ts4TypeEPKvS2_S2_EEEEbS2_S4_S6_S2_S2_+00000014
[ 20] 0x0000000123b2b9cc /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02378188 _ZN9MathWorks3lxe13IrInterpreter17ApplyCppPrimitiveEPN2ir4termES4_RKNS_2ts4TypeES8_+00000588
[ 21] 0x0000000123b29f95 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02371477 _ZN9MathWorks3lxe13IrInterpreter31process_application_of_constantEPN2ir4termE+00001429
[ 22] 0x0000000123b2833c /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02364220 _ZN9MathWorks3lxe13IrInterpreter13applyConstantEPN2ir4termE+00000076
[ 23] 0x0000000123b3c6ab /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02447019 _ZN9MathWorks3lxe12IRTreeWalker11getNextIRPCENS0_9irpc_typeE+00000187
[ 24] 0x0000000123b28090 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02363536 _ZN9MathWorks3lxe13IrInterpreter9tree_walkERKNS0_9irpc_typeES4_+00000192
[ 25] 0x0000000123b27f7c /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02363260 _ZN9MathWorks3lxe13IrInterpreter9InterpretEv+00000108
[ 26] 0x0000000123c58e40 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+03612224 _ZN9MathWorks3lxe15ExecutionDriver9ThreadRunEv+00005584
[ 27] 0x0000000123c5e09e /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+03633310 _ZN9MathWorks3lxe12IrEngineImpl5ApplyERKN2ir4termEPvS6_+00000302
[ 28] 0x000000011f7c4175 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+01831285 _ZN9MathWorks3lxe17IrEngineDecorator5ApplyERKN2ir4termEPvS6_+00000101
[ 29] 0x000000011f6767fe /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00464894 _ZN9MathWorks3lxe27FileBasedMatlabCodeFunction14DispatchScriptEiPP11mxArray_tagiS4_+00000318
[ 30] 0x000000011f676c40 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00465984 _ZN9MathWorks3lxe27FileBasedMatlabCodeFunction12DispatchFileEiPP11mxArray_tagiS4_b+00000096
[ 31] 0x000000011acda173 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_dispatcher.dylib+00762227 _ZN8Mfh_file8dispatchEiPNSt3__110unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEEiPPS2_+00000387
[ 32] 0x000000011f67f7d6 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00501718 _ZN9MathWorks3lxe13LxeDispatcher12apply_handleEP13Mfh_MATLAB_fnmPNS0_6xvalueEmPKS4_RKNS0_12LxeTypesBaseENS0_9ApplyTypeE+00001206
[ 33] 0x0000000123e41ea0 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+05615264 _ZN9MathWorks3lxe16ans_apply_handleEPvNS_2ts4TypeEPKvS1_S1_+00000256
[ 34] 0x0000000123d7350e /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+04769038 _ZN9MathWorks3lxe38cpp_primitive_template_fn_with_contextIXadL_ZNS0_16ans_apply_handleEPvNS_2ts4TypeEPKvS2_S2_EEEEbS2_S4_S6_S2_S2_+00000014
[ 35] 0x0000000123b2b9cc /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02378188 _ZN9MathWorks3lxe13IrInterpreter17ApplyCppPrimitiveEPN2ir4termES4_RKNS_2ts4TypeES8_+00000588
[ 36] 0x0000000123b29f95 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02371477 _ZN9MathWorks3lxe13IrInterpreter31process_application_of_constantEPN2ir4termE+00001429
[ 37] 0x0000000123b2833c /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02364220 _ZN9MathWorks3lxe13IrInterpreter13applyConstantEPN2ir4termE+00000076
[ 38] 0x0000000123b3c6ab /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02447019 _ZN9MathWorks3lxe12IRTreeWalker11getNextIRPCENS0_9irpc_typeE+00000187
[ 39] 0x0000000123b28090 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02363536 _ZN9MathWorks3lxe13IrInterpreter9tree_walkERKNS0_9irpc_typeES4_+00000192
[ 40] 0x0000000123b27f7c /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+02363260 _ZN9MathWorks3lxe13IrInterpreter9InterpretEv+00000108
[ 41] 0x0000000123c58e40 /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+03612224 _ZN9MathWorks3lxe15ExecutionDriver9ThreadRunEv+00005584
[ 42] 0x0000000123c5e09e /Applications/MATLAB_R2022b.app/bin/maci64/libmwm_lxe.dylib+03633310 _ZN9MathWorks3lxe12IrEngineImpl5ApplyERKN2ir4termEPvS6_+00000302
[ 43] 0x000000011f7c4175 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+01831285 _ZN9MathWorks3lxe17IrEngineDecorator5ApplyERKN2ir4termEPvS6_+00000101
[ 44] 0x000000011f6ce14a /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00823626 _ZN9MathWorks3lxe9Evaluator15ApplyStatementsERKNSt3__112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEERKN2ir4termERNS0_18IEvaluationContextE+00000602
[ 45] 0x000000011f6d1e28 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+00839208 _ZN9MathWorks3lxe9Evaluator17EvalStatementImplERKNSt3__112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEERNS0_18IEvaluationContextE+00000408
[ 46] 0x000000011f777f3e /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+01519422 _ZN9MathWorks3lxe9LxeBridge7EvalCmdERKNSt3__112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEEbNS0_10EvalSourceE+00000318
[ 47] 0x000000011f777db5 /Applications/MATLAB_R2022b.app/bin/maci64/libmwlxemainservices.dylib+01519029 _ZN9MathWorks3lxe9LxeBridge22EvalCmdWithLocalReturnERKNSt3__112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEEPibNS0_10EvalSourceE+00000053
[ 48] 0x000000011a55e1ff /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00520703 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000607
[ 49] 0x000000011a5355c6 /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00353734 _ZN3iqm17DefaultPacketInfo7executeEP15inWorkSpace_tagRKN7mwboost10shared_ptrINS_22IntermediatePacketInfoEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueE+00001382
[ 50] 0x000000011a4eac6e /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00048238 _ZN3iqm10DefaultIqm7dequeueERKN7mwboost8optionalIKP15inWorkSpace_tagEEN14cmddistributor11IqmStreamIDERKNS1_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3__112basic_stringIDsNSF_11char_traitsIDsEENSF_9allocatorIDsEEEES5_EE+00003918
[ 51] 0x000000011ee817da /Applications/MATLAB_R2022b.app/bin/maci64/libmwbridge.dylib+00059354 _Z10ioReadLinebP7__sFILERKN7mwboost8optionalIKP15inWorkSpace_tagEEbRbRKNS1_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3__112basic_stringIDsNSE_11char_traitsIDsEENSE_9allocatorIDsEEEES5_EE+00000218
[ 52] 0x000000011eea0672 /Applications/MATLAB_R2022b.app/bin/maci64/libmwbridge.dylib+00185970 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3__112basic_stringIDsNSA_11char_traitsIDsEENSA_9allocatorIDsEEEES4_EE+00000274
[ 53] 0x000000011eea0c1a /Applications/MATLAB_R2022b.app/bin/maci64/libmwbridge.dylib+00187418 _Z8mnParserv+00000362
[ 54] 0x000000011a892098 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00250008 _ZN3mcr7runtime13initializeIqmERKN6mlutil10contextmgr5McrIDE+00002296
[ 55] 0x000000011a876375 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00136053 _ZN14cmddistributor15PackagedTaskIIP13getTypeStringIvEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEv+00000869
[ 56] 0x000000011a87629b /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00135835 _ZN14cmddistributor15PackagedTaskIIP13getTypeStringIvEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEv+00000651
[ 57] 0x000000011a5597ca /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00501706 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000074
[ 58] 0x000000011a88f7a7 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00239527 _Z15mcr_initialize0PKDsPS0_RKN7mwboost10shared_ptrIN10foundation7msg_svc8eventmgr8EventMgrEEEN6mlutil10contextmgr5MvmIDE+00019799
[ 59] 0x000000011a5355c6 /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00353734 _ZN3iqm17DefaultPacketInfo7executeEP15inWorkSpace_tagRKN7mwboost10shared_ptrINS_22IntermediatePacketInfoEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueE+00001382
[ 60] 0x000000011a4f9533 /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00107827 _ZN3iqm10DefaultIqm13dequeueHelperEN7mwboost8optionalImEERKNSt3__112basic_stringIDsNS4_11char_traitsIDsEENS4_9allocatorIDsEEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueERKNS4_8functionIFbRKNS4_5tupleIJSG_NS1_10shared_ptrINS_22IntermediatePacketInfoEEESA_SA_NS4_10shared_ptrIN14cmddistributor16CoalesceableDataEEEEEEEEE+00001315
[ 61] 0x000000011a4ec442 /Applications/MATLAB_R2022b.app/bin/maci64/libmwiqm.dylib+00054338 _ZN3iqm10DefaultIqm7dequeueEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueEN7mwboost8optionalImEE+00000434
[ 62] 0x000000011a88027e /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00176766 _ZN3mcr7runtime22InterpreterThreadMulti14process_eventsEv+00000254
[ 63] 0x000000011a880ada /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00178906 _ZN3mcr7runtime22InterpreterThreadMulti10threadMainENSt3__18functionIFvvEEENS2_7promiseIvEE+00000394
[ 64] 0x000000011a881e61 /Applications/MATLAB_R2022b.app/bin/maci64/libmwmcr.dylib+00183905 _ZN3mcr7runtime22InterpreterThreadMulti10threadMainENSt3__18functionIFvvEEENS2_7promiseIvEE+00005393
[ 65] 0x000000010dadfba8 /Applications/MATLAB_R2022b.app/bin/maci64/libmwboost_thread.dylib+00011176 _ZN7mwboost6thread21start_thread_noexceptEv+00000312
[ 66] 0x00007ff81d7a14e1 /usr/lib/system/libsystem_pthread.dylib+00025825 _pthread_start+00000125
[ 67] 0x00007ff81d79cf6b /usr/lib/system/libsystem_pthread.dylib+00008043 thread_start+00000015
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.
I am using macOS 12.6 with MATLABR2022a and Xcode 14.
Thanks and Regards
Raghu Boppana