why state flow getting corrupted?

when i save the model containing stateflow chart using save_system(gcs) in closeFcn,the chart is getting corrupted.
can someone explain why it is happening?
Thanks

Respuestas (1)

Akanksha
Akanksha el 29 de Ag. de 2025

0 votos

Saving a Simulink model programmatically inside the closeFcn callback (like using save_system(gcs)) can cause issues because the model is already in the process of closing, and certain resources or states may not be available or stable at that moment. This can lead to model corruption, especially for complex blocks like Stateflow charts.
Here are the alternate solutions that you can try:
Below are some helpful official links where you can find more information:
Hope this helps!

Categorías

Más información sobre Decision Logic en Centro de ayuda y File Exchange.

Productos

Versión

R2015b

Etiquetas

Preguntada:

el 4 de Sept. de 2020

Respondida:

el 29 de Ag. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by