Simulink failed assertion: object[id] != NULL

70 次查看(过去 30 天)
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.

Dixon Devasia
Dixon Devasia 2021-1-20
Restarting Matlab Helped me solve the problem!

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 CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by