Compilation error using Stateflow
Problem
I have a model with several CPU, and one CPU is using stateflow. The model is running good offline but at separation I have a big Matlab crash :
"-------------------- Starting compilation --------------------
Start at : Wednesday, June 30, 2010, 17:09:33
The current RT-LAB version is: v10.0.3
The current model is: W:\Tickets\GuillaumeD\231659_AMET\TestModel\SimulinkModel\TestModel.mdl
The current host platform is: XP/Vista
The current target platform is: QNX 6.x
.....................................................................
Separating RT-LAB model (number of RT subsystems = 2, console detected).
Separating RT-LAB subsystem 'SM_Ctrl'.
failed assertion in B:\matlab\toolbox\stateflow\src\utils\object.cpp at line 2842:
object[id]->isa==isa
Stack Trace:
[0] sf.mexw32:0x6befc7d9(0x6bfa64a8 "object[id]->isa==isa", 0x6bfa5228 "B:\matlab\toolbox\stateflow\src\..", 2842, 0)
[1] sf.mexw32:0x6bf00d92(122, 1, 0x00d31cf4, 0x6bed245f)
[2] sf.mexw32:0x6be5582e(122, 114, 4, 2)
[3] sf.mexw32:0x6bed245f(114, 0x00d3280c, 0x00d3280c, 2)
[4] sf.mexw32:0x6bf151c5(0x00d32778, 0, 15, 5)
[5] sf.mexw32:0x6bf152df(1, 0x00d32778, 2, 0x00d3280c)
[6] sf.mexw32:0x6bf1539d(1, 0x00d32778, 2, 0x00d3280c)
[7] sf.mexw32:0x6bf01fab(120, 1, 0x00d32778, 2)
[8] sf.mexw32:0x6bf02649(1, 0x00d32778, 3, 0x00d32808)
[9] sf.mexw32:0x6be875ec(1, 0x00d32778, 0x0d111f40, 3)
[10] sf.mexw32:0x6be87655(1, 0x00d32778, 3, 0x00d32808)
[11] libmex.dll:_mexRunMexFile(1, 0x00d32778, 3, 0x00d32808) + 129 bytes
.........."
What could be the cause and is there a workaround ?
Answer
This is due to a current limitation of RT-LAB separator with R2008a : so far using Stateflow is not compatible with using several CPUs. The only workaround is (if possible) to include all computation into a single sm_ subsystem.Keywords : Stateflow, assertion, separation
Update
This problem is now fixed starting fromRT-LAB 10.1.2.





