How do I resolve a MATLAB crash when using C++ Interface library?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 16 Mär. 2023
Bearbeitet: MathWorks Support Team
am 21 Mär. 2023
When I call my custom C++ library using MATLAB C++ Interface, MATLAB crashes. How can resolve this issue?
Akzeptierte Antwort
MathWorks Support Team
am 3 Apr. 2023
Bearbeitet: MathWorks Support Team
am 21 Mär. 2023
A MATLAB crash while using a custom C++ library could be caused by a number of issues, including an issue with the custom library (for example, coding error) or a version conflict between the custom library, or its dependencies, and third-party C++ libraries that are shipped with MATLAB.
For both of these types of causes, it might be beneficial to use out-of-process execution mode (available in R2023a, and later releases).
If a library conflict is the cause of the crash, working in out-of-process execution mode may resolve the issue, since out-of-process execution mode has fewer dependencies on third-party libraries. Also, if the library conflict is not resolved by using out-of-process execution mode, the process will simply terminate and MATLAB will not crash.
Similarly, if the crash is due to a coding issue, then debugging and testing the code will be easier in out-of-process execution mode, since errors will simply cause the process to terminate and MATLAB will not crash. In addition, after making code changes, the library can be unloaded and reloaded without having to restart MATLAB.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu C Shared Library Integration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!