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

12 次查看(过去 30 天)
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!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by