Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Crash in Debug mode along with CDB process termination, but Release mode builds and runs file

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

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 800 Views
  • 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 Offline
    M Offline
    m3g1dd
    wrote on last edited by m3g1dd
    #1

    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?

    JonBJ 1 Reply Last reply
    0
    • JonBJ JonB

      @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 Offline
      M Offline
      m3g1dd
      wrote on last edited by
      #8

      @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
      0
      • M 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?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #2

        @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
        2
        • JonBJ 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 Offline
          M Offline
          m3g1dd
          wrote on last edited by m3g1dd
          #3

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

          JonBJ 1 Reply Last reply
          0
          • M 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 ...

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #4

            @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
            0
            • JonBJ JonB

              @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 Offline
              M Offline
              m3g1dd
              wrote on last edited by
              #5

              @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
              0
              • JonBJ JonB

                @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 Offline
                M Offline
                m3g1dd
                wrote on last edited by
                #6

                @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 +=
                }
                
                JonBJ 1 Reply Last reply
                0
                • M m3g1dd

                  @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 +=
                  }
                  
                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #7

                  @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
                  3
                  • JonBJ JonB

                    @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 Offline
                    M Offline
                    m3g1dd
                    wrote on last edited by
                    #8

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

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved