Standalone application is not working fine
Afficher commentaires plus anciens
I and my team we have created an application on app designer, this application uses some .p files and some files from two subfolders. All the files are in the same directory. When we did not compile the application, then it is working fine, and when we make it a standalone application is it opening, but some of the functions are not working, It is giving error sound. For packaging, we are using R2020b. Please, find the link of the video of application, before and after making it a standalone application. During the compilation is it showing dependency warning on .p files.
Réponses (1)
Image Analyst
le 6 Déc 2020
Modifié(e) : Image Analyst
le 6 Déc 2020
0 votes
Most end-user problems running compiled code have to do with either
- them not having the correct runtime library installed,
- you forgetting to ship some file (or you put it in the wrong place), or
- some kind of path issue (hard coding the wrong path or not using the full path).
See the FAQ for a thorough list:
13 commentaires
Saurabh Chaudhary
le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary
le 9 Déc 2020
Image Analyst
le 9 Déc 2020
Modifié(e) : Image Analyst
le 9 Déc 2020
Sometimes there are configurations or files on your development machine that lets it run fine on your computer but not on others because they don't have the same configuration or files. All I can offer is if you give me the file(s) and I'll compile it and see if it runs on my computer. If it doesn't, I can figure out why it's not running and tell you. But I can tell you that the plot command should work and I compile programs for others daily and I use plot in nearly every one of them and it works fine.
By the way, for some reason your videos never load or play.
You might try adding the .p files explicitly to the mcc command with the -a option
mcc -m myapp.mlapp -a 'c:\whatever\subfolder\fubar.p' -a 'c:\whatever\subfolder\snafu.p'
Saurabh Chaudhary
le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary
le 9 Déc 2020
Image Analyst
le 9 Déc 2020
The videos now play. I can hear a warning chime when you click boxes which means it's throwing an error. If you compile with the -m option of mcc, it should bring up a text console window that is basically the command window. When you hear the sound, look in that window and see what error gets thrown.
Or alternatively, get a command window from your operating system, go to the folder where the executable lived, and type in the name of the exeuctable at the command line. Any error messages should go to that window.
Saurabh Chaudhary
le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary
le 9 Déc 2020
Image Analyst
le 9 Déc 2020
Do you know how to get a console window in your operating system? What operating system do you have? Like in Windows, you type the Windows Start key and then type cmd and hit return. Then you get a DOS console window. Then cd to the folder where your program lives. Then if your program is called abcd.exe, you type abcd and hit return. Your program should then launch.
Saurabh Chaudhary
le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary
le 9 Déc 2020
Image Analyst
le 9 Déc 2020
Then one thing you can try is to put msgbox() calls in between every line of code in the checkbox callback function. See how far you get before it beeps.
Saurabh Chaudhary
le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary
le 9 Déc 2020
Image Analyst
le 9 Déc 2020
Modifié(e) : Image Analyst
le 9 Déc 2020
Well it says that at line 154 you're trying to access some index of an array that has only 6 elements in the second index (column index). What's on that line? What is the name of the array you're trying to reference, and the name of the variable that is the index, or is it just hard coded to be some number? If before that line you put
whos yourMatrix
what does it say?
KARUKOLA DIVAKARA RAO
le 3 Juin 2022
Hi, Image Analyst.
I have got similar problem.
Working of my app: It has a search box, user input full/part of the document ('.pdf') name, and then all the matching documents apprear on a list box. Now, user can select any of the document from list box and click on open button, this action will open the particular document.
Well, before making the app standalone, the app was working fantastic. But, after converting it is listing out the matched documents but upon clicking open buttion it is not opening the required document and making the error sound.
Following your suggestions in earlier commets I have initiated the app from CMD. And the errors are as attached.
It will be great, if you can help me out in someway. I can share my code with you, if required.
Regards
Divakar

Image Analyst
le 3 Juin 2022
@KARUKOLA DIVAKARA RAO Without source code it's hard to tell. I suggest you start your own question and include your .mlapp file and any data files needed to run it. Then I can compile it and test it.
KARUKOLA DIVAKARA RAO
le 5 Juin 2022
As you mentioned, I have started a question of my own. You can reach it with the link below.
'.mlapp' and 'error msg' snap are attached as mentioned in trailing comments.
There is an attachment 'details.zip' with the contact details in the folder you can reach me out for any additional information.
Request help me out!
Regards
Divakar
Catégories
En savoir plus sur Standalone Applications dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
