Simulink failed assertion: object[id] != NULL

조회 수: 74 (최근 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.

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