Matlab Error: Message Catalog Matlab:interpreter was not loaded

57 views (last 30 days)
I have got a very strange error in Matlab and it doesn't seem to be directly related to my program. Matlab doesn't even give me a line where the Error accrued. My program processes a lot of files. I can process groups of them without getting an error, but when process them all of them together I get the following Error:
Caught "std::exception" Exception message is:
Message Catalog MATLAB:interpreter was not loaded from the file. Please check file location, format or contents
This Error usually happens at approximately the same point, but not exactly. I tested all the files around this point and they work. This is why a assume it is related to the RAM.
If I try to run the program again I get the same Error right at the beginning, but after restarting Matlab everything runs fine again.
I was wondering if it was a C++ based Error, since it contains 'std::...'
Do you have any Idea what this Error means and who i can fix it?
  1 Comment
Viktor
Viktor on 3 Dec 2013
I have a fairly large script that can produce exactly the same error. This my script does not use any other file operations but the MATLAB inbuilt save and load functions, so buggy file handling is unlikely. I have recently transitioned to a different data management strategy, to save the data in chunks (mainly to avoid the error above), instead of regularly saving it into a large cell array and the error has changed to:
Caught "std::exception" Exception message is: Message Catalog MATLAB:save was not loaded from the file. Please check file location, format or contents
It is very curious, because it suggests that there is an issue with the save function itself...
The error is fairly reproducible, occurs after about the same amount of time (hours of crunching), probably after about the same number of saving. It seems to be unrelated to how long MATLAB was initially open, it is specific to the particular script I use.
Is there anybody struggling with the same?

Sign in to comment.

Answers (1)

Viktor
Viktor on 5 Dec 2013
Hello Everyone,
As it turns out the problem was caused by a missing fclose in one of the functions I used. When all the possible (in my case 512) file handles were assigned (to the very same file) no new file could be opened either for saving or loading. A simple fclose('all') did the trick. Once I fixed the code by closing the open file, the error did not show up anymore.
The main problem is that there is no backtrace info, so users can't pinpoint it to the faulty function, it can be anything. I think it would be excellent if there were a "|too many open files| " warning or error so that the users would not be clueless and could fix it in their code and would not associate it with a MATLAB/Java error.
Regards,
Viktor

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!