Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Crash in Debug mode along with CDB process termination, but Release mode builds and runs file

    General and Desktop
    2
    8
    335
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      m3g1dd last edited by m3g1dd

      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 1 Reply Last reply Reply Quote 0
      • M
        m3g1dd @JonB last edited by

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

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB @m3g1dd last edited by JonB

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

          M 1 Reply Last reply Reply Quote 2
          • M
            m3g1dd @JonB last edited by m3g1dd

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

            JonB 1 Reply Last reply Reply Quote 0
            • JonB
              JonB @m3g1dd last edited by

              @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?

              M 2 Replies Last reply Reply Quote 0
              • M
                m3g1dd @JonB last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • M
                  m3g1dd @JonB last edited by

                  @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 +=
                  }
                  
                  JonB 1 Reply Last reply Reply Quote 0
                  • JonB
                    JonB @m3g1dd last edited by

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

                    M 1 Reply Last reply Reply Quote 3
                    • M
                      m3g1dd @JonB last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post