Internal error for transfering Appdesigner Project to Matlab 2022a

8 次查看(过去 30 天)
After having successfully transfered my App Designer Project (.mlapp-file) from one matlab release to another (starting in 2018b), I just tried to transfer the project to the current 2022a release.
While running the App from the Matlab GUI was fine, opening the Project in the AppDesigner itself led to an error: 'One or more components in your file have experienced an internal error. Opening this file will remove these components and cause loss of functionality or errors.'
The AppDesigner then suggested to compare a revised Project Version with the current one ('View Code Differences'). In the revised Version all Axis (~50) are deleted.
I would like to enjoy the described performance increase reported for the newest release of the App Designer. So has anyone ever experienced this problem and found a reason for or a solution to it?

回答(1 个)

Yukta Maurya
Yukta Maurya 2022-6-2
One of the possible reasons, this error can occur is when there is a component in the app that has a "CreateFcn" that calls "gca" or "gcf". These functions create an axes or figure, respectively, if one does not already exist, which is why there is a posibility that a blank figure can appear when running the app.
For this reason, it is recommend avoiding calls to "gca" or "gcf" in the "CreateFcn".
For axes and figures created and saved in App Designer, the "CreateFcn" is also saved, so even if the default "CreateFcn" is changed, the error will still persist.
  2 个评论
C Berg
C Berg 2022-6-5
Thank you for the answer. However, the problem does not occur when running the app, but when opening the app in the App-designer (without running th app). Thus, there should not be any createFcn being called. Also I did not add any CreateFcn myself, but it is only called during the automatically created functions, which initialize the objects of the app.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by