How do I troubleshoot a MATLAB crash associated with a MEX function?
186 views (last 30 days)
Show older comments
MathWorks Support Team
on 15 Apr 2015
Edited: MathWorks Support Team
on 6 Sep 2024
While running my code, MATLAB crashed with the crash log indicating that the cause may have been a MEX function. How do I troubleshoot my MATLAB crash?
Accepted Answer
MathWorks Support Team
on 6 Sep 2024
Edited: MathWorks Support Team
on 6 Sep 2024
In order to troubleshoot your crash, first you need to determine which MEX function caused MATLAB to crash. Depending on whether you are the author of this MEX function, you have multiple options to troubleshoot the MEX function.
Determine which MEX function caused MATLAB to crash
First, you need to obtain the latest crash log from MATLAB. Refer to the MATLAB Answers post below for information on locating the crash dump file (matlab_crash_dump.XXXX) MATLAB generates:
Once you have the crash log associated with your recent crash, refer to the following MATLAB Answers post to identify the MEX function that caused MATLAB to crash:
Troubleshoot the MEX function
Once you know which MEX function caused MATLAB to crash, there are three options depending on the authorship of the MEX function.
1. You are the author of the MEX function.
The documentation has resources for troubleshooting MEX functions depending on the type of the MEX file and development platform. Please refer to the following MATLAB Answers post for more information on debugging MEX functions:
If you are unable to utilize the information in the documentation to troubleshoot your custom MEX function, you can contact MathWorks Technical Support for help on using the available resources for you to troubleshoot your MEX function. Note that MathWorks Technical Support can provide guidance on MEX setup issues, compilers, library dependencies and give general best practices for MEX function creation and debugging only.
2. You are not the author of the MEX function.
Reach out to the original author of the MEX function regarding the issues you are experiencing. The original author may use the resources above to assist in troubleshooting the MEX function, or they may provide you with the source code so that you may troubleshoot the MEX function yourself.
3. MathWorks is the author of the MEX function.
Contact MathWorks Technical Support for further investigation of the issue along with reproduction steps and any relevant files.
0 Comments
More Answers (0)
See Also
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) 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!