I get an inconsistent, non-descriptive error

3 views (last 30 days)
I made a model in Simulink, which is giving me an error that I can't find anywhere:
Unexpected exception (class _com_error) was caught.
Component: Simulink | Category: Model error
There is no trace, and it's not consistent. Sometimes I get it, sometimes not, even if I didn't even change anything between the two runs.
After getting this error, the Simulink model becomes partly unresponsive. If I change a constant's value, the UI doesn't resemble that, it stays on the old value. If I add a new block, it only renders the border, not the inside text or graphics. I can't move the blocks around or delete them. If I save the model after changing the values, and close the model then reopen, the new value is saved, but that doesn't seem to be tha case with moving or deleting blocks. Also I can't close the model by clicking the X button, only by using the Task Manager.
I rebuilt the model from scratch but the same issue is present.
Any idea on what could be the problem? Did I mess something up? Or is it a bug in Simulink?
  2 Comments
Bertold Héjja
Bertold Héjja on 14 Jun 2021
Update:
I got a new exception. Tried to use Ctrl+Z to undo something after I got the error. After that the model closed and I got this in my MATLAB Command Window:
Warning: An error has occurred during refresh of Action named blockFitToContentAction.
Warning: Generator should return a DAStudio.ToolSchema.
Unhandled exception thrown during 'handleUndo' of command 'Parameter Changes'.
Assertion failed: cannot undoToChangeLevel within a transaction at B:\matlab\src\m3i\kernel\deviant\Deviant.cpp:47:
[ 0] 0x00007ff81f70a063 D:\Program Files\MATLAB\R2021a\bin\win64\libmwfl.dll+00041059 foundation::core::diag::thread_context::unspecified_bool+00000051
[ 1] 0x00007ff81f707338 D:\Program Files\MATLAB\R2021a\bin\win64\libmwfl.dll+00029496 foundation::core::diag::stacktrace_base::capture+00000024
[ 2] 0x00007fff5ef42b79 D:\Program Files\MATLAB\R2021a\bin\win64\m3i.dll+00994169 M3I::Exception::Exception+00000169
[ 3] 0x00007fff5ee6de0e D:\Program Files\MATLAB\R2021a\bin\win64\m3i.dll+00122382 mwboost::serialization::singleton_module::get_lock+00000270
[ 4] 0x00007fff5ef08551 D:\Program Files\MATLAB\R2021a\bin\win64\m3i.dll+00755025 M3I::Deviant::undoToChangeLevel+00000177
[ 5] 0x00007fff5ef08427 D:\Program Files\MATLAB\R2021a\bin\win64\m3i.dll+00754727 M3I::Deviant::undoGroup+00000359
[ 6] 0x00007fff3f89ea21 D:\Program Files\MATLAB\R2021a\bin\win64\glue2.dll+00911905 GLUE2::Command::handleUndoInternal+00001505
[ 7] 0x00007fff3fd69370 D:\Program Files\MATLAB\R2021a\bin\win64\glue2.dll+05935984 GLUE2::Util::BusyCursor::restoreCursor+00000064
[ 8] 0x00007fff3f89e357 D:\Program Files\MATLAB\R2021a\bin\win64\glue2.dll+00910167 GLUE2::Command::handleUndo+00000279
[ 9] 0x00007fffaec38707 D:\Program Files\MATLAB\R2021a\bin\win64\glee_util.dll+00427783 GLEE::Command::undo+00000343
[ 10] 0x00007fffaec3eb57 D:\Program Files\MATLAB\R2021a\bin\win64\glee_util.dll+00453463 GLEE::UndoRedoCommandTarget::clearUndoStackFromAndIncluding+00001879
[ 11] 0x00007fffaec3feef D:\Program Files\MATLAB\R2021a\bin\win64\glee_util.dll+00458479 GLEE::UndoRedoCommandTarget::undo+00000703
[ 12] 0x00007fff3f4c6346 D:\Program Files\MATLAB\R2021a\bin\win64\dastudio_platform.dll+00090950 PLATFORM::DomainImpl::undo+00000278
[ 13] 0x00007fff3f4fcbb0 D:\Program Files\MATLAB\R2021a\bin\win64\dastudio_platform.dll+00314288 PLATFORM::InterfaceManager::unregisterApplicationIM+00025120
[ 14] 0x00007fffcafb3a5e bin\win64\pgo\mcos_impl.dll+00342622
[ 15] 0x00007fffcafb3005 bin\win64\pgo\mcos_impl.dll+00339973
[ 16] 0x00007fffcafb2ca0 bin\win64\pgo\mcos_impl.dll+00339104
[ 17] 0x00007fffcaff7ab7 bin\win64\pgo\mcos_impl.dll+00621239 mdMethodListAllFcn+00065895
[ 18] 0x00007fffcb1ad400 bin\win64\pgo\mcos_impl.dll+02413568 mwboost::serialization::singleton_module::unlock+01172572
[ 19] 0x00007fffcb218bfc bin\win64\pgo\mcos_impl.dll+02853884 namedArgsToCell+00004800
[ 20] 0x00007fffcb225b9d bin\win64\pgo\mcos_impl.dll+02907037 namedArgsToCell+00057953
[ 21] 0x00007ff8130915d8 bin\win64\mcos.dll+00136664 omDirectCallMethod+00000072
[ 22] 0x00007fffeb7eb14f bin\win64\pgo\libmwlxeindexing.dll+00438607 MathWorks::lxe::MatrixModuleImplementation::SetHeterogeneousArray+00011335
[ 23] 0x00007fffeb86b8ab bin\win64\pgo\libmwlxeindexing.dll+00964779 MathWorks::lxe::intermediate_paren_ref_place+00006699
[ 24] 0x00007fffeb785cdf bin\win64\pgo\libmwlxeindexing.dll+00023775 MathWorks::lxe::MultiValue::SetCellArray+00000115
[ 25] 0x00007fffeb785cdf bin\win64\pgo\libmwlxeindexing.dll+00023775 MathWorks::lxe::MultiValue::SetCellArray+00000115
[ 26] 0x00007fffeb8093e2 bin\win64\pgo\libmwlxeindexing.dll+00562146 MathWorks::lxe::DereferenceRplaceToXvalueZeroOutputs+00000030
[ 27] 0x00007fffeb7d7c83 bin\win64\pgo\libmwlxeindexing.dll+00359555 MathWorks::lxe::at_rparen0+00000391
[ 28] 0x00007fffd302636f bin\win64\pgo\m_lxe.dll+00353135
[ 29] 0x00007fffd4cb7dd1 bin\win64\pgo\m_lxe.dll+30309841 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+00329281
[ 30] 0x00007fffd30423c7 bin\win64\pgo\m_lxe.dll+00467911 MathWorks::lxe::initializeFcn+00106135
[ 31] 0x00007fffd3041261 bin\win64\pgo\m_lxe.dll+00463457 MathWorks::lxe::initializeFcn+00101681
[ 32] 0x00007fffd3040c72 bin\win64\pgo\m_lxe.dll+00461938 MathWorks::lxe::initializeFcn+00100162
[ 33] 0x00007fffd30453f3 bin\win64\pgo\m_lxe.dll+00480243 MathWorks::lxe::initializeFcn+00118467
[ 34] 0x00007fffd304509f bin\win64\pgo\m_lxe.dll+00479391 MathWorks::lxe::initializeFcn+00117615
[ 35] 0x00007fffd302d2c0 bin\win64\pgo\m_lxe.dll+00381632 MathWorks::lxe::initializeFcn+00019856
[ 36] 0x00007fffd302c0eb bin\win64\pgo\m_lxe.dll+00377067 MathWorks::lxe::initializeFcn+00015291
[ 37] 0x00007fffd302b136 bin\win64\pgo\m_lxe.dll+00373046 MathWorks::lxe::initializeFcn+00011270
[ 38] 0x00007fffd3063a96 bin\win64\pgo\m_lxe.dll+00604822 MathWorks::lxe::initializeFcn+00243046
[ 39] 0x00007fffd306380a bin\win64\pgo\m_lxe.dll+00604170 MathWorks::lxe::initializeFcn+00242394
[ 40] 0x00007fffd3061993 bin\win64\pgo\m_lxe.dll+00596371 MathWorks::lxe::initializeFcn+00234595
[ 41] 0x00007ff8148ff68c bin\win64\pgo\libmx.dll+00652940 matrix::detail::noninlined::mx_array_api::mxFevalFunctionHandle+00000036
[ 42] 0x00007ffffe925a85 bin\win64\pgo\m_interpreter.dll+00154245 mwboost::serialization::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >::singleton<mwboost::serialization::extended_type_info_typeid<MathWorks::ExecutionEvents::UncaughtErrorEvent> >+00027445
[ 43] 0x00007ffffbc08bea D:\Program Files\MATLAB\R2021a\bin\win64\builtin.dll+00101354 MathWorks::builtin::BuiltinFcn::invoke+00001130
[ 44] 0x00007ff8107c4b9c bin\win64\pgo\m_dispatcher.dll+00150428 Mfh_MATLAB_fn_impl::dispatch_mf_with_reuse+00000136
[ 45] 0x00007ff8107b4630 bin\win64\pgo\m_dispatcher.dll+00083504 Mfh_MATLAB_fn_impl::ensure_loading_of_load_module+00001856
[ 46] 0x00007ff8107b47b9 bin\win64\pgo\m_dispatcher.dll+00083897 Mfh_MATLAB_fn_impl::dispatch_with_reuse+00000045
[ 47] 0x00007fffd3027e2e bin\win64\pgo\m_lxe.dll+00359982
[ 48] 0x00007fffd3023c2e bin\win64\pgo\m_lxe.dll+00343086
[ 49] 0x00007fffd3023b87 bin\win64\pgo\m_lxe.dll+00342919
[ 50] 0x00007ffffe90d550 bin\win64\pgo\m_interpreter.dll+00054608 inCallFcn+00000084
[ 51] 0x00007fffd318c76a bin\win64\pgo\m_lxe.dll+01820522 mwboost::archive::detail::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>::oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::ClosedAbstractionFunctionDescriptorOwningIrTree>+00024646
[ 52] 0x00007ffffe9126e2 bin\win64\pgo\m_interpreter.dll+00075490 inCallFcnWithTrap+00000098
[ 53] 0x00007fff3d644bc9 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+03623881 dig::FunctionInfoToArray+00000649
[ 54] 0x00007fff3d61121a D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+03412506 dig::ActionCallback::operator()+00000826
[ 55] 0x00007fff3d610efd D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+03411709 dig::ActionCallback::operator()+00000029
[ 56] 0x00007fff3d5027d4 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+02303956 dig::ActionService::executeActionImpl+00001732
[ 57] 0x00007fff3d50185f D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+02299999 dig::ActionService::executeAction+00000287
[ 58] 0x00007fff3d501e64 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+02301540 dig::ActionService::executeAction+00000388
[ 59] 0x00007fff3d505e71 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+02317937 dig::ActionService::hasUnmappedActions+00002657
[ 60] 0x00007fff3d49b9f3 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+01882611 dig::config::Widget::Impl::printHierarchy+00037091
[ 61] 0x00007fff3d4af2f0 D:\Program Files\MATLAB\R2021a\bin\win64\dig.dll+01962736 dig::config::Widget::Impl::printHierarchy+00117216
[ 62] 0x00007ff810b5392a D:\Program Files\MATLAB\R2021a\bin\win64\iqm.dll+00801066 iqm::PackagedTaskPlugin::execute+00000074
[ 63] 0x00007ff810c7e1ed D:\Program Files\MATLAB\R2021a\bin\win64\mcr.dll+00516589 services::lmgr::exception::LicensingStartupException::~LicensingStartupException+00009613
Last resort exception handling: force closing 'vehicle21'.
Cris LaPierre
Cris LaPierre on 16 Jun 2021
Not sure there is enough informatino for us to reproduce the error. Consider sharing your model (you can attach it to your post using the paperclip icon), or contacting support.

Sign in to comment.

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!