Azzera filtri
Azzera filtri

Invalid Matlab Runtime error

62 visualizzazioni (ultimi 30 giorni)
CM
CM il 14 Mag 2024
Commentato: CM il 9 Giu 2024 alle 23:09
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 Commento
CM
CM il 9 Giu 2024 alle 23:09
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.

Accedi per commentare.

Risposte (1)

Gyan Vaibhav
Gyan Vaibhav il 14 Mag 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 Commenti
Gyan Vaibhav
Gyan Vaibhav il 18 Mag 2024 alle 14:11
Modificato: Gyan Vaibhav il 18 Mag 2024 alle 14:12
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 il 19 Mag 2024 alle 1:42
Thanks for the suggestions Gyan.

Accedi per commentare.

Categorie

Scopri di più su Standalone Applications in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by