Why do I receive a segmentation violation when I generate code in the presence of charts with "Execute (enter) Chart At Initialization" turned on with the Stateflow Coder 6.0 (R14)?

1 view (last 30 days)
A crash occurs during Real-Time Workshop code generation if the model contains a chart with the "Execute (enter) Chart At Initialization" property (under Chart Properties) turned on and if the chart also calls an exported graphical function from another chart. The error is similar to the following:
------------------------------------------------------------------------
Segmentation violation detected at Mon Jul 12 11:27:58 2004
------------------------------------------------------------------------
<snip>
Stack Trace:
[0] Test_Full_Scheduler_RevD_sfun.dll:0x407725aa(1, 0, 0, 1)
[1] Test_Full_Scheduler_RevD_sfun.dll:0x407641d1(0x33ab73f0, 599, 255, 8)
[2] Test_Full_Scheduler_RevD_sfun.dll:0x407566fa(0x407911e4, 0x3290bfe0, 1, 6)
[3] Test_Full_Scheduler_RevD_sfun.dll:0x4075621f(0x00cd55bc "$VÍ", 0x4078b392, 0, 0x00cd55dc "$VÍ")
[4] Test_Full_Scheduler_RevD_sfun.dll:0x40758dd0(0, 0x00cd55dc "$VÍ", 0x216dc6b0, 0)
[5] Test_Full_Scheduler_RevD_sfun.dll:0x4078b392(0x324e8c80, 0x324e8c80, 0x216dc6b0, 0)
[6] Test_Full_Scheduler_RevD_sfun.dll:0x4078b3ed(0x324e8c80, 0x01c0c554, 0x216dc6b0, 0)
[7] Test_Full_Scheduler_RevD_sfun.dll:0x40753e4f(0xfffffffe, 0x01c0c554, 4, 0x3290cee0)
[8] libmex.dll:_mexRunMexFile(0xfffffffe, 0x01c0c554, 4, 0x3290cee0) + 71 bytes
[9] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0xfffffffe, 0x01c0c554, 4, 0x3290cee0) + 157 bytes
[10] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0xfffffffe, 0x01c0c554, 4, 0x3290cee0) + 273 bytes
[11] m_interpreter.dll:_inCallFcn(0xfffffffe, 0x01c0c554, 4, 0x3290cee0) + 104 bytes

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in the Stateflow Coder 6.0 (R14) in the way that it handles code generation with the "Execute (enter) Chart At Initialization" property turned on and if the chart called an exported graphical function from another chart. There are currently no known workarounds.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!