MATLAB Abnormal termination: Access Violation when running script from command line/batch mode
12 views (last 30 days)
Show older comments
Hello i'm running into this error using R2019a (9.6.0.1072779) when running one of my scripts via command line in the batch mode.
Calling the script inmatlab itself it's running just fine.
It's definetly this line:
a = sim('modelxy', 'CaptureErrors', 'on');
I know that running the simulation shows a lot of warnings, but however they're not critical from my pov, since like i mentioned it's just running fine within matlab.
The problem is reproduceable on several pcs. I tried to run the command line within privileged/admin rights, but didn't succeed.
I saw older posts from 2016/2017 but they've not been particular about this error code being thrown only when run in batch mode.
In the log below i removed mostly of the signal-names
C:\matlab -batch "TestAutomationJenkins('A123_456_789');"
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Executing PostLoad Function for model
Setting Storage Classes for Inports and Outports to default
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Data <a href="matlab:sf('Open', 54)">''</a> is defined, but is never used in the Test Sequence block. <a href=
"matlab: internal.stateflow.dialogs.UnusedObjectDeleter.createDeleter(54)"> Delete this data.</a>
> In sldiagviewer.reportWarning
In construct_error (line 132)
In sfprivate (line 13)
In TestAutomationJenkins (line 25)
Warning: Data <a href="matlab:sf('Open', 55)">'vlse'</a> is defined, but is never used in the Test Sequence block.
<a href= "matlab: internal.stateflow.dialogs.UnusedObjectDeleter.createDeleter(55)"> Delete this data.</a>
> In sldiagviewer.reportWarning
In construct_error (line 132)
In sfprivate (line 13)
In construct_module (line 99)
In generate_code_for_charts_and_machine (line 136)
In sfc (line 166)
In targetman>code_method (line 362)
In targetman>method_nag_wrapper (line 153)
In targetman (line 82)
In autobuild_kernel>autobuild_local (line 184)
In autobuild_kernel (line 53)
In autobuild_driver (line 118)
In slsf (line 128)
In TestAutomationJenkins (line 25)
Warning: Parameter precision loss occurred for 'Value' of '/'. The parameter's value cannot be represented
exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Suggested Actions:
ò - Suppress
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
--------------------------------------------------------------------------------
Access violation detected at Di Feb 02 10:32:58 2021 +0100
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : windows-1252
Deployed : false
Graphics Driver : Unknown hardware
Graphics card 1 : Intel Corporation ( 0x8086 ) Intel(R) HD Graphics 620 Version 24.20.100.6286 (2018-8-15)
Java Version : Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : win64
MATLAB Entitlement ID : 6428867
MATLAB Root : C:\Program Files\MATLAB\R2019a Training
MATLAB Version : 9.6.0.1072779 (R2019a)
OpenGL : hardware
Operating System : Microsoft Windows 10 Enterprise
ProcWarning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Output port 1 of '/' is not connected.
> In TestAutomationJenkins (line 25)
Warning: Parameter precision loss occurred for 'Value' of '/'. The parameter's value cannot be represented
exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration
Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters gress ID : 19208
Processor ID : x86 Family 6 Model 142 Stepping 9, GenuineIntel
Session Key : 25195433-36dc-4a36-89ca-711a87fd41e8
Window System : Version 10.0 (Build 16299)
Fault Count: 1
Abnormal termination:
Access violation
Register State (from fault):
RAX = 000000012d4766e8 RBX = 00000000043f6928
RCX = 0000000000000090 RDX = 00000000043f6890
RSP = 00000000043f6788 RBP = 0000000000000000
RSI = 00000000043f6830 RDI = 00000000043f6890
R8 = 000000000000002a R9 = 00000000000003aa
R10 = 00000000001a0f00 R11 = 00000000043f66c0
R12 = 0000000000000000 R13 = 0000000000000040
R14 = 00000001c920abf0 R15 = 000000010cb89760
RIP = 000000012d138550 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000012d138550 bin\win64\sldd.dll+02065744 sldd::DDMgrEventHandler::~DDMgrEventHandler+00000560
[ 1] 0x000000012d16e4e1 bin\win64\soup to 'none'.
Suggested Actions:
ò - Suppress
> In TestAutomationJenkins (line 25)
ldd.dll+02286817 SlDDPackager::writeToFile+00215857
[ 2] 0x000000012d175411 bin\win64\sldd.dll+02315281 sldd::ddConnectionOfMxArray+00001185
[ 3] 0x000000012d174b27 bin\win64\sldd.dll+02312999 sldd::clearCacheForDictionaryBWSAccessFlag+00000343
[ 4] 0x000000012d16f3c0 bin\win64\sldd.dll+02290624 sldd::DictionaryReferenceToken::DictionaryReferenceToken+00003328
[ 5] 0x000000012d16ef34 bin\win64\sldd.dll+02289460 sldd::DictionaryReferenceToken::DictionaryReferenceToken+00002164
[ 6] 0x00007ffd472f34b3 C:\WINDOWS\System32\ucrtbase.dll+00079027 execute_onexit_table+00000819
[ 7] 0x00007ffd472f328b C:\WINDOWS\System32\ucrtbase.dll+00078475 execute_onexit_table+00000267
[ 8] 0x00007ffd472f31be C:\WINDOWS\System32\ucrtbase.dll+00078270 execute_onexit_table+00000062
[ 9] 0x000000012d253576 bin\win64\sldd.dll+03224950 mcos::factory::HandleClassInfo<SLDDAdapter,0>::isHandleClass+00013462
[ 10] 0x000000012d253674 bin\win64\sldd.dll+03225204 mcos::factory::HandleClassInfo<SLDDAdapter,0>::isHandleClass+00013716
[ 11] 0x00007ffd4a0512c3 C:\WINDOWS\SYSTEM32\ntdll.dll+00201411 RtlDeactivateActivationContextUnsafeFast+00000435
[ 12] 0x00007ffd4a096325 C:\WINDOWS\SYSTEM32\ntdll.dll+00484133 LdrShutdownProcess+00000293
[ 13] 0x00007ffd4a0961e4 C:\WINDOWS\SYSTEM32\ntdll.dll+00483812 RtlExitUserProcess+00000180
[ 14] 0x00007ffd49b1d26a C:\WINDOWS\System32\KERNEL32.DLL+00119402 ExitProcess+00000010
[ 15] 0x00007ffd472f5954 C:\WINDOWS\System32\ucrtbase.dll+00088404 exit+00000244
[ 16] 0x00007ffd472f58db C:\WINDOWS\System32\ucrtbase.dll+00088283 exit+00000123
[ 17] 0x000000001d4e5579 bin\win64\mcr.dll+01135993 mcr::shutdown::startWatchdog+00040937
[ 18] 0x000000001d4d9d83 bin\win64\mcr.dll+01088899 QueryMLFcnTable_mcr+00017891
[ 19] 0x000000001d4d8a36 bin\win64\mcr.dll+01083958 QueryMLFcnTable_mcr+00012950
[ 20] 0x000000001d4db32c bin\win64\mcr.dll+01094444 QueryMLFcnTable_mcr+00023436
[ 21] 0x000000001d4db3a4 bin\win64\mcr.dll+01094564 QueryMLFcnTable_mcr+00023556
[ 22] 0x000000001d4daaaf bin\win64\mcr.dll+01092271 QueryMLFcnTable_mcr+00021263
[ 23] 0x000000001d4da8ba bin\win64\mcr.dll+01091770 QueryMLFcnTable_mcr+00020762
[ 24] 0x000000001d626e0a bin\win64\pgo\m_dispatcher.dll+00028170 mdFindFunctionFromUserSpecifiedName+00016858
[ 25] 0x000000001d62736c bin\win64\pgo\m_dispatcher.dll+00029548 mdFindFunctionFromUserSpecifiedName+00018236
[ 26] 0x000000001d6280f1 bin\win64\pgo\m_dispatcher.dll+00033009 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 27] 0x000000001e481f94 bin\win64\pgo\m_lxe.dll+00466836
[ 28] 0x000000001e47da37 bin\win64\pgo\m_lxe.dll+00449079
[ 29] 0x000000001e47d7d2 bin\win64\pgo\m_lxe.dll+00448466
[ 30] 0x000000001e454032 bin\win64\pgo\m_lxe.dll+00278578
[ 31] 0x000000001e666c16 bin\win64\pgo\m_lxe.dll+02452502 mwboost::archive::detail::oserializer<mwboost::archive::xml_oarchive,std::vector<unsigned short,std::allocator<unsigned short> > >::oserializer<mwboost::archive::xml_oarchive,std::vector<unsigned short,std::allocator<unsigned short> > >+00013150
[ 32] 0x000000001e666bbd bin\win64\pgo\m_lxe.dll+02452413 mwboost::archive::detail::oserializer<mwboost::archive::xml_oarchive,std::vector<unsigned short,std::allocator<unsigned short> > >::oserializer<mwboost::archive::xml_oarchive,std::vector<unsigned short,std::allocator<unsigned short> > >+00013061
[ 33] 0x000000001e453704 bin\win64\pgo\m_lxe.dll+00276228
[ 34] 0x000000001d85619b bin\win64\pgo\m_interpreter.dll+00090523 inCallFcnWithTrapInDesiredWSAndPublishEvents+00000095
[ 35] 0x00000000fd012802 bin\win64\iqm.dll+00534530 iqm::BaseFEvalPlugin::inCallFcnWithTrap+00000066
[ 36] 0x00000000fd01224d bin\win64\iqm.dll+00533069 iqm::BaseFEvalPlugin::execute+00000413
[ 37] 0x00000000fd012092 bin\win64\iqm.dll+00532626 iqm::FEvalPlugin<cmddistributor::FEvalIIP>::execute+00000018
[ 38] 0x000000001d450adb bin\win64\mcr.dll+00527067 mcr::runtime::setInterpreterThreadSingletonToCurrent+00184763
[ 39] 0x00000000fd004c27 bin\win64\iqm.dll+00478247 iqm::Iqm::setupIqmFcnPtrs+00088327
[ 40] 0x00000000fd004c79 bin\win64\iqm.dll+00478329 iqm::Iqm::setupIqmFcnPtrs+00088409
[ 41] 0x00000000fd004a27 bin\win64\iqm.dll+00477735 iqm::Iqm::setupIqmFcnPtrs+00087815
[ 42] 0x00000000fcfe3a24 bin\win64\iqm.dll+00342564 iqm::Iqm::create+00030804
[ 43] 0x00000000fcfd01a7 bin\win64\iqm.dll+00262567 iqm::DebugLoopGuard::~DebugLoopGuard+00151351
[ 44] 0x000000001322f1eb bin\win64\mlutil.dll+02945515 cmddistributor::IIPRunNowMessage::deliver+00000027
[ 45] 0x00000000fdee1389 bin\win64\libmwms.dll+01905545 foundation::msg_svc::exchange::MessageQueue::deliver+00000233
[ 46] 0x00000000fdee23c0 bin\win64\libmwms.dll+01909696 foundation::msg_svc::exchange::MessageQueue::sendReply+00003584
[ 47] 0x00000000fdecb7f0 bin\win64\libmwms.dll+01816560 foundation::msg_svc::exchange::CommunicationErrorEvent::getTransportID+00080976
[ 48] 0x00000000fded7ea0 bin\win64\libmwms.dll+01867424 foundation::msg_svc::exchange::CommunicationErrorEvent::getTransportID+00131840
[ 49] 0x00000000fded6e72 bin\win64\libmwms.dll+01863282 foundation::msg_svc::exchange::CommunicationErrorEvent::getTransportID+00127698
[ 50] 0x00000000130a07dd bin\win64\mlutil.dll+01312733 cmddistributor::IIP::EventMgrBypass::operator=+00050797
[ 51] 0x0000000013076c26 bin\win64\mlutil.dll+01141798 cmddistributor::DebugLoopEvent::serializeExplicit+00020038
[ 52] 0x000000001d4172f3 bin\win64\mcr.dll+00291571 mcrOptions::set_use_license_manager+00256291
[ 53] 0x000000001d4118d6 bin\win64\mcr.dll+00268502 mcrOptions::set_use_license_manager+00233222
[ 54] 0x000000001d3f17b7 bin\win64\mcr.dll+00137143 mcrOptions::set_use_license_manager+00101863
[ 55] 0x000000001d416e54 bin\win64\mcr.dll+00290388 mcrOptions::set_use_license_manager+00255108
[ 56] 0x000000001d41142e bin\win64\mcr.dll+00267310 mcrOptions::set_use_license_manager+00232030
[ 57] 0x000000001d3ec34a bin\win64\mcr.dll+00115530 mcrOptions::set_use_license_manager+00080250
[ 58] 0x000000001d40a324 bin\win64\mcr.dll+00238372 mcrOptions::set_use_license_manager+00203092
[ 59] 0x00000000fd0264de bin\win64\iqm.dll+00615646 iqm::PackagedTaskPlugin::execute+00000894
[ 60] 0x00000000fd026353 bin\win64\iqm.dll+00615251 iqm::PackagedTaskPlugin::execute+00000499
[ 61] 0x000000001d450d9b bin\win64\mcr.dll+00527771 mcr::runtime::setInterpreterThreadSingletonToCurrent+00185467
[ 62] 0x00000000fd004c27 bin\win64\iqm.dll+00478247 iqm::Iqm::setupIqmFcnPtrs+00088327
[ 63] 0x00000000fd004c79 bin\win64\iqm.dll+00478329 iqm::Iqm::setupIqmFcnPtrs+00088409
[ 64] 0x00000000fd004a27 bin\win64\iqm.dll+00477735 iqm::Iqm::setupIqmFcnPtrs+00087815
[ 65] 0x00000000fcfdd61e bin\win64\iqm.dll+00316958 iqm::Iqm::create+00005198
[ 66] 0x00000000fb5fe917 bin\win64\libmwbridge.dll+00059671 ioReadLine+00000887
[ 67] 0x00000000fb5fe6ca bin\win64\libmwbridge.dll+00059082 ioReadLine+00000298
[ 68] 0x00000000fb60f61b bin\win64\libmwbridge.dll+00128539 mnDebugPrompt+00002155
[ 69] 0x00000000fb60eee5 bin\win64\libmwbridge.dll+00126693 mnDebugPrompt+00000309
[ 70] 0x00000000fb60f990 bin\win64\libmwbridge.dll+00129424 mnParser+00000592
[ 71] 0x000000001d4a9818 bin\win64\mcr.dll+00890904 mcrInstance::releaseThread+00002552
[ 72] 0x000000001d3ec34a bin\win64\mcr.dll+00115530 mcrOptions::set_use_license_manager+00080250
[ 73] 0x000000001d40a324 bin\win64\mcr.dll+00238372 mcrOptions::set_use_license_manager+00203092
[ 74] 0x00000000fd0264de bin\win64\iqm.dll+00615646 iqm::PackagedTaskPlugin::execute+00000894
[ 75] 0x00000000fd026353 bin\win64\iqm.dll+00615251 iqm::PackagedTaskPlugin::execute+00000499
[ 76] 0x000000001d450d9b bin\win64\mcr.dll+00527771 mcr::runtime::setInterpreterThreadSingletonToCurrent+00185467
[ 77] 0x00000000fd004c27 bin\win64\iqm.dll+00478247 iqm::Iqm::setupIqmFcnPtrs+00088327
[ 78] 0x00000000fd004c79 bin\win64\iqm.dll+00478329 iqm::Iqm::setupIqmFcnPtrs+00088409
[ 79] 0x00000000fd004a27 bin\win64\iqm.dll+00477735 iqm::Iqm::setupIqmFcnPtrs+00087815
[ 80] 0x00000000fcfde61a bin\win64\iqm.dll+00321050 iqm::Iqm::create+00009290
[ 81] 0x00000000fcfddd9f bin\win64\iqm.dll+00318879 iqm::Iqm::create+00007119
[ 82] 0x00000000fcfdfc7d bin\win64\iqm.dll+00326781 iqm::Iqm::create+00015021
[ 83] 0x0000000100233045 bin\win64\libmwservices.dll+02371653 services::system_events::PpeDispatchHook::dispatchOne+00036213
[ 84] 0x00000001002423b3 bin\win64\libmwservices.dll+02433971 sysq::addProcessPendingEventsUnitTestHook+00006035
[ 85] 0x0000000100243c60 bin\win64\libmwservices.dll+02440288 sysq::getCondition+00004208
[ 86] 0x000000010024527d bin\win64\libmwservices.dll+02445949 svWS_ProcessPendingEvents+00000221
[ 87] 0x000000001d429ed4 bin\win64\mcr.dll+00368340 mcr::runtime::setInterpreterThreadSingletonToCurrent+00026036
[ 88] 0x000000001d42a6a6 bin\win64\mcr.dll+00370342 mcr::runtime::setInterpreterThreadSingletonToCurrent+00028038
[ 89] 0x000000001d421eff bin\win64\mcr.dll+00335615 mcr_process_events+00000959
[ 90] 0x000000001d31f951 bin\win64\MVMLocal.dll+00391505 mvm_server::inproc::LocalFactory::terminate+00186993
[ 91] 0x00000000fa9e15e0 bin\win64\mvm.dll+01775072 mvm::detail::SessionImpl::initWithOptions+00000592
[ 92] 0x00000000fa9e22a0 bin\win64\mvm.dll+01778336 mvm::detail::SessionImpl::runMain+00000128
[ 93] 0x00000000fa9e24cc bin\win64\mvm.dll+01778892 mvm::detail::SessionImpl::runMatlabDesktop+00000268
[ 94] 0x0000000140007016 bin\win64\MATLAB.exe+00028694 mwboost::serialization::singleton_module::unlock+00000950
[ 95] 0x0000000140007eeb bin\win64\MATLAB.exe+00032491 mwboost::serialization::singleton_module::unlock+00004747
[ 96] 0x00007ffd49b137e4 C:\WINDOWS\System32\KERNEL32.DLL+00079844 BaseThreadInitThunk+00000020
[ 97] 0x00007ffd4a08cb81 C:\WINDOWS\SYSTEM32\ntdll.dll+00445313 RtlUserThreadStart+00000033
** This crash report has been saved to disk as C:\Users\kzpyjy\AppData\Local\Temp\matlab_crash_dump.19208-1 **
MATLAB is exiting because of fatal error
ERROR: MATLAB error Exit Status: 0xc0000005, Access violation
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!