Why does my GUI crash with an "invalid handles" error message after being compiled with MATLAB Compiler 4.0 (R14)?

1 view (last 30 days)
I have created a GUI that runs without error in MATLAB. However, if I compile it and then run it in stand-alone mode, triggering a callback may result in the following error:
Invalid handle object.
Error in ==> sample_plot_method at 4
Error in ==> crash_example>pushbutton1_Callback at 87
Error in ==> gui_mainfcn at 75
Error in ==> crash_example at 44
Error while evaluating uicontrol Callback

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in MATLAB Compiler 4.0 (R14) in the way that GUIs operate in stand-alone mode.
To work around this issue, try to avoid deletion of handle objects in your code. For example, instead of deleting a figure window and creating a new one for display in a callback function, try updating the axes of a single figure window.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!