Invalid Matlab Runtime error

46 vues (au cours des 30 derniers jours)
CM
CM le 14 Mai 2024
Commenté : CM le 9 Juin 2024
I am testing out matlab compiler by trying to install a compiled app on another PC. When I run the app I get a dos style popup with this error message:
MCR:mclmcr:MCLMCR_Invalid_Matlab_Runtime
It appears for less than a second then vanishes. These are the steps I followed:
Compile a dummy app with one line of code. Tick the "Runtime included in package" option. Link to where I have downloaded the appropriate version. Copy the mcr install executable to target PC and run it. This part seems to work fine. I am running R2023a update 3 (9.14.0.2286388) 64-bit (win64). The MCR download version is MATLAB_Runtime_R2023a_Update_3_win64. The target PC is a windows 64 bit ystem.
Then use the mcc command to compile my app. Copy that executable over to the other PC and run it.
Any ideas what the problem is?
  1 commentaire
CM
CM le 9 Juin 2024
I have got this working now by adding a few lines of code to the dummy app to force it to include all the add-on packages. However it is circuitous trying to figure out what packages are needed and how to force their inclusion. The mcc command produces a file called requiredMCRProducts.txt which lists a bunch of packages by a 5 digit code, which you can then use to get the name of the package, which might (or might not) give you a hint as to which functions you are calling that need it:
It looks like you can use those codes to make a 'bare bones' MCR installer, though I am still trying to wrap my head around that one:
What would be good is if the error generated by matlab said a bit more than invalid runtime - eg the name of the missing package and the function that is calling it.

Connectez-vous pour commenter.

Réponses (1)

Gyan Vaibhav
Gyan Vaibhav le 14 Mai 2024
Hi CM,
As much I can understand from your explanation above is:
  1. You have a simple matlab script which you make an dummy standalone app, and then install the executable and you are able to run it.
  2. When you do it using the mcc command you are unable to run it.
So, I tried the similar steps, and the first part worked well for me too. However, with the "mcc" command, when the executable ran, it got stuck for me on the command prompt window, and didn't progress ahead.
So, I tried adding the MATLAB Runtime Path for Deployment and it worked fine. However, as mentioned on the following page, we should not be required to do this in Windows environments, however, it fixes the similar issue.
Hope this helps.
Thanks
Gyan
  6 commentaires
Gyan Vaibhav
Gyan Vaibhav le 18 Mai 2024
Modifié(e) : Gyan Vaibhav le 18 Mai 2024
So, no I don't think so. I also tried both and saw the considerable size difference however, I feel the major part of it is due to the installer and all the files that are required for the installer mainly.
As I told you when I added the path manually, it worked fine for me.
I am currently not sure why it's not adding the path automatically and why it's not working for you even after adding the same.
I would suggest reinstalling the MATLAB runtime, as a last resort. If even that doesn't work out, try reaching out to Mathworks Technical Support.
PS: Avast could be a pain sometimes, if you want you can try disabling it and then generating the executable, and running it, just to be sure.
Thanks,
Gyan
CM
CM le 19 Mai 2024
Thanks for the suggestions Gyan.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Standalone Applications dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by