Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Unable to debug Android App (Windows + Qt Creator 12 + LLDB)

Unable to debug Android App (Windows + Qt Creator 12 + LLDB)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
169 Posts 9 Posters 61.4k 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.
  • C Offline
    C Offline
    CodesInChaoss
    wrote on last edited by CodesInChaoss
    #1

    Friends, I'm unable to debug my Android app with QT Creator 12 and LLDB no breakpoints ever are hit.

    In logs I've found:

    I MessageMonitor: Load libmiui_runtime
    D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10392; state: ENABLED
    D AppScoutStateMachine: 25996-ScoutStateMachinecreated
    W ActivityThread: Application org.gridnetproject.GRIDNEToken is waiting for the debugger on port 8100...
    I System.out: Sending WAIT chunk
    killall: lldb-server: No such process
    
    I System.out: Debugger has connected
    I System.out: waiting for debugger to settle...
    I System.out: waiting for debugger to settle...
    I System.out: debugger detached?
    

    can you see 'I System.out: debugger detached?'

    I've spent an entire day on this.. PLEASE, anyone ?

    by the end of the log (after the app has crashed already) it says:"CONNECT: error: failed to get reply to handshake packet adb://pbx4mn555hi7ojyx:5039 platform: remote-android False"

    C 1 Reply Last reply
    0
    • C CodesInChaoss

      Friends, I'm unable to debug my Android app with QT Creator 12 and LLDB no breakpoints ever are hit.

      In logs I've found:

      I MessageMonitor: Load libmiui_runtime
      D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10392; state: ENABLED
      D AppScoutStateMachine: 25996-ScoutStateMachinecreated
      W ActivityThread: Application org.gridnetproject.GRIDNEToken is waiting for the debugger on port 8100...
      I System.out: Sending WAIT chunk
      killall: lldb-server: No such process
      
      I System.out: Debugger has connected
      I System.out: waiting for debugger to settle...
      I System.out: waiting for debugger to settle...
      I System.out: debugger detached?
      

      can you see 'I System.out: debugger detached?'

      I've spent an entire day on this.. PLEASE, anyone ?

      by the end of the log (after the app has crashed already) it says:"CONNECT: error: failed to get reply to handshake packet adb://pbx4mn555hi7ojyx:5039 platform: remote-android False"

      C Offline
      C Offline
      CodesInChaoss
      wrote on last edited by CodesInChaoss
      #2

      here is what I did
      I uninstalled the app with
      adb uninstall com.your.package

      just as advised in https://stackoverflow.com/questions/49148823/c-c-debugger-does-not-work-on-android-studio-3-0-1

      (Android Studio issues 2018)

      Now, the app got deployed again, this time crashing no more... BUT....

      1. all my breakpoints in the initial sequence were OMITTED
      2. the app kept spinning for like 10 seconds before everything froze (presumably debugger kicking in)
      3. after (2-3 MINUTES) debugger attached and the app froze in what looked to me as a random ASM line (not related to my code). Those lines are related to android.os.perfdebug

      Now my breakpoints are hit.

      So I guess my questions are:

      • how to make the app actually WAIT for the debugger to attach ? It's like with QT Creator 10 Community Addition and GDB instead of LLDB that was normal and anticipated.
      • how to prevent breakpoints in some random to me places from firing ? I presume some exception in android-level performance counters related to graphics
      • how to make it all faster - 2-3 minutes for the debugger to kick in? come on
      C 1 Reply Last reply
      0
      • C CodesInChaoss

        here is what I did
        I uninstalled the app with
        adb uninstall com.your.package

        just as advised in https://stackoverflow.com/questions/49148823/c-c-debugger-does-not-work-on-android-studio-3-0-1

        (Android Studio issues 2018)

        Now, the app got deployed again, this time crashing no more... BUT....

        1. all my breakpoints in the initial sequence were OMITTED
        2. the app kept spinning for like 10 seconds before everything froze (presumably debugger kicking in)
        3. after (2-3 MINUTES) debugger attached and the app froze in what looked to me as a random ASM line (not related to my code). Those lines are related to android.os.perfdebug

        Now my breakpoints are hit.

        So I guess my questions are:

        • how to make the app actually WAIT for the debugger to attach ? It's like with QT Creator 10 Community Addition and GDB instead of LLDB that was normal and anticipated.
        • how to prevent breakpoints in some random to me places from firing ? I presume some exception in android-level performance counters related to graphics
        • how to make it all faster - 2-3 minutes for the debugger to kick in? come on
        C Offline
        C Offline
        CodesInChaoss
        wrote on last edited by CodesInChaoss
        #3

        I've triple checked that 'wait for debugger' is checked on my Android device.

        1. the app launches
        2. it shows a white bar that it's waiting for debugger to attach>
          at this point in console it would say
        I System.out: Debugger has connected
        I System.out: waiting for debugger to settle...
        I System.out: waiting for debugger to settle...
        I System.out: debugger detached?
        
        1. the app KEEPS RUNNING for (5-10 seconds) after which it freezes.
        2. during that period NO BREAKPOINTS would ever be hit
        3. during that time Creator keeps showing that it's connecting.
        4. Creator would connect after 2-3 minutes.
          At which point in console it would say
        CONNECT: success adb://pbx4mn555hi7ojyx:5039 platform: remote-android TrueW AudioTrack: restartIfDisabled(304): releaseBuffer() track 0x7e628ce800 disabled due to previous underrun, restarting
        

        Running latest Creator (commercial license). 5.15.16

        C 1 Reply Last reply
        0
        • C CodesInChaoss

          I've triple checked that 'wait for debugger' is checked on my Android device.

          1. the app launches
          2. it shows a white bar that it's waiting for debugger to attach>
            at this point in console it would say
          I System.out: Debugger has connected
          I System.out: waiting for debugger to settle...
          I System.out: waiting for debugger to settle...
          I System.out: debugger detached?
          
          1. the app KEEPS RUNNING for (5-10 seconds) after which it freezes.
          2. during that period NO BREAKPOINTS would ever be hit
          3. during that time Creator keeps showing that it's connecting.
          4. Creator would connect after 2-3 minutes.
            At which point in console it would say
          CONNECT: success adb://pbx4mn555hi7ojyx:5039 platform: remote-android TrueW AudioTrack: restartIfDisabled(304): releaseBuffer() track 0x7e628ce800 disabled due to previous underrun, restarting
          

          Running latest Creator (commercial license). 5.15.16

          C Offline
          C Offline
          CodesInChaoss
          wrote on last edited by CodesInChaoss
          #4

          7ede250a-708f-4c37-afda-ee1b2d9c5776-image.png

          It keep 'breaking' in some random looking ASM code. (but I know these are from lldb "android.os.perfdebug.PerfDebugMonitorImpl" for the most of it).
          Now it doesn't even show the source file location.
          It doesn't output any info, what kind of a signal caused this, nothing.

          How to proceed?

          My breakpoints are hit as well.

          C 1 Reply Last reply
          0
          • C CodesInChaoss

            7ede250a-708f-4c37-afda-ee1b2d9c5776-image.png

            It keep 'breaking' in some random looking ASM code. (but I know these are from lldb "android.os.perfdebug.PerfDebugMonitorImpl" for the most of it).
            Now it doesn't even show the source file location.
            It doesn't output any info, what kind of a signal caused this, nothing.

            How to proceed?

            My breakpoints are hit as well.

            C Offline
            C Offline
            CodesInChaoss
            wrote on last edited by
            #5

            @CodesInChaoss
            I've managed to see stack:"44142889-9c2d-446f-abd3-13ae596a9fb0-image.png "

            How do I stop QT Creator 12 breaking at this location even once a second

            C 1 Reply Last reply
            0
            • C CodesInChaoss

              @CodesInChaoss
              I've managed to see stack:"44142889-9c2d-446f-abd3-13ae596a9fb0-image.png "

              How do I stop QT Creator 12 breaking at this location even once a second

              C Offline
              C Offline
              CodesInChaoss
              wrote on last edited by
              #6

              Tried adding an exception to LLDB through custom settings to avoid this 'namespace' to no avail.

              C 1 Reply Last reply
              0
              • C CodesInChaoss

                Tried adding an exception to LLDB through custom settings to avoid this 'namespace' to no avail.

                C Offline
                C Offline
                CodesInChaoss
                wrote on last edited by
                #7

                @CodesInChaoss

                My QT Creator just crashed and all my Kit settings are gone... it's all way too ridiculous.

                Ronel_qtmasterR 1 Reply Last reply
                0
                • C CodesInChaoss

                  @CodesInChaoss

                  My QT Creator just crashed and all my Kit settings are gone... it's all way too ridiculous.

                  Ronel_qtmasterR Offline
                  Ronel_qtmasterR Offline
                  Ronel_qtmaster
                  wrote on last edited by
                  #8

                  @CodesInChaoss Have you enabled USB debugging on your phone?

                  C 2 Replies Last reply
                  0
                  • Ronel_qtmasterR Ronel_qtmaster

                    @CodesInChaoss Have you enabled USB debugging on your phone?

                    C Offline
                    C Offline
                    CodesInChaoss
                    wrote on last edited by
                    #9

                    @Ronel_qtmaster that's a joke right

                    1 Reply Last reply
                    0
                    • Ronel_qtmasterR Ronel_qtmaster

                      @CodesInChaoss Have you enabled USB debugging on your phone?

                      C Offline
                      C Offline
                      CodesInChaoss
                      wrote on last edited by
                      #10

                      @Ronel_qtmaster
                      I'll also give you one: no, I've enabled debugging on my TV and Fridge instead.

                      Ronel_qtmasterR 1 Reply Last reply
                      0
                      • C CodesInChaoss

                        @Ronel_qtmaster
                        I'll also give you one: no, I've enabled debugging on my TV and Fridge instead.

                        Ronel_qtmasterR Offline
                        Ronel_qtmasterR Offline
                        Ronel_qtmaster
                        wrote on last edited by
                        #11

                        @CodesInChaoss Check if it is working with GDB as well before drawing conclusions

                        C 1 Reply Last reply
                        0
                        • Ronel_qtmasterR Ronel_qtmaster

                          @CodesInChaoss Check if it is working with GDB as well before drawing conclusions

                          C Offline
                          C Offline
                          CodesInChaoss
                          wrote on last edited by
                          #12

                          @Ronel_qtmaster

                          I'm not drawing conclusions in regards to performance of LLDB since I've used LLDB manually in projects not involving QT already.

                          What kind of conclusions do you have on mind the situation is depicted in detail already.

                          Ronel_qtmasterR 1 Reply Last reply
                          0
                          • C CodesInChaoss

                            @Ronel_qtmaster

                            I'm not drawing conclusions in regards to performance of LLDB since I've used LLDB manually in projects not involving QT already.

                            What kind of conclusions do you have on mind the situation is depicted in detail already.

                            Ronel_qtmasterR Offline
                            Ronel_qtmasterR Offline
                            Ronel_qtmaster
                            wrote on last edited by
                            #13

                            @CodesInChaoss maybe you are using LLDB the wrong way with qt.
                            Also, have you checked if it is the right version for your Qt version?
                            How have you first of all added lldb in qt? which versiion of lldb are using?

                            C 1 Reply Last reply
                            0
                            • Ronel_qtmasterR Ronel_qtmaster

                              @CodesInChaoss maybe you are using LLDB the wrong way with qt.
                              Also, have you checked if it is the right version for your Qt version?
                              How have you first of all added lldb in qt? which versiion of lldb are using?

                              C Offline
                              C Offline
                              CodesInChaoss
                              wrote on last edited by
                              #14

                              @Ronel_qtmaster

                              Everything comes with defaults delivered by QT Creator 12, clean install of Windows.

                              Ronel_qtmasterR 1 Reply Last reply
                              0
                              • C CodesInChaoss

                                @Ronel_qtmaster

                                Everything comes with defaults delivered by QT Creator 12, clean install of Windows.

                                Ronel_qtmasterR Offline
                                Ronel_qtmasterR Offline
                                Ronel_qtmaster
                                wrote on last edited by Ronel_qtmaster
                                #15

                                @CodesInChaoss LLDB is for linux, use GDB for windows
                                check this https://doc.qt.io/qtcreator/creator-debugger-engines.html

                                C 1 Reply Last reply
                                0
                                • Ronel_qtmasterR Ronel_qtmaster

                                  @CodesInChaoss LLDB is for linux, use GDB for windows
                                  check this https://doc.qt.io/qtcreator/creator-debugger-engines.html

                                  C Offline
                                  C Offline
                                  CodesInChaoss
                                  wrote on last edited by CodesInChaoss
                                  #16

                                  @Ronel_qtmaster

                                  yes I've seen this page already BUT it seems that recent versions of QT Creator enforce use of LLDB (also by default) on WIndows. There are tickets in Bug-Reports saying that they've 'transitioned'.

                                  I've always worked with GDB on WIndows with QT Creator, but to all my surprise, after installation of QT Creator 12 (we've transitioned to Commercial License) LLDB was selected and enabled BY DEFAULT on all kits.

                                  So I said to myself, ok - let's go. I knew LLDB was for mac since that's what we've been using for iOS deployment.

                                  lldb version 11.0.5
                                    clang revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                    llvm revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                  
                                  C Ronel_qtmasterR 2 Replies Last reply
                                  0
                                  • C CodesInChaoss

                                    @Ronel_qtmaster

                                    yes I've seen this page already BUT it seems that recent versions of QT Creator enforce use of LLDB (also by default) on WIndows. There are tickets in Bug-Reports saying that they've 'transitioned'.

                                    I've always worked with GDB on WIndows with QT Creator, but to all my surprise, after installation of QT Creator 12 (we've transitioned to Commercial License) LLDB was selected and enabled BY DEFAULT on all kits.

                                    So I said to myself, ok - let's go. I knew LLDB was for mac since that's what we've been using for iOS deployment.

                                    lldb version 11.0.5
                                      clang revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                      llvm revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                    
                                    C Offline
                                    C Offline
                                    CodesInChaoss
                                    wrote on last edited by CodesInChaoss
                                    #17

                                    As far as I know, LLDB never (before) came pre-installed on Windows installations alongside with QT Creator, I think.

                                    Now, on windows , all kits deployed by QT Creator , by default have this:
                                    ecb2f846-1708-4710-8a2f-1dc06e508e5b-image.png

                                    1 Reply Last reply
                                    0
                                    • C CodesInChaoss

                                      @Ronel_qtmaster

                                      yes I've seen this page already BUT it seems that recent versions of QT Creator enforce use of LLDB (also by default) on WIndows. There are tickets in Bug-Reports saying that they've 'transitioned'.

                                      I've always worked with GDB on WIndows with QT Creator, but to all my surprise, after installation of QT Creator 12 (we've transitioned to Commercial License) LLDB was selected and enabled BY DEFAULT on all kits.

                                      So I said to myself, ok - let's go. I knew LLDB was for mac since that's what we've been using for iOS deployment.

                                      lldb version 11.0.5
                                        clang revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                        llvm revision 87f1315dfbea7c137aa2e6d362dbb457e388158d
                                      
                                      Ronel_qtmasterR Offline
                                      Ronel_qtmasterR Offline
                                      Ronel_qtmaster
                                      wrote on last edited by
                                      #18

                                      @CodesInChaoss Do you mean that you have installed lldb with the online installler?

                                      C 1 Reply Last reply
                                      0
                                      • Ronel_qtmasterR Ronel_qtmaster

                                        @CodesInChaoss Do you mean that you have installed lldb with the online installler?

                                        C Offline
                                        C Offline
                                        CodesInChaoss
                                        wrote on last edited by CodesInChaoss
                                        #19

                                        @Ronel_qtmaster
                                        Well it must have arrived with the online installer, yes, by default since I've used all the default tickers which go for Qt 5.15.16

                                        Ronel_qtmasterR C 2 Replies Last reply
                                        0
                                        • C CodesInChaoss

                                          @Ronel_qtmaster
                                          Well it must have arrived with the online installer, yes, by default since I've used all the default tickers which go for Qt 5.15.16

                                          Ronel_qtmasterR Offline
                                          Ronel_qtmasterR Offline
                                          Ronel_qtmaster
                                          wrote on last edited by
                                          #20
                                          This post is deleted!
                                          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