Why do I receive an internal error when running my chart in Stateflow 5.1.1 (R13SP1)?

1 view (last 30 days)
When I run the model with my chart, I receive the following error:
Stateflow Runtime Error: INTERNAL ERROR. Failed assertion in sfc_tm.c at line 144:
thisTraceNode->objectNumber==objectNumber
Function doIt (#126)
While executing: none
Note that doIt is a graphical function.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in Stateflow 5.1.1 (R13SP1). This problem occurs because of two transition guard statements in the main chart that each contain a function call to a graphical function. When 'Transition Conflict' detection is enabled in the debugger, Stateflow does multiple tests on each transition to detect inconsistencies in the guard conditions. Complimentary guard conditions with function calls in them can cause an internal problem in Stateflow.
There are two workarounds to this problem. The first is to disable the 'Transition Conflict' checkbox in the Stateflow debugging window. This causes some decrease in debugging capability, but will apply to all instances of this problem.
The second workaround is to only execute the function once, and place the result in a temporary data variable. The variable can then be tested for multiple conditions.

More Answers (0)

Categories

Find more on Complex Logic in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!