Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 terminated

    Why would it work in release mode and NOT in debug mode? Any possibility?



  • @JonB

    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, but tbb_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.



  • @JonB

    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 ...



  • @m3g1dd
    The debug build is causing it to want tbb_debug.dll. You say "TBB DLL can be found in Release mode", but are you talking about tbb.dll? Where is tbb_debug.dll?



  • @JonB

    All TBB DLLs are in the same directory, not sure why tbb_debug.dll cannot be found:

    C:\Users\m3\repos\...\deps\tbb-2020.3-win\tbb\bin\intel64\vc14
    

    2020-10-03 13_58_03-vc14.png



  • @JonB

    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 load tbb_debug.dll because that has missing dependencies. You might use a Windows "Dependency Walker" to show you what other DLLs that DLL needs.



  • @JonB

    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, but tbb_debug.dll is NOT added to it by any application. Just a guess ...


Log in to reply