Standalone application is not working fine

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
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
  1. them not having the correct runtime library installed,
  2. you forgetting to ship some file (or you put it in the wrong place), or
  3. 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
Saurabh Chaudhary le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary le 9 Déc 2020
I have installed the correct runtime and provided full path. The issue is with the plot function is not working after the complilation. And i am not able to test this application on my system itself.
Image Analyst
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
Saurabh Chaudhary le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary le 9 Déc 2020
Thank you so much for your help. For sending the files to you, I will discuss with my team and let you know. I am pasting the links once again. Please check now it is playing or not.
before standalone
after standalone
Image Analyst
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
Saurabh Chaudhary le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary le 9 Déc 2020
Okay thank you, I will check this and get back to you. I did not get this "type in the name of the executable at the command line".
Image Analyst
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
Saurabh Chaudhary le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary le 9 Déc 2020
Yes, I got this. I opened the application from cmd, but not getting any error message in the cmd window, but the error sound is coming when I hit the check boxes.
Image Analyst
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
Saurabh Chaudhary le 9 Déc 2020
Modifié(e) : Saurabh Chaudhary le 9 Déc 2020
I have re-compiled the application, and now this time, I have created the log file and unchecked the " Do not display the Windows Command Shell for execution. Now I can get the error message in the log file and on the command window also. The last step that I have executed before the compilation performed, that step is running on the standalone application if I change the DOF it is giving me the error when I hit the checkbox for plots. Please find the attached screenshot of the error. I think the main error is in the last four error.
Image Analyst
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?
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
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.
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

Connectez-vous pour commenter.

Catégories

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by