MATLAB Answers

0

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

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:
((chart->bm.EmlBreakpoints).array[objectNumber]).length>breakPoint.

Products


Release

R14SP2

1 Answer

Answer by MathWorks Support Team on 27 Jun 2009
 Accepted Answer

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.

  0 Comments

Sign in to comment.