Random Matlab Crash when using for/parfor loops for many times
12 views (last 30 days)
Show older comments
I run a permutation test code which includes a huge for/parfor loop. MATLAB then starts to crash randomly (longer or shorter after I start running). Can anyone help? Thank you very much.
MATLAB Log File: C:\Users\ADMINI~1\AppData\Local\Temp\matlab_crash_dump.46788-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Access violation detected at 2025-06-21 12:46:22 +0800
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Graphics card 1 : NVIDIA ( 0x10de ) NVIDIA GeForce RTX 3080 Version 32.0.15.7680 (2025-6-12)
MATLAB Architecture : win64
MATLAB Entitlement ID : 3633949
MATLAB Root : E:\MATLAB2025a
MATLAB Version : 25.1.0.2943329 (R2025a)
OpenGL : hardware
Operating System : Microsoft Windows 11 专业版
Process ID : 46788
Processor ID : x86 Family 6 Model 183 Stepping 1, GenuineIntel
Session Key : 7j442y3njn97ss1rasbn58b4a
Window System : Version 10.0 (Build 22621)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: 'MCR 0 interpreter thread' id 47260
Register State (from fault):
RAX = 0000000000000000 RBX = 000002a497142240
RCX = 0000000000001a38 RDX = 0ffffffffffff000
RSP = 000000c32d2faef0 RBP = 000002a49e8ced40
RSI = 000002a49e8ced40 RDI = 000002a49e8ced40
R8 = 0000000000000000 R9 = 0000000000000010
R10 = 000002a497143a88 R11 = 000000000000000b
R12 = 000002a3e430f568 R13 = 00007ffbd5b19590
R14 = 000002a3b99f8660 R15 = 000002a49e8d9880
RIP = 00007ffc28227013 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00007ffc28227013 E:\MATLAB2025a\bin\win64\libmx.dll+02846739 matrix::detail::noninlined::mx_array_api::mxCreateSharedCopyNotOnArrayList+00000019
[ 1] 0x00007ffbd59a589c E:\MATLAB2025a\bin\win64\mcos_impl.dll+05200028 createScalarDefaultPropValue+00407500
[ 2] 0x00007ffbd55f9864 E:\MATLAB2025a\bin\win64\mcos_impl.dll+01349732 mwboost::serialization::singleton_module::unlock+00792868
[ 3] 0x00007ffbd56976ea E:\MATLAB2025a\bin\win64\mcos_impl.dll+01996522 mwboost::archive::codecvt_null<wchar_t>::do_out+00605706
[ 4] 0x00007ffbd5717973 E:\MATLAB2025a\bin\win64\mcos_impl.dll+02521459 mcos::impl::terminateFcn+00107587
[ 5] 0x00007ffbd59024c5 E:\MATLAB2025a\bin\win64\mcos_impl.dll+04531397 mwboost::archive::detail::oserializer<mwboost::archive::text_oarchive,MathWorks::MatlabComponents::ComponentIdentifier>::save_object_data+00411493
[ 6] 0x00007ffbd5718e98 E:\MATLAB2025a\bin\win64\mcos_impl.dll+02526872 mcos::impl::terminateFcn+00113000
[ 7] 0x00007ffbd57191b5 E:\MATLAB2025a\bin\win64\mcos_impl.dll+02527669 mcos::impl::terminateFcn+00113797
[ 8] 0x00007ffbd5932e9d E:\MATLAB2025a\bin\win64\mcos_impl.dll+04730525 namedArgsToCell+00011469
[ 9] 0x00007ffbd5953072 E:\MATLAB2025a\bin\win64\mcos_impl.dll+04862066 createScalarDefaultPropValue+00069538
[ 10] 0x00007ffc4c67e809 E:\MATLAB2025a\bin\win64\mcos.dll+00190473 omDirectSetProperty+00000057
[ 11] 0x00007ffc2fe282d3 E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+00754387 MathWorks::lxe::McosModuleImplementation::DirectSetProperty+00000051
[ 12] 0x00007ffc2fe158e4 E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+00678116 MathWorks::lxe::RegisterLazyColonIndexingClasses+00129636
[ 13] 0x00007ffc2fec456d E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+01394029 MathWorks::lxe::set_ldot_pointer_for_builtin_subsasgn+00008365
[ 14] 0x00007ffc2fec3f1c E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+01392412 MathWorks::lxe::set_ldot_pointer_for_builtin_subsasgn+00006748
[ 15] 0x00007ffc2fec4e0b E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+01396235 MathWorks::lxe::set_ldot_pointer_for_builtin_subsasgn+00010571
[ 16] 0x00007ffc2fece7f8 E:\MATLAB2025a\bin\win64\libmwlxeindexing.dll+01435640 MathWorks::lxe::assign_dot_guarantee_id_pointer_mcos+00000104
[ 17] 0x00007ffbe14460f5 E:\MATLAB2025a\bin\win64\m_lxe.dll+05529845 MathWorks::lxe::XvalueFactory::XvalueDeleter::XvalueDeleter+00267509
[ 18] 0x00007ffbe1466c11 E:\MATLAB2025a\bin\win64\m_lxe.dll+05663761 MathWorks::lxe::XvalueFactory::XvalueDeleter::XvalueDeleter+00401425
[ 19] 0x00007ffbe1308fa7 E:\MATLAB2025a\bin\win64\m_lxe.dll+04231079 MathWorks::lxe::GetTag+00007591
[ 20] 0x00007ffbe12f1edf E:\MATLAB2025a\bin\win64\m_lxe.dll+04136671 MathWorks::lxe::SetEngineImplUnlinkFlagForAllCallsOnStack+00045903
[ 21] 0x00007ffbe12f6455 E:\MATLAB2025a\bin\win64\m_lxe.dll+04154453 MathWorks::lxe::SetEngineImplUnlinkFlagForAllCallsOnStack+00063685
[ 22] 0x00007ffc34c55226 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+01528358 FeatureTestObservableWorkspace+00215846
[ 23] 0x00007ffc34b8cee6 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+00708326 mwboost::archive::detail::pointer_oserializer<mwboost::archive::xml_oarchive,MathWorks::lxe::PreLineExecutionEvent>::save_object_ptr+00078390
[ 24] 0x00007ffc34b8e9f4 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+00715252 mwboost::archive::detail::pointer_oserializer<mwboost::archive::xml_oarchive,MathWorks::lxe::PreLineExecutionEvent>::save_object_ptr+00085316
[ 25] 0x00007ffc34c17797 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+01275799 mwboost::archive::detail::oserializer<mwboost::archive::text_oarchive,MathWorks::MatlabComponents::ComponentIdentifier>::save_object_data+00360391
[ 26] 0x00007ffc34c19597 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+01283479 mwboost::archive::detail::oserializer<mwboost::archive::text_oarchive,MathWorks::MatlabComponents::ComponentIdentifier>::save_object_data+00368071
[ 27] 0x00007ffc34c18880 E:\MATLAB2025a\bin\win64\libmwlxemainservices.dll+01280128 mwboost::archive::detail::oserializer<mwboost::archive::text_oarchive,MathWorks::MatlabComponents::ComponentIdentifier>::save_object_data+00364720
[ 28] 0x00007ffc63f79f99 E:\MATLAB2025a\bin\win64\libmwbridge.dll+00303001 mnGetPrompt+00014009
[ 29] 0x00007ffbecb1b7e6 E:\MATLAB2025a\bin\win64\iqm.dll+00505830 iqm::Iqm::instance+00002358
[ 30] 0x00007ffbecb75382 E:\MATLAB2025a\bin\win64\iqm.dll+00873346 iqm::UserEvalPlugin::execute+00001314
[ 31] 0x00007ffbecb4267f E:\MATLAB2025a\bin\win64\iqm.dll+00665215 iqm::Iqm::setupIqmFcnPtrs+00111535
[ 32] 0x00007ffbecb4e71d E:\MATLAB2025a\bin\win64\iqm.dll+00714525 iqm::Iqm::setupIqmFcnPtrs+00160845
[ 33] 0x00007ffbecb0eb7b E:\MATLAB2025a\bin\win64\iqm.dll+00453499 iqm::Iqm::create+00010523
[ 34] 0x00007ffc63f497e6 E:\MATLAB2025a\bin\win64\libmwbridge.dll+00104422 ioReadLine+00000406
[ 35] 0x00007ffc63f49615 E:\MATLAB2025a\bin\win64\libmwbridge.dll+00103957 ioReadLine+00000165
[ 36] 0x00007ffc63f7a360 E:\MATLAB2025a\bin\win64\libmwbridge.dll+00303968 mnGetCommandLineBuffer+00000288
[ 37] 0x00007ffc63f7a807 E:\MATLAB2025a\bin\win64\libmwbridge.dll+00305159 mnParser+00000487
[ 38] 0x00007ffc6404c56f E:\MATLAB2025a\bin\win64\mcr.dll+00443759 mcr_initialize_main+00011855
[ 39] 0x00007ffc63ff5e2e E:\MATLAB2025a\bin\win64\mcr.dll+00089646 mcrFunctionSignature::set_signature+00066462
[ 40] 0x00007ffc6400f572 E:\MATLAB2025a\bin\win64\mcr.dll+00193906 mwboost::archive::codecvt_null<wchar_t>::`default constructor closure'+00015762
[ 41] 0x00007ffbecb702da E:\MATLAB2025a\bin\win64\iqm.dll+00852698 iqm::PackagedTaskPlugin::execute+00000074
[ 42] 0x00007ffbecb4267f E:\MATLAB2025a\bin\win64\iqm.dll+00665215 iqm::Iqm::setupIqmFcnPtrs+00111535
[ 43] 0x00007ffbecb0f49a E:\MATLAB2025a\bin\win64\iqm.dll+00455834 iqm::Iqm::create+00012858
[ 44] 0x00007ffbecb0f981 E:\MATLAB2025a\bin\win64\iqm.dll+00457089 iqm::Iqm::create+00014113
[ 45] 0x00007ffbecb0ee0d E:\MATLAB2025a\bin\win64\iqm.dll+00454157 iqm::Iqm::create+00011181
[ 46] 0x00007ffc6402921c E:\MATLAB2025a\bin\win64\mcr.dll+00299548 mcrInstantiationError::operator=+00010668
[ 47] 0x00007ffc64029cdf E:\MATLAB2025a\bin\win64\mcr.dll+00302303 mcrInstantiationError::operator=+00013423
[ 48] 0x00007ffc640272e1 E:\MATLAB2025a\bin\win64\mcr.dll+00291553 mcrInstantiationError::operator=+00002673
[ 49] 0x00007ffc8cf28fba E:\MATLAB2025a\bin\win64\mwboost_thread-vc143-mt-x64-1_81.dll+00036794 mwboost::detail::win32::handle_manager::swap+00000650
[ 50] 0x00007ffca9f69333 C:\Windows\System32\ucrtbase.dll+00168755 recalloc+00000163
[ 51] 0x00007ffcab28257d C:\Windows\System32\KERNEL32.DLL+00075133 BaseThreadInitThunk+00000029
[ 52] 0x00007ffcac80af08 C:\Windows\SYSTEM32\ntdll.dll+00372488 RtlUserThreadStart+00000040
6 Comments
Edric Ellis
on 25 Jun 2025
Please could you report this to MathWorks support directly - this will help us get to the bottom of things more efficiently.
Answers (0)
See Also
Categories
Find more on Startup and Shutdown 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!