Solution for Error: aFcnToAdd->isNamed()
10 views (last 30 days)
Show older comments
Hello,
I tried to build a movement control for a project in Stateflow. While debugging, an Error appears:
failed assertion in b:\matlab\src\cgir_vm\vm\symboltable.cpp at line 57:
aFcnToAdd->isNamed()
[ 0] 0x00000000fc28ca43 bin\win64\cgir_vm.dll+00117315 CG::VM::DynamicLibraryManager::unloadLibrary+00001171
[ 1] 0x00000000fc28c886 bin\win64\cgir_vm.dll+00116870 CG::VM::DynamicLibraryManager::unloadLibrary+00000726
[ 2] 0x00000000fc28e3bf bin\win64\cgir_vm.dll+00123839 CG::VM::IrConverter::globalConversionCtx+00001903
[ 3] 0x00000000fc28ea38 bin\win64\cgir_vm.dll+00125496 CG::VM::IrConverter::globalConversionCtx+00003560
[ 4] 0x00000000fc28e158 bin\win64\cgir_vm.dll+00123224 CG::VM::IrConverter::globalConversionCtx+00001288
[ 5] 0x00000000fc28e445 bin\win64\cgir_vm.dll+00123973 CG::VM::IrConverter::globalConversionCtx+00002037
[ 6] 0x00000000fc28dbcb bin\win64\cgir_vm.dll+00121803 CG::VM::IrConverter::convertScope+00000043
[ 7] 0x0000000113d2dac5 bin\win64\cgxe.dll+00318149 CGXE::JITEngine::setStringListJITMetadata+00063573
[ 8] 0x000000001870f7d1 bin\win64\stateflow.dll+09959377 SF::cdr_get_param_props_for_jit_registration+00029009
[ 9] 0x000000001870890a bin\win64\stateflow.dll+09931018 SF::cdr_get_param_props_for_jit_registration+00000650
[ 10] 0x0000000018602599 bin\win64\stateflow.dll+08856985 sl_hmi::InstrumentedSignals::getCount+00387097
[ 11] 0x00000000185ec88c bin\win64\stateflow.dll+08767628 sl_hmi::InstrumentedSignals::getCount+00297740
[ 12] 0x00000000182561b8 bin\win64\stateflow.dll+05005752 SF::StateflowJITEngine::setRtwChecksum+00439432
[ 13] 0x0000000018265686 bin\win64\stateflow.dll+05068422 SF::StateflowJITEngine::setRtwChecksum+00502102
[ 14] 0x00000000193caf1e bin\win64\stateflow.dll+23310110 SF::mx2str_write_str+00032718
[ 15] 0x0000000018ef07d1 bin\win64\stateflow.dll+18221009 SF::sf_mexFunction+00002513
[ 16] 0x0000000018eefe12 bin\win64\stateflow.dll+18218514 SF::sf_mexFunction+00000018
[ 17] 0x00000000fc626594 bin\win64\libmex.dll+00288148 MexRetrieveVersion+00002916
[ 18] 0x00000000fc6268de bin\win64\libmex.dll+00288990 MexRetrieveVersion+00003758
[ 19] 0x00000000fc612ec3 bin\win64\libmex.dll+00208579 mexUnlock_800+00024147
[ 20] 0x0000000008aac51a bin\win64\pgo\m_dispatcher.dll+00050458 Mfh_file::dispatch_fh_impl+00001114
[ 21] 0x0000000008aac0b2 bin\win64\pgo\m_dispatcher.dll+00049330 Mfh_file::dispatch_fh+00000062
[ 22] 0x0000000008aa4674 bin\win64\pgo\m_dispatcher.dll+00018036 Mfunction_handle::dispatch+00000420
[ 23] 0x0000000009980189 bin\win64\pgo\m_lxe.dll+00393609
[ 24] 0x0000000009a0a808 bin\win64\pgo\m_lxe.dll+00960520 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00121832
[ 25] 0x0000000009a0b403 bin\win64\pgo\m_lxe.dll+00963587 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00124899
[ 26] 0x0000000009a0c836 bin\win64\pgo\m_lxe.dll+00968758 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00130070
[ 27] 0x0000000009a0d3f0 bin\win64\pgo\m_lxe.dll+00971760 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00133072
[ 28] 0x0000000009a0c97f bin\win64\pgo\m_lxe.dll+00969087 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00130399
[ 29] 0x0000000009a0ca7e bin\win64\pgo\m_lxe.dll+00969342 mwboost::serialization::singleton<mwboost::archive::detail::pointer_iserializer<mwboost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00130654
[ 30] 0x000000000998e8a5 bin\win64\pgo\m_lxe.dll+00452773
[ 31] 0x000000000998b335 bin\win64\pgo\m_lxe.dll+00439093
[ 32] 0x00000000099895a2 bin\win64\pgo\m_lxe.dll+00431522
[ 33] 0x0000000009988dee bin\win64\pgo\m_lxe.dll+00429550
[ 34] 0x0000000008aac51a bin\win64\pgo\m_dispatcher.dll+00050458 Mfh_file::dispatch_fh_impl+00001114
[ 35] 0x0000000008aac002 bin\win64\pgo\m_dispatcher.dll+00049154 Mfh_file::dispatch_fh_with_reuse+00000066
[ 36] 0x0000000008aa4354 bin\win64\pgo\m_dispatcher.dll+00017236 Mfunction_handle::dispatch_with_reuse+00000084
[ 37] 0x000000000b3ef7b2 bin\win64\pgo\m_lxe.dll+28112818 mwboost::archive::detail::pointer_oserializer<mwboost::archive::binaryTerm_oarchive,MathWorks::lxe::MatlabIrTree>::save_object_ptr+00640546
[ 38] 0x0000000009992007 bin\win64\pgo\m_lxe.dll+00466951
[ 39] 0x0000000009960821 bin\win64\pgo\m_lxe.dll+00264225
[ 40] 0x0000000008c77197 bin\win64\pgo\m_interpreter.dll+00029079 inCallFcn+00000119
[ 41] 0x0000000108e1b695 bin\win64\libmwsl_services.dll+01619605 slsvFEVAL+00001397
[ 42] 0x0000000018ef0160 bin\win64\stateflow.dll+18219360 SF::sf_mexFunction+00000864
[ 43] 0x00000000193caf1e bin\win64\stateflow.dll+23310110 SF::mx2str_write_str+00032718
[ 44] 0x0000000018ef07d1 bin\win64\stateflow.dll+18221009 SF::sf_mexFunction+00002513
[ 45] 0x0000000018eefe12 bin\win64\stateflow.dll+18218514 SF::sf_mexFunction+00000018
[ 46] 0x00000000fc626594 bin\win64\libmex.dll+00288148 MexRetrieveVersion+00002916
[ 47] 0x00000000fc6268de bin\win64\libmex.dll+00288990 MexRetrieveVersion+00003758
[ 48] 0x00000000fc612ec3 bin\win64\libmex.dll+00208579 mexUnlock_800+00024147
[ 49] 0x0000000008aac51a bin\win64\pgo\m_dispatcher.dll+00050458 Mfh_file::dispatch_fh_impl+00001114
[ 50] 0x0000000008aac002 bin\win64\pgo\m_dispatcher.dll+00049154 Mfh_file::dispatch_fh_with_reuse+00000066
[ 51] 0x0000000008aa4354 bin\win64\pgo\m_dispatcher.dll+00017236 Mfunction_handle::dispatch_with_reuse+00000084
[ 52] 0x0000000009993fa6 bin\win64\pgo\m_lxe.dll+00475046
[ 53] 0x0000000009992007 bin\win64\pgo\m_lxe.dll+00466951
[ 54] 0x0000000009960821 bin\win64\pgo\m_lxe.dll+00264225
[ 55] 0x0000000008c77197 bin\win64\pgo\m_interpreter.dll+00029079 inCallFcn+00000119
[ 56] 0x0000000108dff43f bin\win64\libmwsl_services.dll+01504319 slsv::mxw::WarningHandler::operator=+00005839
[ 57] 0x0000000108e10b37 bin\win64\libmwsl_services.dll+01575735 CMatlabCommand::execute+00000199
[ 58] 0x0000000108e1b828 bin\win64\libmwsl_services.dll+01620008 slsvFEVAL_NoThrow+00000280
[ 59] 0x0000000108e1b890 bin\win64\libmwsl_services.dll+01620112 slsvFEVAL_NoThrow+00000064
[ 60] 0x00000000f900e003 bin\win64\sl_graphical_classes.dll+01892355 NotifyStateflowNamedEventRecursively+00000963
[ 61] 0x00000000cad90628 bin\win64\libmwsimulink.dll+10356264 sl::MapDataRef::setUUID+00012136
[ 62] 0x00000000cb06da33 bin\win64\libmwsimulink.dll+13359667 ssSetBlockIsPurelyCombinatorial+00028483
[ 63] 0x00000000caecb0a3 bin\win64\libmwsimulink.dll+11645091 M2MIdentifySLClones+00188307
[ 64] 0x00000000caebe46c bin\win64\libmwsimulink.dll+11592812 M2MIdentifySLClones+00136028
[ 65] 0x00000000caecabef bin\win64\libmwsimulink.dll+11643887 M2MIdentifySLClones+00187103
[ 66] 0x00000000caec5b77 bin\win64\libmwsimulink.dll+11623287 M2MIdentifySLClones+00166503
[ 67] 0x00000000cb6d8d35 bin\win64\libmwsimulink.dll+20090165 slstSetOutputPortRateID+00112085
[ 68] 0x00000000cb6de17c bin\win64\libmwsimulink.dll+20111740 slstSetOutputPortRateID+00133660
[ 69] 0x00000000cb6e3d8b bin\win64\libmwsimulink.dll+20135307 slstSetOutputPortRateID+00157227
[ 70] 0x00000000cb714820 bin\win64\libmwsimulink.dll+20334624 slstSetOutputPortRateID+00356544
[ 71] 0x00000000ca8271fd bin\win64\libmwsimulink.dll+04682237 ExitPauseInDebuggerMenuSim+00002205
[ 72] 0x00000000cb26b918 bin\win64\libmwsimulink.dll+15448344 SLGlue::simulationStartPauseContinue+00000296
[ 73] 0x0000000174459f26 bin\win64\sl_mi.dll+00237350 SLM3I::mi::initCosSFBlockOpenNotification+00047830
[ 74] 0x00000000262eab0d bin\win64\pgo\mcos_impl.dll+00502541
[ 75] 0x00000000262ea3f8 bin\win64\pgo\mcos_impl.dll+00500728
[ 76] 0x00000000262e9e1b bin\win64\pgo\mcos_impl.dll+00499227
[ 77] 0x00000000262b676a bin\win64\pgo\mcos_impl.dll+00288618
[ 78] 0x00000000262b625a bin\win64\pgo\mcos_impl.dll+00287322
[ 79] 0x00000000262b6052 bin\win64\pgo\mcos_impl.dll+00286802
[ 80] 0x00000000262e94e7 bin\win64\pgo\mcos_impl.dll+00496871
[ 81] 0x0000000008aab2f9 bin\win64\pgo\m_dispatcher.dll+00045817 Mfh_MATLAB_fn::dispatch_fh_with_reuse+00000297
[ 82] 0x0000000008aa4354 bin\win64\pgo\m_dispatcher.dll+00017236 Mfunction_handle::dispatch_with_reuse+00000084
[ 83] 0x0000000009993fa6 bin\win64\pgo\m_lxe.dll+00475046
[ 84] 0x0000000009979ae4 bin\win64\pgo\m_lxe.dll+00367332
[ 85] 0x0000000004be0590 bin\win64\pgo\libmx.dll+00656784 matrix::detail::noninlined::mx_array_api::mxFevalFunctionHandle+00000036
[ 86] 0x0000000008c8b0ae bin\win64\pgo\m_interpreter.dll+00110766 inRegisterMFunctionFromOpaqueArray+00033866
[ 87] 0x0000000008aaa9f4 bin\win64\pgo\m_dispatcher.dll+00043508 mdFindFunctionFromUserSpecifiedName+00012500
[ 88] 0x0000000008aa4464 bin\win64\pgo\m_dispatcher.dll+00017508 Mfunction_handle::dispatch_with_reuse+00000356
[ 89] 0x0000000009993fa6 bin\win64\pgo\m_lxe.dll+00475046
[ 90] 0x0000000009992007 bin\win64\pgo\m_lxe.dll+00466951
[ 91] 0x0000000009960821 bin\win64\pgo\m_lxe.dll+00264225
[ 92] 0x0000000008c77197 bin\win64\pgo\m_interpreter.dll+00029079 inCallFcn+00000119
[ 93] 0x0000000009960710 bin\win64\pgo\m_lxe.dll+00263952
[ 94] 0x0000000008c7f59b bin\win64\pgo\m_interpreter.dll+00062875 inCallFcnWithTrap+00000095
[ 95] 0x00000000fe49a612 bin\win64\dastudio.dll+03843602 SafeCallMatlab+00000210
[ 96] 0x00000000fe48b156 bin\win64\dastudio.dll+03780950 ActionSchema::invokeCallback+00000134
[ 97] 0x00000000fe4946be bin\win64\dastudio.dll+03819198 DigCallbackInvoker::invokeUDI+00000766
[ 98] 0x00000000fe49439a bin\win64\dastudio.dll+03818394 DigDefaultCallbackInvoker::invoke+00000058
[ 99] 0x00000000fe521b10 bin\win64\dastudio.dll+04397840 DeferredManager::get_instance+00000080
[100] 0x00000000fe26c24a bin\win64\dastudio.dll+01557066 DAWidgetInterface::getMClass+00033498
[101] 0x00000000fe27d26c bin\win64\dastudio.dll+01626732 DAWidgetInterface::getMClass+00103164
[102] 0x00000000fe2655af bin\win64\dastudio.dll+01529263 DAWidgetInterface::getMClass+00005695
[103] 0x00000000fe26c206 bin\win64\dastudio.dll+01556998 DAWidgetInterface::getMClass+00033430
[104] 0x00000000fe266963 bin\win64\dastudio.dll+01534307 DAWidgetInterface::getMClass+00010739
[105] 0x00000000fe2807d6 bin\win64\dastudio.dll+01640406 DAWidgetInterface::getMClass+00116838
[106] 0x00000000fd014f67 bin\win64\iqm.dll+00544615 iqm::IqmPlugin<cmddistributor::PackagedTaskIIP>::getIIP+00016215
[107] 0x00000000fd01567f bin\win64\iqm.dll+00546431 iqm::PackagedTaskPlugin::execute+00000911
[108] 0x00000000fd014fed bin\win64\iqm.dll+00544749 iqm::IqmPlugin<cmddistributor::PackagedTaskIIP>::getIIP+00016349
[109] 0x00000000fd0154c3 bin\win64\iqm.dll+00545987 iqm::PackagedTaskPlugin::execute+00000467
[110] 0x0000000008924931 bin\win64\mcr.dll+00411953 mcrRegisterExternalFunction+00064417
[111] 0x00000000fcfed9ea bin\win64\iqm.dll+00383466 iqm::Iqm::setupIqmFcnPtrs+00071994
[112] 0x00000000fcfed84c bin\win64\iqm.dll+00383052 iqm::Iqm::setupIqmFcnPtrs+00071580
[113] 0x00000000fcfcdf0b bin\win64\iqm.dll+00253707 iqm::Iqm::deliver+00001659
[114] 0x00000000fb5fdd33 bin\win64\libmwbridge.dll+00056627 ioReadLine+00000595
[115] 0x00000000fb5fdbc3 bin\win64\libmwbridge.dll+00056259 ioReadLine+00000227
[116] 0x00000000fb60b78b bin\win64\libmwbridge.dll+00112523 mnDebugPrompt+00001979
[117] 0x00000000fb60b110 bin\win64\libmwbridge.dll+00110864 mnDebugPrompt+00000320
[118] 0x00000000fb60baed bin\win64\libmwbridge.dll+00113389 mnParser+00000589
[119] 0x00000000088f6564 bin\win64\mcr.dll+00222564 mcr::runtime::setInterpreterThreadSingletonToCurrent+00091332
[120] 0x00000000088f97ae bin\win64\mcr.dll+00235438 mcr::runtime::setInterpreterThreadSingletonToCurrent+00104206
[121] 0x0000000008916c8a bin\win64\mcr.dll+00355466 mcrRegisterExternalFunction+00007930
[122] 0x00000000089189bc bin\win64\mcr.dll+00362940 mcrRegisterExternalFunction+00015404
[123] 0x0000000008915bff bin\win64\mcr.dll+00351231 mcrRegisterExternalFunction+00003695
[124] 0x0000000008916c46 bin\win64\mcr.dll+00355398 mcrRegisterExternalFunction+00007862
[125] 0x0000000008915ce3 bin\win64\mcr.dll+00351459 mcrRegisterExternalFunction+00003923
[126] 0x0000000008918ff6 bin\win64\mcr.dll+00364534 mcrRegisterExternalFunction+00016998
[127] 0x00000000fd014f67 bin\win64\iqm.dll+00544615 iqm::IqmPlugin<cmddistributor::PackagedTaskIIP>::getIIP+00016215
MATLAB stack trace:
> In construct_module (line 99)
aFcnToAdd->isNamed()
Component:Stateflow | Category:Assertion error
aFcnToAdd->isNamed()
Component:Simulink | Category:Model error
I tried to debug the program step by step, but the Error appears just randomly.
Can you may help me?
Note: I updated the model, so it's working the way it should. I uncommented a few things, this version of the model is running, but as soon as you uncomment one single state more it fails.
My first thought was the datatyp of "H_counter" because I need this one to go below zero, so I changed it to int 32.
But this is not working.
BTW this is the Error output in Workspace:
if true
Stateflow internal exception: lasterrId = [Stateflow:Assertion], lasterrMsg =
[aFcnToAdd->isNamed()], thrown at
b:\matlab\toolbox\stateflow\src\stateflow\cdr\prs_eml_action_lang.cpp:224% code
end
0 Comments
Answers (1)
Rajanya
on 17 Mar 2025
This assertion error is mostly due to all the state names being commented in the stateflow chart. Uncommenting them should resolve the error.
Also, 'MCON Check' will be an invalid state name after uncommenting since state names cannot contain embedded spaces - https://www.mathworks.com/help/stateflow/ug/rules-for-naming-stateflow-objects.html
Make sure to rename it to something like "MCON_Check".
Cheers!
0 Comments
See Also
Categories
Find more on Application Deployment 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!