Why do I get the error "Object parameter contains an invalid handle" when running a model which contains a Stateflow chart in Simulink 7.3 (R2009a)?

8 views (last 30 days)
I had a demo Stateflow license that just expired. The model I was working on contains a simple chart. Upon opening the model, 30+ error dialogs popped up warning me not able to save or simulate without stateflow license. I deleted the stateflow block and tried to update the diagram, another 30+ error dialog popped up though I don't have any stateflow chart anywhere in the model any more. I cannot even save the model.
I receive the following error:
Object parameter contains an invalid handle

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Jul 2009
This error is due to the fact that you do not have a Stateflow license available to be checked out at this time. Each Stateflow chart is linked to the Stateflow library and thus requires a license even when only running a model which contains a Stateflow chart.
Check with your System Administrator if you are having trouble checking out a license for Stateflow.
As a workaround, you may follow the following steps to restore your model to a workable state.
1) Delete ALL instances of Stateflow charts and variables from your model. This must include all possible references that may invoke the check_license for Stateflow.
2) From the Model Editor (main window) select Edit->Select All, then Edit -> Copy
3) Paste the copied blocks into a new model and save under a new name.
4) Close all models and close MATLAB and Simulink.
5) Relaunch Simulink and open the newly saved model without the Stateflow blocks.

More Answers (0)

Categories

Find more on Complex Logic in Help Center and File Exchange

Products


Release

R2009a

Community Treasure Hunt

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

Start Hunting!