Packaged app error R2018b?

9 vues (au cours des 30 derniers jours)
Paul Smith
Paul Smith le 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 commentaire
Adam
Adam le 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.

Connectez-vous pour commenter.

Réponses (1)

Paul Smith
Paul Smith le 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.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by