AppDesigner does not overwrite mlapp on Linux; works fine on Windows

Hi,
I'm trying to edit an app using App Designer on R2022b for Linux. The app has a fair number of components, but the number of lines of editable code is small (~100), since I exported all of the methods to separate m-files. I was able to do this and save the modified app using R2022a on Windows.
However, even with the much-shortened mlapp file, I cannot make changes and save it on Linux. It opens fine and I'm able to edit the code, but when I save, the interface does not show that the file is saved, and the modification time on the mlapp file does not change. Instead, a new, empty ".tmp" file gets created in the same directory. Every time I click save, a new one of these files gets created, and that's it. This screenshot shows what the app directory looks like after saving (app was last saved on Windows on the 25th):
Any ideas?

5 Comments

I am having the same issue. I have a temp work around which maynot suit your needs though...
After making the necessary edits, switch to codeview and then copy the entire code into an m-file with the same name (LOOPER.m) and rename the mlapp-file to something else. You can invoke the app by calling LOOPER in the command window.
I don't know the file format for mlapp and maybe it stores some extra metadata apart from the code, so saving it as mlapp-file is not working. Hence the m-file.
I don't remember the appdesigner to be this buggy before... I am having trouble editing the code and the properties box and stuff too, apart from the saving one you mentioned. Maybe it is a legitimate bug for linux version...
Hi Kumar, glad to know it's not just me! That's a good way of getting the app out of AppDesigner and be able to continue to make edits. In fact, there is even an "Export to .m file" option in the save drop-down that does this. The downside though is that you have to make any further edits in the code directly, since you can't go in the other direction and read the m-file with AppDesigner. So any further UI edits would be more painful without design view.
By the way, which release are you using? I had this happen with R2022a and b.
I have the same problem on openSUSE with R2022a.
Hi Ethan, I am using R2022b on Ubuntu 22.04...
Hi everyone, same issue on Fedora 36 with R2022b

Sign in to comment.

 Accepted Answer

The problem appears to be due to a regression in the Linux kernel. More details are available at https://www.mathworks.com/matlabcentral/answers/1798895-invalid-cross-device-link-18-when-saving-a-file-on-arch-linux#answer_1095538
Some of the other posts in that Question give work-arounds for moving the temporary directory.

1 Comment

Thanks! I guess the workaround for now is to set the TMPDIR environment variable to somewhere on the same filesystem. Unfortunately I work with a lot of different filesystems, so I will probably run into this again, but at least I know how to fix it. Hope either the kernel or MATLAB gets patched in the next version.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2022b

Community Treasure Hunt

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

Start Hunting!