Packaged app error R2018b?

6 ビュー (過去 30 日間)
Paul Smith
Paul Smith 2019 年 3 月 21 日
回答済み: Paul Smith 2019 年 3 月 21 日
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 件のコメント
Adam
Adam 2019 年 3 月 21 日
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.

サインインしてコメントする。

回答 (1 件)

Paul Smith
Paul Smith 2019 年 3 月 21 日
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.

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by