Packaged app error R2018b?

조회 수: 4 (최근 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 CenterFile Exchange에서 Develop 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