Clear Filters
Clear Filters

Access Violation Detected - Simulink crashing - problems with dynamic link library

87 views (last 30 days)
Hi everyone.
It's more than one week that I have the same problem. Simulink crushes when I try to run the model (it contains S-function). The mex function works very well, this Simulink crash happens everytime I click on "Run", it compiles the model and the suddenly goes in crash.
It happens even if I remove the S-function and put some constants values. So it's not an S-function problem.
I though it was for a license problem, I uninstalled and installed Matlab so many times (when uninstalling I removed all the files left in my PC). The problem persists with MATLAB R2021b and R2022a.
I really don't know what to do. Thanks in advance for your help and support.
I report the crash log that appears to me everytime crash occurs:
(this ones is with MATLAB R2021b of some days ago)
MATLAB Log File: C:\Users\GIULIA~1.SCA\AppData\Local\Temp\matlab_crash_dump.11044-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Access violation detected at 2022-06-16 15:23:38 +0200
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : windows-1252
Deployed : false
Graphics Driver : Intel Intel(R) Iris(R) Xe Graphics Version 4.5.0 - Build 30.0.100.9955
Graphics Text Issue Info : xmin=0.000000, ymin=-2.000000, xmax=51.500000, ymax=8.500000
Graphics card 1 : Intel Corporation ( 0x8086 ) Intel(R) Iris(R) Xe Graphics Version 30.0.100.9955 (2021-10-7)
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 : 8923213
MATLAB Root : C:\Program Files\MATLAB\R2021b
MATLAB Version : 9.11.0.1837725 (R2021b) Update 2
OpenGL : hardware
Operating System : Microsoft Windows 10 Pro
Process ID : 11044
Processor ID : x86 Family 6 Model 140 Stepping 1, GenuineIntel
Session Key : e35cf605-88bf-4fa2-83b4-c28b5a096b6d
Window System : Version 10.0 (Build 19044)
Fault Count: 1
Abnormal termination:
Access violation
Current Thread: 'MCR 0 interpreter thread' id 10296
Register State (from fault):
RAX = 0000000000000000 RBX = 0000029559f117c0
RCX = 0000000000000000 RDX = 0000000000000000
RSP = 000000c87c5f7300 RBP = 000000c87c5f7380
RSI = 000000000000000a RDI = 0000029559f117c0
R8 = 0000000000000080 R9 = 0000000000000001
R10 = 0000000000008000 R11 = 000000c87c5f7230
R12 = 0000000000000000 R13 = 000000c87c5f8668
R14 = 0000000000000000 R15 = 000000c87c5f7578
RIP = 00000000690c1739 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x00000000690c1739 C:\Users\giulia.scaglione\OneDrive - Haier Europe\Desktop\Part1_MotorControl\sless_FOC_001.mexw64+00005945
[ 1] 0x00007ffcd504a379 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15311737 sfun_cstate::checkCStatesConsistency+00112553
[ 2] 0x00007ffcd5049707 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15308551 sfun_cstate::checkCStatesConsistency+00109367
[ 3] 0x00007ffcd5046583 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15295875 sfun_cstate::checkCStatesConsistency+00096691
[ 4] 0x00007ffcd504b651 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15316561 sfun_cstate::checkCStatesConsistency+00117377
[ 5] 0x00007ffcd501d9c8 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15129032 SFunctionExecBlock::Projection+00000472
[ 6] 0x00007ffcd501d296 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15127190 SFunctionExecBlock::Initialize+00000134
[ 7] 0x00007ffcd4e746de C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+13387486 BlockEvalParams+00003262
[ 8] 0x00007ffcd256c04d C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+03260493 bdExecInfo::InitExecSystemScheme+00003533
[ 9] 0x00007ffcd247493a C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+02246970 SLExecBD::executeInAccelForNormalModeBasicCheck+00003434
[ 10] 0x00007ffcd2569e50 C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+03251792 bdExecInfo::BdSystemInitialize+00000112
[ 11] 0x00007ffcd256ab6d C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+03255149 bdExecInfo::BdSystemSystemInitialize+00000029
[ 12] 0x00007ffcd2e70131 C:\Program Files\MATLAB\R2021b\bin\win64\sl_lang_exec_blocks.dll+00524593 SubsystemExecBlock::SystemInitialize+00000257
[ 13] 0x00007ffcd2dfb6de C:\Program Files\MATLAB\R2021b\bin\win64\sl_lang_exec_blocks.dll+00046814 BlockSystemInitialize+00000078
[ 14] 0x00007ffcd256bd3d C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+03259709 bdExecInfo::InitExecSystemScheme+00002749
[ 15] 0x00007ffcd247493a C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+02246970 SLExecBD::executeInAccelForNormalModeBasicCheck+00003434
[ 16] 0x00007ffcd256abd1 C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+03255249 bdExecInfo::BdSystemSystemInitialize+00000129
[ 17] 0x00007ffcd4a2abf8 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+08891384 slAccRegPrmChangeFcn+00053512
[ 18] 0x00007ffcd2477d23 C:\Program Files\MATLAB\R2021b\bin\win64\sl_engine_classes.dll+02260259 SLExecBD::modelInitConditionsAtStart+00000099
[ 19] 0x00007ffcd2d37082 C:\Program Files\MATLAB\R2021b\bin\win64\sl_link_bd.dll+01011842 slink::CreateSlModelForLink+00018562
[ 20] 0x00007ffcd2d37366 C:\Program Files\MATLAB\R2021b\bin\win64\sl_link_bd.dll+01012582 slink::CreateSlModelForLink+00019302
[ 21] 0x00007ffcd2d3ed87 C:\Program Files\MATLAB\R2021b\bin\win64\sl_link_bd.dll+01043847 slink::CreateSlModelForLink+00050567
[ 22] 0x00007ffcd2d3f3bd C:\Program Files\MATLAB\R2021b\bin\win64\sl_link_bd.dll+01045437 sleInitModelConditions+00001517
[ 23] 0x00007ffcd2d3eea9 C:\Program Files\MATLAB\R2021b\bin\win64\sl_link_bd.dll+01044137 sleInitModelConditions+00000217
[ 24] 0x00007ffcd5078de7 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15502823 slstSetOutputPortRateID+00114791
[ 25] 0x00007ffcd507f002 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15527938 slstSetOutputPortRateID+00139906
[ 26] 0x00007ffcd50866ba C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15558330 slstSetOutputPortRateID+00170298
[ 27] 0x00007ffcd50bb8a3 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+15775907 slstSetOutputPortRateID+00387875
[ 28] 0x00007ffcd458b153 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+04043091 ExitPauseInDebuggerMenuSim+00001827
[ 29] 0x00007ffcd4ccffc4 C:\Program Files\MATLAB\R2021b\bin\win64\libmwsimulink.dll+11665348 SLGlue::simulationStartPauseContinueNARMode+00000196
[ 30] 0x00007ffcbdd4a2ef C:\Program Files\MATLAB\R2021b\bin\win64\sl_mi.dll+00303855 SLM3I::mi::initCosSFBlockOpenNotification+00001135
[ 31] 0x00007ffd2b4fa9fe bin\win64\pgo\mcos_impl.dll+00371198 mdIsA+00051990
[ 32] 0x00007ffd2b4f9f95 bin\win64\pgo\mcos_impl.dll+00368533 mdIsA+00049325
[ 33] 0x00007ffd2b4f9c30 bin\win64\pgo\mcos_impl.dll+00367664 mdIsA+00048456
[ 34] 0x00007ffd2b5429b3 bin\win64\pgo\mcos_impl.dll+00666035 mdMethodListAllFcn+00111499
[ 35] 0x00007ffd2b5428c8 bin\win64\pgo\mcos_impl.dll+00665800 mdMethodListAllFcn+00111264
[ 36] 0x00007ffd2b5427ae bin\win64\pgo\mcos_impl.dll+00665518 mdMethodListAllFcn+00110982
[ 37] 0x00007ffd2b4e56d1 bin\win64\pgo\mcos_impl.dll+00284369
[ 38] 0x00007ffd83ce23e0 bin\win64\pgo\m_dispatcher.dll+00074720 Mfh_MATLAB_fn_impl::ensure_loading_of_load_module+00000672
[ 39] 0x00007ffd83ce2569 bin\win64\pgo\m_dispatcher.dll+00075113 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 40] 0x00007ffd81648ae3 bin\win64\pgo\libmwlxeindexing.dll+00232163 MathWorks::lxe::DynamicIndexingContext::CreateFieldManager+00005855
[ 41] 0x00007ffd81648a1f bin\win64\pgo\libmwlxeindexing.dll+00231967 MathWorks::lxe::DynamicIndexingContext::CreateFieldManager+00005659
[ 42] 0x00007ffd8163edeb bin\win64\pgo\libmwlxeindexing.dll+00191979 MathWorks::lxe::IsSetEnabledDefault+00040095
[ 43] 0x00007ffd816209c6 bin\win64\pgo\libmwlxeindexing.dll+00068038 MathWorks::lxe::IIndexingContext::FindOverloadedMethodWithoutValidation+00000626
[ 44] 0x00007ffd8162095a bin\win64\pgo\libmwlxeindexing.dll+00067930 MathWorks::lxe::IIndexingContext::FindOverloadedMethodWithoutValidation+00000518
[ 45] 0x00007ffd81620e7d bin\win64\pgo\libmwlxeindexing.dll+00069245 MathWorks::lxe::IIndexingContext::FindOverloadedMethodWithoutValidation+00001833
[ 46] 0x00007ffd8166c0b1 bin\win64\pgo\libmwlxeindexing.dll+00377009 MathWorks::lxe::at_class_dot_paren0+00000089
[ 47] 0x00007ffd7e08d3a8 bin\win64\m_lxe.dll+08967080 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+00553304
[ 48] 0x00007ffd7e096979 bin\win64\m_lxe.dll+09005433 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+00591657
[ 49] 0x00007ffd7da79be3 bin\win64\m_lxe.dll+02595811 MathWorks::lxe::FeatureLxeTrace+02216835
[ 50] 0x00007ffd7da7df2a bin\win64\m_lxe.dll+02613034 MathWorks::lxe::FeatureLxeTrace+02234058
[ 51] 0x00007ffd7da7b4f3 bin\win64\m_lxe.dll+02602227 MathWorks::lxe::FeatureLxeTrace+02223251
[ 52] 0x00007ffd7da6f615 bin\win64\m_lxe.dll+02553365 MathWorks::lxe::FeatureLxeTrace+02174389
[ 53] 0x00007ffd7da6f8b0 bin\win64\m_lxe.dll+02554032 MathWorks::lxe::FeatureLxeTrace+02175056
[ 54] 0x00007ffd7da7ecc6 bin\win64\m_lxe.dll+02616518 MathWorks::lxe::FeatureLxeTrace+02237542
[ 55] 0x00007ffd7da7ad56 bin\win64\m_lxe.dll+02600278 MathWorks::lxe::FeatureLxeTrace+02221302
[ 56] 0x00007ffd7db4417d bin\win64\m_lxe.dll+03424637 MathWorks::lxe::FeatureLxeTrace+03045661
[ 57] 0x00007ffd7db47eb8 bin\win64\m_lxe.dll+03440312 MathWorks::lxe::FeatureLxeTrace+03061336
[ 58] 0x00007ffd7df7d511 bin\win64\m_lxe.dll+07853329 MathWorks::lxe::profiler::MexFunctionCall::EnterPoint+00371889
[ 59] 0x00007ffd7e14ebf5 bin\win64\m_lxe.dll+09759733 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+01345957
[ 60] 0x00007ffd7e15e6ef bin\win64\m_lxe.dll+09823983 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+01410207
[ 61] 0x00007ffd7e15e43c bin\win64\m_lxe.dll+09823292 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+01409516
[ 62] 0x00007ffd8a465214 bin\win64\pgo\libmx.dll+00676372 matrix::detail::noninlined::mx_array_api::mxFevalFunctionHandle+00000036
[ 63] 0x00007ffd83ac5793 bin\win64\pgo\m_interpreter.dll+00153491 mwboost::serialization::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >+00025819
[ 64] 0x00007ffd833d653b C:\Program Files\MATLAB\R2021b\bin\win64\builtin.dll+00091451 MathWorks::builtin::BuiltinFcn::invoke+00000587
[ 65] 0x00007ffd83ce1fb9 bin\win64\pgo\m_dispatcher.dll+00073657 AutoPushingExecutionFrame::~AutoPushingExecutionFrame+00001449
[ 66] 0x00007ffd83ce1ec5 bin\win64\pgo\m_dispatcher.dll+00073413 AutoPushingExecutionFrame::~AutoPushingExecutionFrame+00001205
[ 67] 0x00007ffd83ce23e0 bin\win64\pgo\m_dispatcher.dll+00074720 Mfh_MATLAB_fn_impl::ensure_loading_of_load_module+00000672
[ 68] 0x00007ffd83ce2569 bin\win64\pgo\m_dispatcher.dll+00075113 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 69] 0x00007ffd7e15a95e bin\win64\m_lxe.dll+09808222 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+01394446
[ 70] 0x00007ffd7df47d4d bin\win64\m_lxe.dll+07634253 MathWorks::lxe::profiler::MexFunctionCall::EnterPoint+00152813
[ 71] 0x00007ffd7dfaefcf bin\win64\m_lxe.dll+08056783 MathWorks::lxe::profiler::IMexProfilingSupport::~IMexProfilingSupport+00073839
[ 72] 0x00007ffd83ab3ce0 bin\win64\pgo\m_interpreter.dll+00081120 inCallFcn+00000084
[ 73] 0x00007ffd7dfaf239 bin\win64\m_lxe.dll+08057401 MathWorks::lxe::profiler::IMexProfilingSupport::~IMexProfilingSupport+00074457
[ 74] 0x00007ffd83ab3c72 bin\win64\pgo\m_interpreter.dll+00081010 inCallFcnWithTrap+00000098
[ 75] 0x00007ffcc7c09d68 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+03710312 dig::FunctionInfoToArray+00000648
[ 76] 0x00007ffcc7bd7cae C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+03505326 dig::ActionCallback::operator()+00001390
[ 77] 0x00007ffcc7bd775d C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+03503965 dig::ActionCallback::operator()+00000029
[ 78] 0x00007ffcc7a95171 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+02183537 dig::ActionService::executeActionImpl+00002353
[ 79] 0x00007ffcc7a93d3a C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+02178362 dig::ActionService::executeAction+00000298
[ 80] 0x00007ffcc7a944db C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+02180315 dig::ActionService::executeAction+00000475
[ 81] 0x00007ffcc7c5e602 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+04056578 dig::View::handleEvent+00001330
[ 82] 0x00007ffcc7c55686 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+04019846 dig::ToolStrip::handleEvent+00001542
[ 83] 0x00007ffcc7afb2c2 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+02601666 dig::UDDPropertyAdapter::setPropertyValue+00011666
[ 84] 0x00007ffcc7a40263 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+01835619 dig::config::Widget::Impl::printHierarchy+00109187
[ 85] 0x00007ffcc7a2fa63 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+01768035 dig::config::Widget::Impl::printHierarchy+00041603
[ 86] 0x00007ffcc7a44530 C:\Program Files\MATLAB\R2021b\bin\win64\dig.dll+01852720 dig::config::Widget::Impl::printHierarchy+00126288
[ 87] 0x00007ffd8404dc9a C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00777370 iqm::PackagedTaskPlugin::execute+00000074
[ 88] 0x00007ffd83e6709d C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00487581 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00007213
[ 89] 0x00007ffd84025282 C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00610946 iqm::Iqm::setupIqmFcnPtrs+00094562
[ 90] 0x00007ffd83ff83b1 C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00426929 iqm::Iqm::create+00007521
[ 91] 0x00007ffd83863ae5 C:\Program Files\MATLAB\R2021b\bin\win64\libmwbridge.dll+00080613 ioReadLine+00000501
[ 92] 0x00007ffd838638b5 C:\Program Files\MATLAB\R2021b\bin\win64\libmwbridge.dll+00080053 ioReadLine+00000165
[ 93] 0x00007ffd83874c50 C:\Program Files\MATLAB\R2021b\bin\win64\libmwbridge.dll+00150608 mnGetCommandLineBuffer+00000288
[ 94] 0x00007ffd838750e2 C:\Program Files\MATLAB\R2021b\bin\win64\libmwbridge.dll+00151778 mnParser+00000466
[ 95] 0x00007ffd83e6c666 C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00509542 mcr_set_enableReadingFromStdin+00013094
[ 96] 0x00007ffd83e0fd03 C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00130307 mcrFunctionSignature::set_signature+00109267
[ 97] 0x00007ffd83e2cd60 C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00249184 mcrFunctionSignature::set_signature+00228144
[ 98] 0x00007ffd8404dc9a C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00777370 iqm::PackagedTaskPlugin::execute+00000074
[ 99] 0x00007ffd83e6709d C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00487581 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00007213
[100] 0x00007ffd84025282 C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00610946 iqm::Iqm::setupIqmFcnPtrs+00094562
[101] 0x00007ffd83ff96f6 C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00431862 iqm::Iqm::create+00012454
[102] 0x00007ffd83ff8de2 C:\Program Files\MATLAB\R2021b\bin\win64\iqm.dll+00429538 iqm::Iqm::create+00010130
[103] 0x00007ffd83e46b9c C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00355228 mcrInstantiationError::operator=+00010444
[104] 0x00007ffd83e475f5 C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00357877 mcrInstantiationError::operator=+00013093
[105] 0x00007ffd83e44d70 C:\Program Files\MATLAB\R2021b\bin\win64\mcr.dll+00347504 mcrInstantiationError::operator=+00002720
[106] 0x00007ffda3989baa C:\Program Files\MATLAB\R2021b\bin\win64\mwboost_thread-vc142-mt-x64-1_72.dll+00039850 mwboost::thread::swap+00000074
[107] 0x00007ffdca6e1bb2 C:\WINDOWS\System32\ucrtbase.dll+00138162 configthreadlocale+00000146
[108] 0x00007ffdcc377034 C:\WINDOWS\System32\KERNEL32.dll+00094260 BaseThreadInitThunk+00000020
[109] 0x00007ffdcc842651 C:\WINDOWS\SYSTEM32\ntdll.dll+00337489 RtlUserThreadStart+00000033
Program State:
Most Recent Simulink Activity:
playSimulationAction : OK in editor 9 at Thu Jun 16 15:23:28 2022
Simulink:AddEditMask : OK in editor 5 at Thu Jun 16 15:16:39 2022
Parameter Changes : OK in editor 5 at Thu Jun 16 15:15:55 2022
Most Recent Tool Interaction:
Editor 1: tools idle, class GLUE2::PanZoomTool is most recently active tool since Thu Jun 16 15:15:10 2022
Editor 2: tools idle, no most recently active tool Editor 3: tools idle, no most recently active tool Editor 4: tools idle, no most recently active tool Editor 5: tools idle, class GLUE2::PanZoomTool is most recently active tool since Thu Jun 16 15:16:55 2022
Editor 6: tools idle, no most recently active tool Editor 7: tools idle, class Simulink::SLPortCreationTool is most recently active tool since Thu Jun 16 15:15:14 2022
Editor 8: tools idle, class Simulink::SLSelectionTool is most recently active tool since Thu Jun 16 15:15:18 2022
  2 Comments
Yash Srivastava
Yash Srivastava on 28 Jun 2022
Hi Giulia,
Can you share the model with us along with the exact steps that led to crashing.
Giulia Scaglione
Giulia Scaglione on 30 Jun 2022
Hi,
Unfortunately I cannot share my model but I found the error. It was an input error in the file.c of my S-function. This is why Simulink cannot run and crash.

Sign in to comment.

Answers (1)

arushi
arushi on 17 Jan 2024
Hi Giulia,
I understand that you are facing this crash whenever you try to run the model. From the Stack Trace provided, it can be inferred that the issue is because of “libmwtargetHiddenBlkInsert.dll” file. This issue arises because of a mismatch in the versions of the MATLAB release and the DLL file used in the hardware support packages.
You can do the following after the crash:
  1. Make sure the MATLAB process is killed.
  2. Go to the path mentioned in the stack trace: “C:\ProgramData\MATLAB\SupportPackages\R2021a\bin\win64\simulink_plugins\hardwaresupportpkgs\targets\targetHiddenBlkInsert\libmwtargetHiddenBlkInsert.dll”
  3. Move the “libmwtargetHiddenBlkInsert.dll” file to a different location.
  4. Restart MATLAB.
I Hope this helps.
Thank you

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!