Why does my Simulink model crash after I stop the debugger in Simulink 6.1 (R14SP1)?

5 次查看(过去 30 天)
When I run the debugger on a model that has an S-function in Simulink 6.1 (R14SP1), MATLAB hangs and when I stop the debugger, MATLAB crashes generating the following stack trace:
Stack Trace:
[0] simulink.dll:_SfcnElIsFcnCall(0x21e4a970, 1, 0, 1) + 19 bytes
[1] simulink.dll:void * __cdecl GetOutputDataPointer(struct slModel_tag const *,struct slBlock_tag const *,int,int,int,bool *)(0x22e00ce0, 0x21e4a970, 1, 0) + 413 bytes
[2] simulink.dll:struct slErrMsg_tag * __cdecl DispSubsysOrVirtBlkInputPortValues(struct slBlock_tag *,int,bool)(0x21e4aca0, 0, 0, 2098378) + 729 bytes
[3] simulink.dll:struct slErrMsg_tag * __cdecl DispBlockData(struct slBlock_tag *,struct slSimBlock_tag *,enum slDbgBlockData,int *,bool)(0x2322d100, 1, 0x00cdc92c, 0) + 452 bytes
[4] simulink.dll:struct slErrMsg_tag * __cdecl slDbgDispBlockInfo(char const *,struct slBlock_tag *,struct slModel_tag *,struct slDbgStackNode_tag *)(0x7a3c2ae0 "Probe: ", 0x2322d100, 0, 0x225cee10) + 262 bytes
[5] simulink.dll:struct slErrMsg_tag * __cdecl SLDebugCheckForProbeMode(struct slBlock_tag *)(0x21e49780, 5, 0x7a3c2304 "probe", 0x00cdc99d) + 90 bytes
[6] simulink.dll:struct slErrMsg_tag * __cdecl CmdProbe(char const *,struct slModel_tag *,struct slDbgS
<SNIP>

采纳的回答

MathWorks Support Team
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.1 (R14SP1) when using the debugger on models that have an S-Function. The segmentation violation occurs when the Simulink debugger attempts to display function call outputs from an S-Function (including S-Functions created from Stateflow charts) after some of the S-Function information has been freed during model termination.
To work around this issue, do not display block inputs and outputs during the model termination phase. Remove trace points, display points, and breakpoints once you get to the model termination phase in the debugger.

更多回答(0 个)

产品


版本

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by