wschwanghart / topotoolbox

A MATLAB software for the analysis of digital elevation models -
https://topotoolbox.wordpress.com/
153 stars 89 forks source link

Matlab (R2021a) crashes when running flowacc #21

Closed valpedro closed 1 year ago

valpedro commented 2 years ago

Hi Wolfgang,

I've updated Matlab's version recently and it is crashing as soon as I run the flowacc function.

FD=FLOWobj(DEM,'preprocess','carve'); %runs ok A=flowacc(FD); %crashes

Seems like it might have something to do with the mex files (see below)? Not sure. Can you help?

Thank you.

Pedro

Here is the crash report: MATLAB Log File: /Users/pedroval/matlab_crash_dump.51070-1


MATLAB Log File



      Segmentation violation detected at 2021-10-09 19:46:24 -0300

Configuration: Crash Decoding : Disabled - No sandbox or build area path Crash Mode : continue (default) Default Encoding : UTF-8 Deployed : false Graphics Driver : Unknown 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 : 9473646 MATLAB Root : /Applications/MATLAB_R2021a.app MATLAB Version : 9.10.0.1739362 (R2021a) Update 5 OpenGL : hardware Operating System : Mac OS Version 10.14.6 (Build 18G9323) Process ID : 51070 Processor ID : x86 Family 6 Model 58 Stepping 9, GenuineIntel Session Key : a0a57d38-b8a2-4dd1-9f6e-134555603812 Window System : Quartz

Fault Count: 1

Abnormal termination: Segmentation violation

Current Thread: 'MCR 0 interpreter thread' id 0x700010a2d000

Register State (from fault): RAX = 00000001d5d61020 RBX = 0093184b0092fb7e RCX = 0000000000000001 RDX = 0000000000000000 RSP = 0000700010a29d60 RBP = 0000700010a29da0 RSI = 0000000000000000 RDI = 0093184a00931849

R8 = 0000000000000000 R9 = 0000000018e70000 R10 = 0000000000000003 R11 = 0000000000000007 R12 = 0000000243951020 R13 = 0000700010a2a418 R14 = 0000000211c71020 R15 = 00000000031a1802

RIP = 000000011ca4ee38 RFL = 0000000000010246

CS = 000000000000002b FS = 0000000000000000 GS = 0000000000000000

