How to resolve "Matlab stopped working and needs to close" in MATLAB 2021a.
56 views (last 30 days)
Show older comments
The following crash log appears when this message pops up. Matlab gets started, I run my simulation once, but when I try to view scope or run it a second time , this messsage gets popped up and closes matlab. I am using Matlab 2021a.The simulation I have been running for past few weeks and worked fine. Recenlty, there were some windows update as well as NVIDIA graphics driver update. I did both but the issue still persists. It began even before I did the updates.
MATLAB Log File: C:\Users\prara\AppData\Local\Temp\matlab_crash_dump.20112-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Access violation detected at 2025-02-23 14:07:51 +0530
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : windows-1252
Deployed : false
Graphics Driver : Microsoft Corporation GDI Generic Version 1.1.0
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce RTX 3050 Ti Laptop GPU Version 32.0.15.7247 (2025-2-15)
Graphics card 2 : Intel Corporation ( 0x8086 ) Intel(R) UHD Graphics Version 31.0.101.5333 (2024-2-21)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 6257193
MATLAB Root : C:\Program Files\MATLAB\Polyspace\R2021a
MATLAB Version : 9.10.0.1602886 (R2021a)
OpenGL : software
Operating System : Microsoft Windows 11 Home Single Language
Process ID : 20112
Processor ID : x86 Family 6 Model 141 Stepping 1, GenuineIntel
Session Key : 92c9acbe-4ec8-4147-a688-2d691c05a583
Window System : Version 10.0 (Build 26100)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: 'MCR 0 interpreter thread' id 20376
Register State (from fault):
RAX = 000000005f3a6fd0 RBX = 0000027412caf3f0
RCX = 000000000000001e RDX = 0000000000000008
RSP = 000000ce35ff7b68 RBP = 000000ce35ff7c99
RSI = 00000274ff40b5e0 RDI = 0000000000000001
R8 = ffffffffff7fffff R9 = 000000000000046f
R10 = 0000000000000000 R11 = 000000ce35ff7b50
R12 = 00000274c10fa660 R13 = 00000274c187d2e0
R14 = 0000027412caf3f0 R15 = 00000275015d98b8
RIP = 000000005f3a6fd0 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000005f3a6fd0 <unknown-module>+00000000
[ 1] 0x000002743d440027 <unknown-module>+00000000
[ 2] 0x00007ffbefec98b0 C:\WINDOWS\System32\ucrtbase.dll+01284272 mbcasemap+00000208
[ 3] 0x00007ffbefda0139 C:\WINDOWS\System32\ucrtbase.dll+00065849 malloc_base+00000057
[ 4] 0x00007ffbd2eb1f43 C:\Program Files\MATLAB\Polyspace\R2021a\toolbox\stateflow\stateflow\sf_sfun.mexw64+00139075 mexfilerequiredapiversion+00001651
[ 5] 0x00007ffbd2ea92a9 C:\Program Files\MATLAB\Polyspace\R2021a\toolbox\stateflow\stateflow\sf_sfun.mexw64+00103081 NoSetErrorStatusException::operator=+00027769
[ 6] 0x00007ffaf1f0d696 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sf_runtime.dll+00906902 sf_method_wrapper_jit+00000166
[ 7] 0x00007ffbd2ea91d0 C:\Program Files\MATLAB\Polyspace\R2021a\toolbox\stateflow\stateflow\sf_sfun.mexw64+00102864 NoSetErrorStatusException::operator=+00027552
[ 8] 0x00007ffbd2eacc8c C:\Program Files\MATLAB\Polyspace\R2021a\toolbox\stateflow\stateflow\sf_sfun.mexw64+00117900 NoSetErrorStatusException::operator=+00042588
[ 9] 0x00007ffbd2eaf67d C:\Program Files\MATLAB\Polyspace\R2021a\toolbox\stateflow\stateflow\sf_sfun.mexw64+00128637 mexFunction+00000125
[ 10] 0x00007ffb7430eec9 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmex.dll+00585417 mexfile::Inspector::needs_upgrade+00014585
[ 11] 0x00007ffb7430ffc2 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmex.dll+00589762 MexRetrieveVersion+00003074
[ 12] 0x00007ffb743102e7 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmex.dll+00590567 MexRetrieveVersion+00003879
[ 13] 0x00007ffb742f0542 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmex.dll+00460098 mexUnlock_800+00025874
[ 14] 0x00007ffb746249f8 bin\win64\pgo\m_dispatcher.dll+00084472 Mfh_MATLAB_fn_impl::need_FunctionExecutionFrame+00000568
[ 15] 0x00007ffb74625f1d bin\win64\pgo\m_dispatcher.dll+00089885 Mfh_file::dispatch+00000045
[ 16] 0x00007ffb74688e58 bin\win64\pgo\m_dispatcher.dll+00495192 mdDoMatlabFcnCall+00000132
[ 17] 0x00007ffb463dc0fa C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_utility.dll+00377082 SimpleUserException::~SimpleUserException+00000138
[ 18] 0x00007ffb4799b6e8 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsl_services.dll+02471656 CMatlabCommandNoWatermark::execute+00000056
[ 19] 0x00007ffb463dcc20 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_utility.dll+00379936 slDoMatlabFcnCall+00000096
[ 20] 0x00007ffb2ca7dc76 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_lang_blocks.dll+07068790 CallCMexSFcnSetupRuntimeResources+00000150
[ 21] 0x00007ffb2e208c3c C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+15371324 SFunctionExecBlock::SetupRuntimeResources+00001708
[ 22] 0x00007ffb2e035d43 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+13458755 BlockSetLocation+00000451
[ 23] 0x00007ffb2dbe2b31 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08923953 slAccPostBlock+00033329
[ 24] 0x00007ffb2dbbad2a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08760618 slAccRegPrmChangeFcn+00058618
[ 25] 0x00007ffb2dbe0b54 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08915796 slAccPostBlock+00025172
[ 26] 0x00007ffb2d80b873 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+04896883 SLDynamicEnumType::getConnectAccess+00099459
[ 27] 0x00007ffb2e035d43 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+13458755 BlockSetLocation+00000451
[ 28] 0x00007ffb2dbe2b31 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08923953 slAccPostBlock+00033329
[ 29] 0x00007ffb2dbbad2a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08760618 slAccRegPrmChangeFcn+00058618
[ 30] 0x00007ffb2dbe0b54 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+08915796 slAccPostBlock+00025172
[ 31] 0x00007ffb2ac625c0 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_engine_classes.dll+02106816 SLExecBD::modelSetupRuntimeResources+00000096
[ 32] 0x00007ffb2f353178 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_link_bd.dll+01126776 slink::CreateSlModelForLink+00025384
[ 33] 0x00007ffb2f35d0d3 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_link_bd.dll+01167571 sleInitModelConditions+00001347
[ 34] 0x00007ffb2f35cc74 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_link_bd.dll+01166452 sleInitModelConditions+00000228
[ 35] 0x00007ffb2e27432f C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+15811375 slstSetOutputPortRateID+00131711
[ 36] 0x00007ffb2e279d26 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+15834406 slstSetOutputPortRateID+00154742
[ 37] 0x00007ffb2e2804a7 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+15860903 slstSetOutputPortRateID+00181239
[ 38] 0x00007ffb2e2bbcf2 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+16104690 slstSetOutputPortRateID+00425026
[ 39] 0x00007ffb2d6b1022 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+03477538 ExitPauseInDebuggerMenuSim+00001346
[ 40] 0x00007ffb2de83706 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwsimulink.dll+11679494 SLGlue::simulationStartPauseContinueNARMode+00000182
[ 41] 0x00007ffb028d5509 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\sl_mi.dll+00349449 SLM3I::mi::initCosSFBlockOpenNotification+00074009
[ 42] 0x00007ffb67cdd42e bin\win64\pgo\mcos_impl.dll+00381998
[ 43] 0x00007ffb67cdc9d5 bin\win64\pgo\mcos_impl.dll+00379349
[ 44] 0x00007ffb67cdc670 bin\win64\pgo\mcos_impl.dll+00378480
[ 45] 0x00007ffb67d1d543 bin\win64\pgo\mcos_impl.dll+00644419 mdMethodListAllFcn+00084595
[ 46] 0x00007ffb67d1d458 bin\win64\pgo\mcos_impl.dll+00644184 mdMethodListAllFcn+00084360
[ 47] 0x00007ffb67d1d33e bin\win64\pgo\mcos_impl.dll+00643902 mdMethodListAllFcn+00084078
[ 48] 0x00007ffb67ce083d bin\win64\pgo\mcos_impl.dll+00395325 mdIsA+00002017
[ 49] 0x00007ffb74624630 bin\win64\pgo\m_dispatcher.dll+00083504 Mfh_MATLAB_fn_impl::ensure_loading_of_load_module+00001856
[ 50] 0x00007ffb746247b9 bin\win64\pgo\m_dispatcher.dll+00083897 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 51] 0x00007ffb717ca62e bin\win64\pgo\m_lxe.dll+00370222
[ 52] 0x00007ffb7184a093 bin\win64\pgo\m_lxe.dll+00893075 MathWorks::lxe::initializeFcn+00521059
[ 53] 0x00007ffb7936f68c bin\win64\pgo\libmx.dll+00652940 matrix::detail::noninlined::mx_array_api::mxFevalFunctionHandle+00000036
[ 54] 0x00007ffb744f5a75 bin\win64\pgo\m_interpreter.dll+00154229 mwboost::serialization::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >+00027445
[ 55] 0x00007ffb71288bea C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\builtin.dll+00101354 MathWorks::builtin::BuiltinFcn::invoke+00001130
[ 56] 0x00007ffb74634b1c bin\win64\pgo\m_dispatcher.dll+00150300 Mfh_MATLAB_fn_impl::dispatch_mf_with_reuse+00000136
[ 57] 0x00007ffb74624630 bin\win64\pgo\m_dispatcher.dll+00083504 Mfh_MATLAB_fn_impl::ensure_loading_of_load_module+00001856
[ 58] 0x00007ffb746247b9 bin\win64\pgo\m_dispatcher.dll+00083897 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 59] 0x00007ffb717ca62e bin\win64\pgo\m_lxe.dll+00370222
[ 60] 0x00007ffb717c6436 bin\win64\pgo\m_lxe.dll+00353334
[ 61] 0x00007ffb717c638f bin\win64\pgo\m_lxe.dll+00353167
[ 62] 0x00007ffb744dd550 bin\win64\pgo\m_interpreter.dll+00054608 inCallFcn+00000084
[ 63] 0x00007ffb7192f126 bin\win64\pgo\m_lxe.dll+01831206 mwboost::archive::detail::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>+00022786
[ 64] 0x00007ffb744e26e2 bin\win64\pgo\m_interpreter.dll+00075490 inCallFcnWithTrap+00000098
[ 65] 0x00007ffb093b4bc9 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+03623881 dig::FunctionInfoToArray+00000649
[ 66] 0x00007ffb0938121a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+03412506 dig::ActionCallback::operator()+00000826
[ 67] 0x00007ffb09380efd C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+03411709 dig::ActionCallback::operator()+00000029
[ 68] 0x00007ffb092727d4 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+02303956 dig::ActionService::executeActionImpl+00001732
[ 69] 0x00007ffb0927185f C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+02299999 dig::ActionService::executeAction+00000287
[ 70] 0x00007ffb09271e64 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+02301540 dig::ActionService::executeAction+00000388
[ 71] 0x00007ffb09406164 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+03957092 dig::View::handleEvent+00001252
[ 72] 0x00007ffb093fdc38 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+03923000 dig::ToolStrip::handleEvent+00001704
[ 73] 0x00007ffb092da182 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+02728322 dig::UDDPropertyAdapter::setPropertyValue+00011682
[ 74] 0x00007ffb0921b3ab C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+01946539 dig::config::Widget::Impl::printHierarchy+00101019
[ 75] 0x00007ffb0920b9f3 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+01882611 dig::config::Widget::Impl::printHierarchy+00037091
[ 76] 0x00007ffb0921f2f0 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\dig.dll+01962736 dig::config::Widget::Impl::printHierarchy+00117216
[ 77] 0x00007ffb74fc392a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00801066 iqm::PackagedTaskPlugin::execute+00000074
[ 78] 0x00007ffb750ee1ed C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00516589 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00009613
[ 79] 0x00007ffb74f965ec C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00615916 iqm::Iqm::setupIqmFcnPtrs+00106204
[ 80] 0x00007ffb74f671f0 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00422384 iqm::Iqm::create+00007024
[ 81] 0x00007ffb74478eaf C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwbridge.dll+00102063 ioReadLine+00000463
[ 82] 0x00007ffb74478ca5 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwbridge.dll+00101541 ioReadLine+00000165
[ 83] 0x00007ffb7448a761 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwbridge.dll+00173921 mnGetCommandLineBuffer+00000289
[ 84] 0x00007ffb7448abb7 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\libmwbridge.dll+00175031 mnParser+00000487
[ 85] 0x00007ffb750f3d86 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00540038 mcr_set_enableReadingFromStdin+00013894
[ 86] 0x00007ffb7508f5d3 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00128467 mcrFunctionSignature::set_signature+00107555
[ 87] 0x00007ffb750ab550 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00243024 mcrFunctionSignature::set_signature+00222112
[ 88] 0x00007ffb74fc392a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00801066 iqm::PackagedTaskPlugin::execute+00000074
[ 89] 0x00007ffb750ee1ed C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00516589 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00009613
[ 90] 0x00007ffb74f965ec C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00615916 iqm::Iqm::setupIqmFcnPtrs+00106204
[ 91] 0x00007ffb74f684bc C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00427196 iqm::Iqm::create+00011836
[ 92] 0x00007ffb74f67c32 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\iqm.dll+00425010 iqm::Iqm::create+00009650
[ 93] 0x00007ffb750c58fc C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00350460 mcrInstantiationError::operator=+00010428
[ 94] 0x00007ffb750c64ac C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00353452 mcrInstantiationError::operator=+00013420
[ 95] 0x00007ffb750c3ac0 C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mcr.dll+00342720 mcrInstantiationError::operator=+00002688
[ 96] 0x00007ffb78fb9b9a C:\Program Files\MATLAB\Polyspace\R2021a\bin\win64\mwboost_thread-vc142-mt-x64-1_72.dll+00039834 mwboost::thread::swap+00000074
[ 97] 0x00007ffbefd937b0 C:\WINDOWS\System32\ucrtbase.dll+00014256 wcsrchr+00000336
[ 98] 0x00007ffbf0f7e8d7 C:\WINDOWS\System32\KERNEL32.DLL+00190679 BaseThreadInitThunk+00000023
[ 99] 0x00007ffbf29fbf2c C:\WINDOWS\SYSTEM32\ntdll.dll+00769836 RtlUserThreadStart+00000044
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 1 at Sun Feb 23 14:07:47 2025
Most Recent Tool Interaction:
Editor 1: tools idle, no most recently active tool Editor 2: tools idle, no most recently active tool Editor 3: tools idle, no most recently active tool Editor 4: tools idle, class Simulink::QuickInsertTool is most recently active tool since Sun Feb 23 14:00:50 2025
Editor 5: tools idle, no most recently active tool
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.
1 Comment
Avni Agrawal
on 25 Feb 2025
Does this issue happen everytime with you? Have you tried running simulation into different matlab version or OS?
Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!