Matlab doesn't open a .mlapp file created in a different computer

Hi!
I have created a GUI using App Designer with Matlab version 2019a. It has a number of buttons, spinners, sliders and axes. Everything works well in the computer in which I created this GUI. However, if I copy this project to a different computer (also with Matlab version 2019a) I cannot access its code. I get the following error message when I try to open the .mlapp file:
Argument #1: image expected
This is annoying because I cannot modify the GUI from a different computer, only from the original one. Any ideas of what the problem could be?
If I run the GUI it works properly, it just doesn't allow me to edit it.
Thanks!
Jorge

1 Comment

Have you cheked if there is a such bug reported in R2019a or prior?

Sign in to comment.

Answers (2)

It appears that the application is looking for an image file, possibly assigned to a one or more of your app objects. I have found that when I create (Share), if all of the personal support files such as images are not in the same directory as the .mlapp file, it may not be automatically added to the list of included files.
Try recreating the .mlappinstall file and verify that all files being called within the app show in the list. If one or more missing there is an option to Add files/folders manually.
If the .mlapp is on the other computer, and the other computer has MATLAB installed, you should be able to modify the app on the other computer. I do it all the time.
I agree with @Allen that it's probably some kind of path issue, like you're looking for an image that you forgot to ship with your app so the other computer doesn't have it, or it's located in a folder different than where it's looking.
Is this app on the other computer running the .mlapp file, or did you compile it into a standalone executable with the MATLAB Compiler product (in which case there is no source code on the other computer for you to modify)?
Can you attach your .mlapp file here with the paperclip icon so we can try it?

7 Comments

Hi @Image Analyst and @Allen, thank you so much for your answers and I am sorry that I am so delayed in my reply (other projects suddenly got proirity over this old issue) - trying to fix it now.
I have found that this is not an issue of not having a specific image in the path. I have done a very simple .mlapp file now with my computer. It just has one button that sums numbers when you press it (there are no images or any other dependencies). Still, when I open it with any other computer it gives the exact same error Argument #1: image expected.
I am attaching the mlapp file here so that you can have a look at it. I am quite puzzled.
Thanks so much for your help!
Jorge
@Jorge Barrasa Your mlapp opens fine on my computer (R2022b)?
The problem seem to come from the target computer.
thanks @Bruno Luong, you are able to run it right? but are you able to open it and edit its buttons and/or code?
I don't think it's the target computer as I've tried with multiple computers and none of them are able to open the mlapp file for editing.
Run and open under App Designer editor fine on my PC
That's weird... Didn't you get any warning before opening it?
I just tried opening it with a laptop with version 2022a and i got this warning:
And after pressing 'open anyway' it allows me to edit but it has removed a number of elements:
Puzzling... Only thing I can think of is that there are differences between 2022a and 2002b that fix the issue?
Any other thoughts?
I'm also able to open under R2022a without warning. Something is wrong with your PC (MATLAB installation ).
ok, turns out that the laptops that I´ve been trying with had all one thing in common. They all had an external library added to the path (specifically the DipImage library). Removing that library from the path solved the issue. I guess there must be some colission between function names of that library and the internal functions of the AppDesigner? who knows, anyways, problem solved ;)
Thanks @Bruno Luong for trying to help :)

Sign in to comment.

Categories

Products

Release

R2019a

Asked:

on 11 Oct 2022

Commented:

on 19 Jan 2023

Community Treasure Hunt

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

Start Hunting!