I have created a C MEX-file that uses large locally-scoped arrays or structures, or uses a recursive algorithm. When I try to run my MEX-file from the MATLAB command line, MATLAB immediately terminates.
A run-time error may be generated before MATLAB crashes, depending both on the current platform and the compiler used to generate the MEX-file.
On a Windows platform using the lcc compiler that is distributed with MATLAB, the following message is generated before MATLAB crashes:
Runtime error! Program D:\Applications\MATLAB704\bin\win32\MATLAB.exe The application has requested the runtime to terminate it in an unusual way. Please contact the application's support team for more information.
On a Windows platform using the Microsoft Visual C++ compiler, the following message is generated and MATLAB does not crash:
??? Unknown Windows exception value=c00000fd in MATLAB.
On a Red Hat Linux platform using the gcc compiler, the following message is generated before MATLAB terminates:
Segmentation fault (core dumped)
Best Answer