How do I resolve a MATLAB crash when using C++ Interface library?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 16 Mar 2023
Modificato: MathWorks Support Team
il 21 Mar 2023
When I call my custom C++ library using MATLAB C++ Interface, MATLAB crashes. How can resolve this issue?
Risposta accettata
MathWorks Support Team
il 3 Apr 2023
Modificato: MathWorks Support Team
il 21 Mar 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su C Shared Library Integration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!