MATLAB Answers

MWArray assembly failed to be initialized

76 views (last 30 days)
Sharon Zohar
Sharon Zohar on 13 Feb 2020
Commented: Sharon Zohar on 27 Feb 2020
Hi,
I am running and developing this App for long time, I am using a .Net that was compiled with Matlab Library Compiler.
Suddenly today the App stoped working withe the message:
---------------------------
Matlab Error
---------------------------
Error initiating Matlab Library System.Exception: MWArray assembly failed to be initialized ---> System.Exception: The MATLAB Runtime instance could not be initialized ---> System.ApplicationException: The MATLAB Runtime 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)
I tried to recompile, reinstall the real time engine install previous version and still getting this message.
I am not sure what changed. I installed the App in a different computer and no problem at all.
Your help will be greatly appropriated.
Thanks
Sharon

  0 Comments

Sign in to comment.

Answers (1)

Kojiro Saito
Kojiro Saito on 13 Feb 2020
Your MATLAB Runtime cache folder might be corrupted.
Delete the cache folder.
%TEMP%\USER\mcrCacheX.X
If your Windows account is usera and MATLAB Runtime version is 9.3 (R2017b),
the above folder would be
C:\Users\usera\AppData\Local\Temp\usera\mcrCache9.3
After deleting this folder, you can freshly launch your compiled application.

  5 Comments

Show 2 older comments
Sharon Zohar
Sharon Zohar on 21 Feb 2020
Thanks for the info.
I was trying to run without the runtime engine since I have matlab instaled on this computer, but still got the message as before.
After removing the cach directory it starts working again.
Not sure what causes thos issues, never had them before.
Thanks
Sharon
Sharon Zohar
Sharon Zohar on 24 Feb 2020
Hi,
Something is very wrong, every time I need to invoke an application that uses the run time engine I need to remove the directory you mentioned, not sure what change but it is very hard to work this way.
Thanks
Sharon
Sharon Zohar
Sharon Zohar on 27 Feb 2020
I was hoping by now someone from Mathwork will replay to this, it is very problematic issue. It is imposible to use this tool for a software that we are developing for customers.

Sign in to comment.


Translated by