603 - 5885 1250 (4 lines) info@mes100.com

Program Fails to Start with an Exception Message
1. The MCR instance could not be initialized
segv – SEVERE ERROR

System.TypeInitializationException: The type initializer for ‘Algorithms.CompGeometry’ threw an exception. —> System.Exception: The MCR instance could not be initialized —> System.ApplicationException: The MCR instance could not be initialized

segv – SEVERE ERROR

  at MathWorks.MATLAB.NET.Utility.MWMCR..ctor(String componentId, String componentPath, Stream embeddedCtfStream, Boolean isLibrary)

  — End of inner exception stack trace —

  at MathWorks.MATLAB.NET.Utility.MWMCR..ctor(String componentId, String componentPath, Stream embeddedCtfStream, Boolean isLibrary)

  at Algorithms.CompGeometry..cctor()

image01

  • Possible solution

 

    • Remove Matlab cache folder. The folder, by default it is at %AppData%\Local\Temp\<username>\mcrCache7.17
      1. mcrCache7.17 may be named differently depending on the installed version of Matlab compiler runtime
      2. This is how you can find the %AppData% folder on your machine.
    • If problem still persists, try changing Matlab cache location
      1. Create a directory where the location is writable, for example create C:\mcrcache
      2. Go to Control Panel -> System -> Advanced System Settings -> Environment Variables
      3. Under System variables, add variable name MCR_CACHE_ROOT with the directory path created on the first step as its value

image00

× WhatsApp Help