Stack Trace (from fault): [ 0] 0x000000010385e549 /Applications/MATLAB_R2021a.app/bin/maci64/libmwfl.dylib+00005449 _ZN10foundation4core4diag15stacktrace_base7captureERKNS1_14thread_contextEm+00000057 [ 1] 0x0000000103863eea /Applications/MATLAB_R2021a.app/bin/maci64/libmwfl.dylib+00028394 _ZN10foundation4core4test17terminate_handledERKNSt3112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+00011562 [ 2] 0x0000000103860ec5 /Applications/MATLAB_R2021a.app/bin/maci64/libmwfl.dylib+00016069 _ZN10foundation4core4diag13terminate_logEPKcPK17__darwin_ucontext+00000149 [ 3] 0x0000000108dadb7b /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00555899 _Z19mnPrintErrorMessageRKNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00013051 [ 4] 0x0000000108dab64d /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00546381 _Z19mnPrintErrorMessageRKNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00003533 [ 5] 0x0000000108da8dd0 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00536016 mnFatalSignalHandler+00000144 [ 6] 0x00007fff7b89bb5d /usr/lib/system/libsystem_platform.dylib+00019293 _sigtramp+00000029 [ 7] 0x00000001034d055a /Applications/MATLAB_R2021a.app/bin/maci64/libmwms.dylib+00718170 _ZN10foundation7msg_svc8exchange19NoQueueMessageQueue6submitERKN7mwboost10shared_ptrIKNS1_8EnvelopeEEE+00000074 [ 8] 0x000000010991ba37 /Applications/MATLAB_R2021a.app/bin/maci64/libmex.dylib+00395831 _ZNK18C_DispatchStrategy8dispatchEiPP11mxArraytagiS2+00000279 [ 9] 0x000000010991b970 /Applications/MATLAB_R2021a.app/bin/maci64/libmex.dylib+00395632 _ZNK18C_DispatchStrategy8dispatchEiPP11mxArraytagiS2+00000080 [ 10] 0x000000010991b7dc /Applications/MATLAB_R2021a.app/bin/maci64/libmex.dylib+00395228 _ZN7Mfh_mex30dispatch_file_with_protectionsEiPP11mxArraytagiS2+00000428 [ 11] 0x00000001099001f6 /Applications/MATLAB_R2021a.app/bin/maci64/libmex.dylib+00283126 _ZN7Mfh_mex13dispatch_fileEiPP11mxArraytagiS2+00000150 [ 12] 0x0000000108f0a0ad /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_dispatcher.dylib+00676013 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2iS2+00000141 [ 13] 0x0000000108f0a8a9 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_dispatcher.dylib+00678057 _ZN8Mfh_file8dispatchEiPNSt3__110unique_ptrI11mxArray_tagN6matrix6detail17mxDestroydeleterEEEiPPS2+00000377 [ 14] 0x000000010aeb8c09 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+06798345 _ZN9MathWorks3lxe13LxeDispatcher12apply_handleEPNS0_29DispatcherFunctionHandleTokenEmPNS0_6xvalueEmPKS4_RKNS0_12LxeTypesBaseENS0_9ApplyTypeE+00001337 [ 15] 0x000000010affcf72 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+08126322 _ZN9MathWorks3lxe12apply_handleEPvNS_2ts4TypeEPKvS1S1+00000386 [ 16] 0x000000010af44a2e /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+07371310 _ZN9MathWorks3lxe38cpp_primitive_template_fn_with_contextIXadL_ZNS0_12apply_handleEPvNS_2ts4TypeEPKvS2_S2_EEEEbS2_S4_S6_S2S2+00000014 [ 17] 0x000000010aa1767b /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01943163 _ZN9MathWorks3lxe13IrInterpreter17ApplyCppPrimitiveEPN2ir4termES4_RKNS2ts4TypeES8+00000603 [ 18] 0x000000010aa1637f /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01938303 _ZN9MathWorks3lxe13IrInterpreter31process_application_of_constantEPN2ir4termE+00003951 [ 19] 0x000000010aa13f08 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01928968 _ZN9MathWorks3lxe13IrInterpreter13applyConstantEPN2ir4termE+00000072 [ 20] 0x000000010aa0edc8 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01908168 _ZN9MathWorks3lxe12IRTreeWalker11getNextIRPCENS0_9irpc_typeE+00000216 [ 21] 0x000000010aa13c87 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01928327 _ZN9MathWorks3lxe13IrInterpreter9tree_walkERKNS0_9irpctypeES4+00000215 [ 22] 0x000000010aa13b5c /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+01928028 _ZN9MathWorks3lxe13IrInterpreter9InterpretEv+00000108 [ 23] 0x000000010ab67d40 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+03321152 _ZN9MathWorks3lxe15ExecutionDriver9ThreadRunEv+00005504 [ 24] 0x000000010ab6d31d /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+03343133 ZN9MathWorks3lxe12IrEngineImpl5ApplyERKN2ir4termEPvS6+00000301 [ 25] 0x000000010adb1817 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+05720087 ZN9MathWorks3lxe17IrEngineDecorator5ApplyERKN2ir4termEPvS6+00000103 [ 26] 0x000000010ad42a36 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+05265974 _ZN9MathWorks3lxe9Evaluator15ApplyStatementsERKNSt3112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEERKN2ir4termERNS0_18IEvaluationContextE+00000758 [ 27] 0x000000010ad46bcc /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+05282764 _ZN9MathWorks3lxe9Evaluator17EvalStatementImplERKNSt3112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEERNS0_18IEvaluationContextE+00000412 [ 28] 0x000000010adfd317 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+06030103 _ZN9MathWorks3lxe9LxeBridge7EvalCmdERKNSt3112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEEbNS0_10EvalSourceE+00000327 [ 29] 0x000000010adfd185 /Applications/MATLAB_R2021a.app/bin/maci64/libmwm_lxe.dylib+06029701 _ZN9MathWorks3lxe9LxeBridge22EvalCmdWithLocalReturnERKNSt3112basic_stringIDsNS2_11char_traitsIDsEENS2_9allocatorIDsEEEEPibNS0_10EvalSourceE+00000053 [ 30] 0x0000000108c8385b /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00518235 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000939 [ 31] 0x0000000130c4b57a /Applications/MATLAB_R2021a.app/bin/maci64/libnativejmi.dylib+00103802 _ZN9nativejmi17JmiUserEvalPlugin7executeEP15inWorkSpace_tag+00000026 [ 32] 0x0000000108c593f7 /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00345079 _ZN3iqm17DefaultPacketInfo7executeEP15inWorkSpace_tagN7mwboost10shared_ptrINS_22IntermediatePacketInfoEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueE+00001479 [ 33] 0x0000000108c6db85 /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00428933 _ZN3iqm10ioreadline14EvalPacketInfo7executeEP15inWorkSpace_tagN7mwboost10shared_ptrINS_22IntermediatePacketInfoEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueE+00000085 [ 34] 0x0000000108c1209e /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00053406 _ZN3iqm10DefaultIqm7dequeueERKN7mwboost8optionalIKP15inWorkSpace_tagEEN14cmddistributor11IqmStreamIDERKNS1_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3__112basic_stringIDsNSF_11char_traitsIDsEENSF_9allocatorIDsEEEES5_EE+00004318 [ 35] 0x000000010987f1f1 /Applications/MATLAB_R2021a.app/bin/maci64/libmwbridge.dylib+00057841 _Z10ioReadLinebP7sFILERKN7mwboost8optionalIKP15inWorkSpace_tagEEbRbRKNS1_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3112basic_stringIDsNSE_11char_traitsIDsEENSE_9allocatorIDsEEEES5_EE+00000209 [ 36] 0x0000000109886b42 /Applications/MATLAB_R2021a.app/bin/maci64/libmwbridge.dylib+00088898 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt3__112basic_stringIDsNSA_11char_traitsIDsEENSA_9allocatorIDsEEEES4_EE+00000274 [ 37] 0x0000000109887085 /Applications/MATLAB_R2021a.app/bin/maci64/libmwbridge.dylib+00090245 _Z8mnParserv+00000357 [ 38] 0x0000000108d6c98c /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00289164 _ZN3mcr7runtime13initializeIqmERKN6mlutil10contextmgr5McrIDE+00002172 [ 39] 0x0000000108d368a5 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00067749 _ZN14cmddistributor15PackagedTaskIIP13getTypeStringIvEENSt3112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEv+00000837 [ 40] 0x0000000108d367e9 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00067561 _ZN14cmddistributor15PackagedTaskIIP13getTypeStringIvEENSt3112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEv+00000649 [ 41] 0x0000000108c7e872 /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00497778 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000082 [ 42] 0x0000000108d6a1ce /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00278990 _Z15mcr_initialize0PKDsPS0_RKN7mwboost10shared_ptrIN10foundation7msg_svc8eventmgr8EventMgrEEEN6mlutil10contextmgr5MvmIDE+00023038 [ 43] 0x0000000108c593f7 /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00345079 _ZN3iqm17DefaultPacketInfo7executeEP15inWorkSpace_tagN7mwboost10shared_ptrINS_22IntermediatePacketInfoEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueE+00001479 [ 44] 0x0000000108c20229 /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00111145 _ZN3iqm10DefaultIqm13dequeueHelperEN7mwboost8optionalImEERKNSt3112basic_stringIDsNS4_11char_traitsIDsEENS4_9allocatorIDsEEEEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueERKNS4_8functionIFbRKNS4_5tupleIJSG_NS1_10shared_ptrINS_22IntermediatePacketInfoEEESA_SA_NS4_10shared_ptrIN14cmddistributor16CoalesceableDataEEEEEEEEE+00001257 [ 45] 0x0000000108c12d8f /Applications/MATLAB_R2021a.app/bin/maci64/libmwiqm.dylib+00056719 _ZN3iqm10DefaultIqm7dequeueEN6mlutil14cmddistributor13WhenToDequeue13WhenToDequeueEN7mwboost8optionalImEE+00000655 [ 46] 0x0000000108d559c3 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00195011 _ZN3mcr7runtime22InterpreterThreadMulti14process_eventsEv+00000195 [ 47] 0x0000000108d56320 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00197408 _ZN3mcr7runtime22InterpreterThreadMulti10threadMainENSt3__18functionIFvvEEENS2_7promiseIvEE+00000672 [ 48] 0x0000000108d57791 /Applications/MATLAB_R2021a.app/bin/maci64/libmwmcr.dylib+00202641 _ZN3mcr7runtime22InterpreterThreadMulti10threadMainENSt3__18functionIFvvEEENS2_7promiseIvEE+00005905 [ 49] 0x00000001013e1a98 /Applications/MATLAB_R2021a.app/bin/maci64/libmwboost_thread.dylib+00010904 _ZN7mwboost6thread21start_thread_noexceptEv+00000312 [ 50] 0x00007fff7b8a42eb /usr/lib/system/libsystem_pthread.dylib+00013035 _pthread_body+00000126 [ 51] 0x00007fff7b8a7249 /usr/lib/system/libsystem_pthread.dylib+00025161 _pthread_start+00000066 [ 52] 0x00007fff7b8a340d /usr/lib/system/libsystem_pthread.dylib+00009229 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.

wschwanghart commented 2 years ago

Hi Pedro, this seems to be an issue with the latest MAC operating system. People found a solution here: https://github.com/wschwanghart/topotoolbox/issues/19 Hope it works for you. Let me know if it doesn't. Cheers, Wolfgang

valpedro commented 2 years ago

Hi Wolfgang, Thank you for the reply. I didn't see that previous issue, sorry and thanks for pointing it out. Dirk's solution to comment out the lines that use the mex functions worked for me. Thanks again! cheers Pedro

wschwanghart commented 2 years ago

Hi Pedro, ok, that's good. It should also be possible to just delete the mex-files, too. However, with the mex files some functions are a bit faster. You can also try to run the function compilemexfiles. Cheers, Wolfgang

Am Do., 14. Okt. 2021 um 20:03 Uhr schrieb Pedro Val < @.***>:

Hi Wolfgang, Thank you for the reply. I didn't see that previous issue, sorry and thanks for pointing it out. Dirk's solution to comment out the lines that use the mex functions worked for me. Thank again! cheers Pedro

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wschwanghart/topotoolbox/issues/21#issuecomment-943593814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RU3C47OZBTUG3JLHVWC3UG4LN7ANCNFSM5FVYGWUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.