Crash in Debug mode along with CDB process termination, but Release mode builds and runs file
-
My application builds and runs fine in Release mode. However, in Debug mode, my application crashes. When trying to use debugger to pinpoint the crash cause, such error is received:
Qt Creator unexpected CDB exit
The CDB process terminatedWhy would it work in release mode and NOT in debug mode? Any possibility?
-
Thanks! The problem is resolved by manually copying TBB DLLs next to the application executable.
I guess, some other application has added
tbb.dll
to my PATH environment variable, buttbb_debug.dll
is NOT added to it by any application. Just a guess ... -
@m3g1dd
First, can you clarify your post.Title:
CDB process termination happens only in Release mode
but
My application builds and runs fine in Release mode. However, in Debug mode, my application crashes.
?
There are many reasons why an application can crash in release mode but not in debug mode, or vice versa. Though I cannot comment on why CDB itself seems to terminate.
Verify that your CDB debugger works fine on a minimal, 10-line program. Else you have some CDB integration/behaviour problem.
If necessary because you are having problems with the attached debugger, put in some
qDebug()
(or similar) statements to see where (if anywhere) your program is actually getting to. -
I built the application in Debug mode and deployed it. Running it by command line throws this message:
The code execution cannot be proceed because
tbb_debug.dll
was not found. Reinstalling the program may fix this problem.For some reason, TBB DLL can be found in Release mode but NOT in debug mode. Not sure why ...
-
Also I have this in my project file for TBB:
INCLUDEPATH += deps/tbb-2020.3-win/tbb/include win32: CONFIG (release, debug|release): { LIBS += -LC:\Users\m3\repos\myapp\deps\tbb-2020.3-win\tbb\lib\intel64\vc14 \ -ltbb \ -ltbb_preview \ -ltbbbind \ -ltbbmalloc \ -ltbbmalloc_proxy \ -ltbbproxy } else: win32: CONFIG (debug, debug|release): { LIBS += -LC:\Users\m3\repos\myapp\deps\tbb-2020.3-win\tbb\lib\intel64\vc14 \ -ltbb_debug \ -ltbb_preview_debug \ -ltbbbind_debug \ -ltbbmalloc_debug \ -ltbbmalloc_proxy_debug \ -ltbbproxy_debug } else: unix: { # Linux and mac # TODO: add correct path to LIBS += }
-
@m3g1dd
I believe there is a chance that error message can be produced, despite its wording, if it cannot loadtbb_debug.dll
because that has missing dependencies. You might use a Windows "Dependency Walker" to show you what other DLLs that DLL needs. -
Thanks! The problem is resolved by manually copying TBB DLLs next to the application executable.
I guess, some other application has added
tbb.dll
to my PATH environment variable, buttbb_debug.dll
is NOT added to it by any application. Just a guess ...