Why does MCR cache(CTF extraction path) get corrupted after running the executable for several number of times using MATLAB Builder NE 3.1 (R2010a)?

23 views (last 30 days)
We have a .NET application where functions of a MATLAB Builder NE generated DLL are called.
It happens that the mcrCache gets corrupt, such that executing the DLL function always results in an error:
Undefined function or method 'iptcheckinput' for input arguments of type 'cell'.
Error in =>PC_initWorkspace.m at 20.
... Matlab M-code Stack Trace ...
at
file C:\Temp\jennis\mcrCache7.13\People0\toolbox\images\images\watershed.m,name parse_inputs,line at 193.
at
file C:\Temp\jennis\mcrCache7.13\People0\toolbox\images\images\watershed.m,name watershed,line at 139.
at
file C:\Temp\jennis\mcrCache7.13\People0\LocalData\SVN\10_PeopleCounting\Matlab\MainFunctions\PC_initWorkspace.m,name PC_initWorkspace,line at 20.
This happens only after running the application for several number of times. The number of files also reduce eventually. When I manually delete the entire mcrCache\AppName directory helps resolving the issue. I am wondering what could be the reason for corrupted CTF extraction.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 5 Oct 2010
It may not be MATLAB which causes an issue here. The problem is that the mcrCache is by default somewhere below your TEMP directory. Certain system/network tools/services might try to "clean" TEMP directory. Possible solutions for this issue would be:
1. Use MCR_CACHE_ROOT environment variable to redirect the cache to a location not below TEMP
2. Do not embed the CTF. You can choose not to embed CTF in the deploytool by going to settings and there is an option "Embed CTF", that will be checked by default. You can uncheck that option to not embed CTF with the component created. The not-embedded CTF will then not be extracted to the mcr_cache but rather to a directory below the directory containing the CTF.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2010a

Community Treasure Hunt

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

Start Hunting!