How can I resolve a segmentation fault caused by a MATLB Engine API tbb.dll version mismatch?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 25 de Mayo de 2023
Editada: MathWorks Support Team
el 9 de En. de 2024
I am developing a C++ application, which connects and interfaces with MATLAB via the C++ Engine API. When calling "findMATLAB()" in the C++ code, a segmentation fault occurs.
Thread 1 received signal SIGSEGV, Segmentation fault.0x0000000000000000 in ?? ()(gdb)
I suspect that this may be due to a mismatch between my compiled version of "tbb.dll" and the MATLAB version. Can this be the cause of the crash?
Respuesta aceptada
MathWorks Support Team
el 13 de Sept. de 2024
Editada: MathWorks Support Team
el 9 de En. de 2024
The "tbb.dll" library is a threading library developed by Intel and shipped with MATLAB. A mismatch between the version of the "tbb.dll" library in your application and the one shipped with MATLAB could cause a segmentation fault.
When developing C++ applications that interface with MATLAB Engine and require functions from this library, it is recommended to use the version of "tbb.dll" that ships with MATLAB to avoid this library conflict.
To invoke the MATLAB version of "tbb.dll" during runtime, you will need to hide other versions of "tbb.dll", so only the MATLAB version is visible to the C++ application. Since the header files of "tbb.dll" are not shipped with MATLAB, you will need to get the corresponding header files from Intel for compilation. Be sure to download the relevant header files from Intel that correspond to the MATLAB version of "tbb.dll". Version information for "tbb.dll" can be found by the following command in Windows PowerShell:
get-command "<full path to tbb.dll>" | format-list
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!