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.6k 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 CodesInChaoss
    26 Feb 2024, 12:10

    So to be on-point, which latest

    • QT Creator version
    • QT 5.* branch
    • Windows/Linux version

    triplet

    could be used to debug say an official 'clock' app targeting Android API 31 (min required by play store as of now). We would go from there. That's all we want to know.

    And if Windows/Linux can't be used then would Mac and apple silicon/iOS coupling be any better? We would then work on mac and simply recompile for Android

    C Offline
    C Offline
    CodesInChaoss
    wrote on 26 Feb 2024, 12:13 last edited by CodesInChaoss
    #145

    We do not have time for bugs to be solved so hopefully there's there's some setup which WOULD work?

    C 1 Reply Last reply 26 Feb 2024, 15:03
    0
    • C CodesInChaoss
      26 Feb 2024, 12:13

      We do not have time for bugs to be solved so hopefully there's there's some setup which WOULD work?

      C Offline
      C Offline
      CodesInChaoss
      wrote on 26 Feb 2024, 15:03 last edited by
      #146

      Gents, we've just tried debugging a latest QT 6.6.2 API mobile app on Android 33 API mobile device..... breakpoints do not work, what the heck is up with Qt?

      C 1 Reply Last reply 26 Feb 2024, 15:11
      0
      • C CodesInChaoss
        26 Feb 2024, 15:03

        Gents, we've just tried debugging a latest QT 6.6.2 API mobile app on Android 33 API mobile device..... breakpoints do not work, what the heck is up with Qt?

        C Offline
        C Offline
        CodesInChaoss
        wrote on 26 Feb 2024, 15:11 last edited by
        #147

        @CodesInChaoss 3b641416-22f0-4fd3-9e97-d7ade0b5b738-image.png

        That's what we get when attempting to debug a sample 'cofee machine' QT 6.6 app on Android.

        J 1 Reply Last reply 26 Feb 2024, 18:45
        0
        • C CodesInChaoss
          26 Feb 2024, 15:11

          @CodesInChaoss 3b641416-22f0-4fd3-9e97-d7ade0b5b738-image.png

          That's what we get when attempting to debug a sample 'cofee machine' QT 6.6 app on Android.

          J Offline
          J Offline
          JoeCFD
          wrote on 26 Feb 2024, 18:45 last edited by
          #148

          @CodesInChaoss I had a spin on Qt 6.6.2 with Qt Creator 12 for Android and saw the same problem with a simple qt example. Will take a detailed look at the issue. Qt 5.15.2 was used in my previous run. It seems a lot of things have been changed in QT for Android build. Unluckily, the newer Qt Creator is not compatible with the old project.

          C 1 Reply Last reply 27 Feb 2024, 08:57
          0
          • J JoeCFD
            26 Feb 2024, 18:45

            @CodesInChaoss I had a spin on Qt 6.6.2 with Qt Creator 12 for Android and saw the same problem with a simple qt example. Will take a detailed look at the issue. Qt 5.15.2 was used in my previous run. It seems a lot of things have been changed in QT for Android build. Unluckily, the newer Qt Creator is not compatible with the old project.

            C Offline
            C Offline
            CodesInChaoss
            wrote on 27 Feb 2024, 08:57 last edited by CodesInChaoss
            #149

            Yeah.. folks.. but tell you what....

            We've been also using 5.15.2 previously for our project along with the Community version of Qt.

            As you can imagine, a bit frustrated I was, so we bought a brand new Macbook with M2.

            Everything works out of the box.

            (..) with a damn Android VM.. even no need to attach a phone... the Android VM works crazy fast. Breakpoints keep spinning... no errors.... no assembly shit... no exceptions.. with out own project........

            I'll give it a try with real device later on.

            But presumably... all Qt user and development base moved to Apple hardware as of recent...

            Spend 7 days from dawn till dusk fighting with Windows and Linux.

            Buy a Macbook with M2 and have everything resolved.

            I mean... breakpoints ARE not hitting within main(), but other than that? it's f*** PERFECT.

            as if 100 bugs have been fixed. it simply works as it SHOULD.

            Breakpoitns can be dynamically inserted, removed, these fire each time.

            but yet again... not as soon as in main()

            A C T 3 Replies Last reply 27 Feb 2024, 09:09
            1
            • C CodesInChaoss
              27 Feb 2024, 08:57

              Yeah.. folks.. but tell you what....

              We've been also using 5.15.2 previously for our project along with the Community version of Qt.

              As you can imagine, a bit frustrated I was, so we bought a brand new Macbook with M2.

              Everything works out of the box.

              (..) with a damn Android VM.. even no need to attach a phone... the Android VM works crazy fast. Breakpoints keep spinning... no errors.... no assembly shit... no exceptions.. with out own project........

              I'll give it a try with real device later on.

              But presumably... all Qt user and development base moved to Apple hardware as of recent...

              Spend 7 days from dawn till dusk fighting with Windows and Linux.

              Buy a Macbook with M2 and have everything resolved.

              I mean... breakpoints ARE not hitting within main(), but other than that? it's f*** PERFECT.

              as if 100 bugs have been fixed. it simply works as it SHOULD.

              Breakpoitns can be dynamically inserted, removed, these fire each time.

              but yet again... not as soon as in main()

              A Offline
              A Offline
              Axel Spoerl
              Moderators
              wrote on 27 Feb 2024, 09:09 last edited by
              #150

              @CodesInChaoss
              Thats good news, glad to hear!
              May I ask you, which constellation works on the Mac?
              Android SDK / NDB / ABI, Qt Creator & Qt Version?
              That will help us to narrow down the issue and fix it asap.
              Thanks in advance - and I hope you'll get some rest after 168 sleepless hours ;-)

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              0
              • C CodesInChaoss
                27 Feb 2024, 08:57

                Yeah.. folks.. but tell you what....

                We've been also using 5.15.2 previously for our project along with the Community version of Qt.

                As you can imagine, a bit frustrated I was, so we bought a brand new Macbook with M2.

                Everything works out of the box.

                (..) with a damn Android VM.. even no need to attach a phone... the Android VM works crazy fast. Breakpoints keep spinning... no errors.... no assembly shit... no exceptions.. with out own project........

                I'll give it a try with real device later on.

                But presumably... all Qt user and development base moved to Apple hardware as of recent...

                Spend 7 days from dawn till dusk fighting with Windows and Linux.

                Buy a Macbook with M2 and have everything resolved.

                I mean... breakpoints ARE not hitting within main(), but other than that? it's f*** PERFECT.

                as if 100 bugs have been fixed. it simply works as it SHOULD.

                Breakpoitns can be dynamically inserted, removed, these fire each time.

                but yet again... not as soon as in main()

                C Online
                C Online
                cristian-adam
                wrote on 27 Feb 2024, 09:20 last edited by
                #151

                @CodesInChaoss I also moved from a Windows device to a MacBook Pro M1 Arm64 device. (I only had to change the keyboard to mimic Windows/Linux experience).

                The best part is that you get a Arm64 Android VM, which is the aarch64 architecture that most Arm Android devices use.

                Most likely the VM is faster than any Android Phone you can buy, since the Apple silicon is faster than what Qualcomm is putting out there (for now).

                C 1 Reply Last reply 1 Mar 2024, 16:47
                0
                • C CodesInChaoss
                  20 Feb 2024, 12:28

                  @JonB

                  We've bought the 'cheap' startup license or I recall 600USD per year per person.

                  Now, it does not come with technical support (as it tuned out).

                  As we've learned the hard way that is.

                  Now, I've forced GDB manually to neglect any segmentation faults (!!!) and Sig33s (..) by typing the custom arguments to QT Creator by hand as copy-pasting would result it to CRASH.

                  Now I'm able to debug.. I'm not disturbed by QT's internal segmentation faults... I presume? correct me if I'm wrong

                  E Offline
                  E Offline
                  ekkescorner
                  Qt Champions 2016
                  wrote on 27 Feb 2024, 13:20 last edited by
                  #152

                  @CodesInChaoss said in Unable to debug Android App (Windows + Qt Creator 12 + LLDB):

                  We've bought the 'cheap' startup license or I recall 600USD per year per person.
                  Now, it does not come with technical support (as it tuned out).

                  The Small Business License is $499 per year per developer.
                  On QtWS23 there was an announcement from Qt Keynotes about some improvements in 2024: same price, higher revenue possible and - if I remember right - up to 5 tech support issues.
                  got an info, that this will be published in march or so.

                  ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                  5.15 --> 6.8 https://t1p.de/ekkeChecklist
                  QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                  1 Reply Last reply
                  0
                  • C CodesInChaoss
                    27 Feb 2024, 08:57

                    Yeah.. folks.. but tell you what....

                    We've been also using 5.15.2 previously for our project along with the Community version of Qt.

                    As you can imagine, a bit frustrated I was, so we bought a brand new Macbook with M2.

                    Everything works out of the box.

                    (..) with a damn Android VM.. even no need to attach a phone... the Android VM works crazy fast. Breakpoints keep spinning... no errors.... no assembly shit... no exceptions.. with out own project........

                    I'll give it a try with real device later on.

                    But presumably... all Qt user and development base moved to Apple hardware as of recent...

                    Spend 7 days from dawn till dusk fighting with Windows and Linux.

                    Buy a Macbook with M2 and have everything resolved.

                    I mean... breakpoints ARE not hitting within main(), but other than that? it's f*** PERFECT.

                    as if 100 bugs have been fixed. it simply works as it SHOULD.

                    Breakpoitns can be dynamically inserted, removed, these fire each time.

                    but yet again... not as soon as in main()

                    T Offline
                    T Offline
                    TomZ
                    wrote on 27 Feb 2024, 18:29 last edited by
                    #153

                    @CodesInChaoss said in Unable to debug Android App (Windows + Qt Creator 12 + LLDB):

                    But presumably... all Qt user and development base moved to Apple hardware as of recent...

                    That hardware uses the ARMv8.6-A instruction set, which is what you'll find in most phones too. At least Android, I have no clue about iOs.

                    Which basically means that you're no longer debugging inside an (CPU) emulator, but basically doing it natively. And indeed I can understand that solves a host of issues.

                    I'm quite happy for you that this makes you're life a lot easier!

                    @ekkescorner said in Unable to debug Android App (Windows + Qt Creator 12 + LLDB):

                    On QtWS23 there was an announcement

                    As someone that hasn't been in contact with sales since the Trolltech / Nokia days, I'm curious if customers "inform" Qtio about which platform they develop on. My thinking here is that if they have an actual insight into the revenue-stream for Android, management can calculate the profit/loss of paying a(nother) developer to in-house work on Android and actually use this stuff. Dogfooding and fixing issues.

                    I mean, issues like QTBUG-121561 are clearly the result of devs not having enough time for this stuff. It literally is the result of a bugfix being reverted and the old bug showing up again.
                    This thread shows similarly that dogfooding is not happening, unless Qt devs have no need to run a debugger.

                    1 Reply Last reply
                    0
                    • C cristian-adam
                      27 Feb 2024, 09:20

                      @CodesInChaoss I also moved from a Windows device to a MacBook Pro M1 Arm64 device. (I only had to change the keyboard to mimic Windows/Linux experience).

                      The best part is that you get a Arm64 Android VM, which is the aarch64 architecture that most Arm Android devices use.

                      Most likely the VM is faster than any Android Phone you can buy, since the Apple silicon is faster than what Qualcomm is putting out there (for now).

                      C Offline
                      C Offline
                      CodesInChaoss
                      wrote on 1 Mar 2024, 16:47 last edited by
                      #154

                      @cristian-adam

                      True.

                      Just wanted to update you folks that debugging latest real hardware Android devices from MacOS is impossible as well.

                      I ended up having the very same issues as on Windows.

                      Sigfaults and straight-into-assembly experience.

                      For now the best thing we came up with is debugging on Android Simulator running atop of M2.. but for now we cannot get around UDP data exchange limitations as our app uses UDT which runs atop of UDP and we are unable to maintain connectivity.

                      haven't managed to run on iOS simulator as well due to some strange error throwing which I would repost soon.

                      A 1 Reply Last reply 1 Mar 2024, 20:42
                      0
                      • C CodesInChaoss
                        1 Mar 2024, 16:47

                        @cristian-adam

                        True.

                        Just wanted to update you folks that debugging latest real hardware Android devices from MacOS is impossible as well.

                        I ended up having the very same issues as on Windows.

                        Sigfaults and straight-into-assembly experience.

                        For now the best thing we came up with is debugging on Android Simulator running atop of M2.. but for now we cannot get around UDP data exchange limitations as our app uses UDT which runs atop of UDP and we are unable to maintain connectivity.

                        haven't managed to run on iOS simulator as well due to some strange error throwing which I would repost soon.

                        A Offline
                        A Offline
                        Axel Spoerl
                        Moderators
                        wrote on 1 Mar 2024, 20:42 last edited by
                        #155

                        @CodesInChaoss
                        I fully understand, that the Android debugging issue at hand is frustrating. The only thing I can assure is that we are busily working to stabilize it again. You may want to look at the bugreport for some updates.

                        Switching Ndk versions does change the debug behavior, so there is likely an external dependency as well. 25.1.8937393 has brought me a small improvement over 25.2...., albeit not a solution. It'll be helpful to know, which SDK / Ndk and Qt Creator versions are running on the M2 you have mentioned.

                        As regards your iOS simulator issue, feel free to post a separate thread and tag me. I've got a working environment here. Maybe I can help troubleshooting.

                        Software Engineer
                        The Qt Company, Oslo

                        J 1 Reply Last reply 1 Mar 2024, 21:59
                        0
                        • A Axel Spoerl
                          1 Mar 2024, 20:42

                          @CodesInChaoss
                          I fully understand, that the Android debugging issue at hand is frustrating. The only thing I can assure is that we are busily working to stabilize it again. You may want to look at the bugreport for some updates.

                          Switching Ndk versions does change the debug behavior, so there is likely an external dependency as well. 25.1.8937393 has brought me a small improvement over 25.2...., albeit not a solution. It'll be helpful to know, which SDK / Ndk and Qt Creator versions are running on the M2 you have mentioned.

                          As regards your iOS simulator issue, feel free to post a separate thread and tag me. I've got a working environment here. Maybe I can help troubleshooting.

                          J Offline
                          J Offline
                          JoeCFD
                          wrote on 1 Mar 2024, 21:59 last edited by JoeCFD 3 Jan 2024, 22:03
                          #156

                          @Axel-Spoerl Just tested a simple group box example.
                          QtCreator 12.0.2
                          Ubuntu 22.04
                          Qt 6.6.2
                          JDK-17
                          NDK 21 or 25
                          Device: Samsung tablet A-8 with Android 13

                          Problem 1: break into disassembler binary with JDK 17. The test case runs fine without breakpoints.
                          Problem 2: JDK 11 is not supported anymore. If JDK 11 and Qt 5.15.2 are applied, NDK can not be set-up. For Android 13, JDK 11 is the right selection.

                          A 1 Reply Last reply 1 Mar 2024, 22:54
                          0
                          • J JoeCFD
                            1 Mar 2024, 21:59

                            @Axel-Spoerl Just tested a simple group box example.
                            QtCreator 12.0.2
                            Ubuntu 22.04
                            Qt 6.6.2
                            JDK-17
                            NDK 21 or 25
                            Device: Samsung tablet A-8 with Android 13

                            Problem 1: break into disassembler binary with JDK 17. The test case runs fine without breakpoints.
                            Problem 2: JDK 11 is not supported anymore. If JDK 11 and Qt 5.15.2 are applied, NDK can not be set-up. For Android 13, JDK 11 is the right selection.

                            A Offline
                            A Offline
                            Axel Spoerl
                            Moderators
                            wrote on 1 Mar 2024, 22:54 last edited by
                            #157

                            @JoeCFD
                            Does that mean, things break with JDK 17?

                            Software Engineer
                            The Qt Company, Oslo

                            J 1 Reply Last reply 1 Mar 2024, 23:02
                            0
                            • A Axel Spoerl
                              1 Mar 2024, 22:54

                              @JoeCFD
                              Does that mean, things break with JDK 17?

                              J Offline
                              J Offline
                              JoeCFD
                              wrote on 1 Mar 2024, 23:02 last edited by JoeCFD 3 Jan 2024, 23:03
                              #158

                              @Axel-Spoerl Nope. No break stop in the code, instead in disassembler.

                              1 Reply Last reply
                              0
                              • J JoeCFD referenced this topic on 4 Mar 2024, 01:43
                              • C Online
                                C Online
                                cristian-adam
                                wrote on 5 Mar 2024, 19:33 last edited by
                                #159

                                At https://github.com/qt-creator/qt-creator/actions/runs/8161009528 I have artifacts for a fix for the Android debugger issue.

                                It's one line of code that brings Qt Creator 13 to the level of Qt Creator 10.

                                In my case of MacBook Pro M1 I am getting breakpoints hits and no longer "Waiting for debugger".

                                J 1 Reply Last reply 5 Mar 2024, 19:56
                                0
                                • C cristian-adam
                                  5 Mar 2024, 19:33

                                  At https://github.com/qt-creator/qt-creator/actions/runs/8161009528 I have artifacts for a fix for the Android debugger issue.

                                  It's one line of code that brings Qt Creator 13 to the level of Qt Creator 10.

                                  In my case of MacBook Pro M1 I am getting breakpoints hits and no longer "Waiting for debugger".

                                  J Offline
                                  J Offline
                                  JoeCFD
                                  wrote on 5 Mar 2024, 19:56 last edited by JoeCFD 3 May 2024, 19:56
                                  #160

                                  @cristian-adam Good news. We have to use 13? No fix in 12?

                                  C 1 Reply Last reply 5 Mar 2024, 21:33
                                  0
                                  • J JoeCFD
                                    5 Mar 2024, 19:56

                                    @cristian-adam Good news. We have to use 13? No fix in 12?

                                    C Online
                                    C Online
                                    cristian-adam
                                    wrote on 5 Mar 2024, 21:33 last edited by
                                    #161

                                    @JoeCFD At https://wiki.qt.io/Qt_Creator_Releases there is no 12.0.3 release planed.

                                    But, you can backport the change, is just one liner. Just clone Qt Creator on GitHub, cherry-pick the change and push a release tag to your fork. You will get releases automatically.

                                    C 1 Reply Last reply 6 Mar 2024, 11:31
                                    0
                                    • C cristian-adam
                                      5 Mar 2024, 21:33

                                      @JoeCFD At https://wiki.qt.io/Qt_Creator_Releases there is no 12.0.3 release planed.

                                      But, you can backport the change, is just one liner. Just clone Qt Creator on GitHub, cherry-pick the change and push a release tag to your fork. You will get releases automatically.

                                      C Online
                                      C Online
                                      cristian-adam
                                      wrote on 6 Mar 2024, 11:31 last edited by
                                      #162

                                      https://download.qt.io/snapshots/qtcreator/13.0/13.0.0-rc1/78/ has the needed fixes for the working Android debugging.

                                      J 1 Reply Last reply 6 Mar 2024, 20:39
                                      0
                                      • C cristian-adam
                                        6 Mar 2024, 11:31

                                        https://download.qt.io/snapshots/qtcreator/13.0/13.0.0-rc1/78/ has the needed fixes for the working Android debugging.

                                        J Offline
                                        J Offline
                                        JoeCFD
                                        wrote on 6 Mar 2024, 20:39 last edited by
                                        #163

                                        @cristian-adam just downloaded it and had a try. The problem is still there.
                                        Ubuntu 22.04
                                        Qt 6.6.2
                                        JDK-17
                                        NDK 21 or 25

                                        C 1 Reply Last reply 7 Mar 2024, 09:47
                                        0
                                        • J JoeCFD
                                          6 Mar 2024, 20:39

                                          @cristian-adam just downloaded it and had a try. The problem is still there.
                                          Ubuntu 22.04
                                          Qt 6.6.2
                                          JDK-17
                                          NDK 21 or 25

                                          C Online
                                          C Online
                                          cristian-adam
                                          wrote on 7 Mar 2024, 09:47 last edited by
                                          #164

                                          @JoeCFD I just gave it a try on my MacBook Pro M1 with:

                                          • Qt 6.6.1
                                          • Android arm64-v8 emulator image
                                          • Android SDK 33
                                          • Android NDK 25
                                          • OpenJDK-17

                                          See the recording at qtcreator13-android33.mp4.

                                          A 1 Reply Last reply 7 Mar 2024, 17:37
                                          0

                                          154/169

                                          1 Mar 2024, 16:47

                                          • Login

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