Simulink failed assertion: object[id] != NULL

112 ビュー (過去 30 日間)
Michele Martini
Michele Martini 2016 年 8 月 24 日
コメント済み: Isabelle El-Hajj 2021 年 10 月 13 日
Hi everybody, I built a Simulink model which contains conventional blocks (integrators, sums, divisions) and a PM Synchronous Machine block (Simscape/Power Systems/Specialized Technology/Fundamental Blocks/Machines). When running the model, I get the following error:
failed assertion in b:\matlab\toolbox\stateflow\src\stateflow\utils\object.cpp at line 2514:
object[id] != NULL
[ 0] 0x00000001402c487a C:\Program Files\MATLAB\R2016a\bin\win64\stateflow.dll+02705530 CGXE::JITMgr::JITMgr+00007674
[ 1] 0x0000000140ee4b2e C:\Program Files\MATLAB\R2016a\bin\win64\stateflow.dll+15420206 SF::mx2str_write_str+00031470
...
...
...
MATLAB stack trace:
> In get_sf_block_port_info (line 21)
In SCRIPT_SimHydro (line 229)
Error using SCRIPT_SimHydro (line 229)
object[id] != NULL
Where "SCRIPT_SymHidro" is the script I am using to run the Simulink model. I personally never had a similar problem, though I have been using Simulink for few years now.
Other details about my Matlab/OS: MATLAB Version: 9.0.0.341360 (R2016a). Operating System: Microsoft Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1). Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode.
Any help would be really appreciated.
Thanks!
Michele.

回答 (4 件)

Shota Kato
Shota Kato 2018 年 8 月 12 日
I had the same problem but could solve the problem by reworking "MATLAB Funciton" used in a Simulink model.
I checked the "MATLAB Function" used in Simulink, but I could not refer to the function. (The function was not displayed in the editor when double-clicked) When "MATLAB Function" was reworked, no error occurred.
I don't understand where the Simulink program is stored, but this error is supposed to be output when there is something that can not be referenced in the block used in Simulink.
My Matlab/OS : 9.3.0.713579 (R2017b) / Mac OS High Sierra 10.13.6 and 9.4.0.813654 (R2018a) / Windows 10 Pro version 1803
  1 件のコメント
Alexander Scholz
Alexander Scholz 2019 年 5 月 15 日
Thanks a lot, it worked for me.
It was a corrupted "MATLAB Function" Block, even though I hadn't touched it for a very long time. I just copied it from a previous version and the error was gone.

サインインしてコメントする。


Kubum Cho
Kubum Cho 2019 年 2 月 26 日
I got a same problem, and i solve this problem.
'failed assertion in b:\matlab\toolbox\stateflow\src\stateflow\utils\object.cpp at line 2514:'
This means your simulink file have a problem in stateflow block.
And you can find stateflow block that have problem to mark break point in 'get_sf_block_port_info (line 21)'
If you mark break point, you can find block path in workspace.
And then you can solve this problem to replace or delete stateflow block.
  1 件のコメント
Heidi Zaiter
Heidi Zaiter 2019 年 10 月 25 日
Thanks !!!!

サインインしてコメントする。


Dixon Devasia
Dixon Devasia 2021 年 1 月 20 日
Restarting Matlab Helped me solve the problem!
  1 件のコメント
Isabelle El-Hajj
Isabelle El-Hajj 2021 年 10 月 13 日
Same here.

サインインしてコメントする。


Ravi S Tiwari
Ravi S Tiwari 2019 年 12 月 9 日
getting errorin using ovecurrent relay model. error is object[id]!=NULL, why it is comming any one please help.

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by