GetAppData Error when trying to close an installed MATLAB app that I have built and packaged

6 views (last 30 days)
Hi!
I am having problems when attempting to close an INSTALLED MATLAB App, that I built and packaged myself.
The app closes correctly with no errors when run normally in MATLAB and as a standalone app using runtime. However, after successfully installing and running the app from 'MATLAB Apps', when you attempt to close the app, it throws out the following error:
Error using getappdata
Value must be a handle.
Error in BeamDeflectionLabApp/attachOncleanupToFigure (line 109)
appdata = getappdata(fig);
Error in BeamDeflectionLabApp/startApp (line 94)
obj.attachOncleanupToFigure(appdesigner.internal.service.AppManagementService.getFigure(obj.AppHandle));
Error in BeamDeflectionLabApp (line 48)
startApp(obj)
Error in appinstall.internal.runapp>execute (line 116)
out = evalin('caller', [script ';']);
Error in appinstall.internal.runapp>runapp13a (line 95)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));
Error in appinstall.internal.runapp>preamble18b (line 60)
appobj = runapp13a(appinstalldir);
Error in appinstall.internal.runapp (line 13)
out = preamble18b(appinstalldir);
Error in matlab.apputil.run (line 45)
appinstall.internal.runapp(appName, appLocation);
I have tried everything under the sun to try and stop this from happening and I can only assume it is attempting to do something after the app has already been deleted.
I did find this Question: https://uk.mathworks.com/matlabcentral/answers/451421-packaged-app-error-r2018b that included the same errors, but there wasn't really a solution provided. Is there anything I can add into my code to correct this or an easy fix? I can share the app code if that makes diagnosis easier?
Thanks!

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!