MATLAB Answers

Why do I receive a breakpoint error when running a model with an Embedded MATLAB Function block in Simulink 6.2 (R14SP2)?

1 view (last 30 days)
I have a model with an Embedded MATLAB Function block. When I try to run the model, I receive the following error:
Stateflow Runtime Error: INTERNAL ERROR. Failed assertion in sfdb_breakpoints.c at line 895:

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
There is a bug in Simulink 6.2 (R14SP2) that results the hidden breakpoints in the Embedded MATLAB Function block. If you create a breakpoint at a line in the Embedded MATLAB Function block, and then subsequently change the line such that a breakpoint cannot exist at that point, the red dot indicating a breakpoint is not visible, but the breakpoint still retains.
If text is later entered on one of these lines, a breakpoint automatically appear. Normally this behavior does not lead to errors, however if the hidden breakpoint is on a line past the end of the file, you receive the above error.
To work around this issue, you must find and remove the hidden breakpoint beyond the end of the file. Go to the last line of the file and repeatedly type 'a' followed by return to add lines to the end of the file. Continue to do this until you see a red dot on the left indicating a breakpoint. Click on the dot to remove the breakpoint, delete all the added text, and then save your model. It should now run without errors.


Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!