Packaged app error R2018b?

7 views (last 30 days)
Paul Smith
Paul Smith on 21 Mar 2019
Answered: Paul Smith on 21 Mar 2019
I packaged an app I know works and I get this error...works fine normally.
Error using getappdata
Value must be a handle.
Error in AftModV2App/attachOncleanupToFigure (line 109)
appdata = getappdata(fig);
Error in AftModV2App/startApp (line 94)
obj.attachOncleanupToFigure(appdesigner.internal.service.AppManagementService.getFigure(obj.AppHandle));
Error in AftModV2App (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);
  1 Comment
Adam
Adam on 21 Mar 2019
Impossible to say much with only that information other than that when something works within Matlab, but not in a compiled app it is, more often than not, because you have forgotten to include a (or multiple) file in the app.

Sign in to comment.

Answers (1)

Paul Smith
Paul Smith on 21 Mar 2019
This line:-
appdesigner.internal.service.AppManagementService.getFigure(obj.AppHandle)
returns a null value here in code:-
if(ishandle(obj.AppHandle))
% Traditional graphics handle based app
obj.attachOncleanupToFigure(obj.AppHandle);
elseif isa(obj.AppHandle, 'matlab.apps.AppBase')
% appdesigner based app
obj.attachOncleanupToFigure(appdesigner.internal.service.AppManagementService.getFigure(obj.AppHandle));
elseif isa(obj.AppHandle,'handle') && ~isvalid(obj.AppHandle)
% Cleanup in the case where the handle was invalidated before here
appinstall.internal.stopapp([],[],obj)
else
% There will be no call to stopapp, instead decrease the refcount
% now to prevent future clearing issues
AftModV2App.refcount(obj.Increment);
munlock;
end
obj.AppHandle is not empty.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!