Unable to debug Android App (Windows + Qt Creator 12 + LLDB)
-
@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.
-
https://download.qt.io/snapshots/qtcreator/13.0/13.0.0-rc1/78/ has the needed fixes for the working Android debugging.
-
@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 -
@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.
-
@JoeCFD
Note the following:- if you have legacy break points, remove them all.
- if you want to set a break point into
main()
, add aQThread::sleep(1)
on top. It has to be the first instruction in main. - if you set no break points at all, the debugger will still jump to the disassembler. It looks as if the bug was still present. If you hit "continue" many times (18 in my case), the debuggee will start normally.
-
I have tested the "dice" Qt example and I was able to land into "disassembly" only the first time that the application was installed on the device.
If I click continue it will skip all the SIGSEGVS and would hit my breakpoints.
See the recording: qtcreator13-disassembly.
The Java exceptions are implemented with signals and it looks like the
lldb-server
is picking up and giving them further down the chain.Android Studio users also have this problem see Android Studio keeps pausing with SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x0)) at random [240007217] - Issue Tracker (google.com)
I have tried telling the debugger to ignore the signal:
process handle SIGSEGV --pass true --stop false --notify true
but it didn't work.
This doesn't look like a Qt Creator bug.
-
As a workaround one can paste (plus Enter):
pro hand -p true -s false SIGSEGV
In the debugger console at the first assembly hit, and then all the rest are ignored!
-
@esnosy said in Unable to debug Android App (Windows + Qt Creator 12 + LLDB):
EDIT: I take it back
Does that mean, you are still struggling?