(JDWP Error Code:35) Invalid slot. for <register>
This is happening with any APK I use to decompile, when try to debug I can't get values for the virtual registers, It always show this error message (JDWP Error Code:35) Invalid slot. for vx as in the printscreen below. I'm using the latest release (1.4.6) with Java version 17.0.6. The application is running under a Qemu emulator with android-x86 image

Error persist in version 1.4.7
Could you please check the Jadx log if it shows more details e.g. a stack trace?
this is all that is showing on the terminal since it opened:
$ ./jadx-gui
INFO - output directory: UnCrackable-Level1-run-with-root-DEBUG
INFO - loading ...
INFO - Loaded classes: 7, methods: 15, instructions: 373
INFO - Can't find 'R' class in app package: owasp.mstg.uncrackable1
INFO - App 'R' class not found, put all resources ids into : 'owasp.mstg.uncrackable1.R'
^YINFO - Resetting disk code cache, base dir: /home/fabio/OneDrive/Estudos/TCC/UnCrackable-Level1/UnCrackable-Level1-run-with-root-DEBUG.apk.cache
WARN - Aborting readServiceProtocol: java.net.SocketException: Socket closed
WARN - Aborting readServiceProtocol: java.net.SocketException: Socket closed
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for p0
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v4
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v4
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v4
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v1
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v2
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v1
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v1
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v0
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v0
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v0
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v0
ERROR - Debug error: (JDWP Error Code:35) Invalid slot. for v0
I found this blog post which provides a lot of background information on this specific error (the used software is JEB, but that doesn't matter of the background info): https://www.pnfsoftware.com/blog/debugging-android-apps-on-android-pie-and-above/
According to this post the error occurs because the slots have a different name since Android 9. If I understand the post correctly before Android 9 the registers were accessed using the pX notation, since Android 9 the vX notation is used.
As Android x86 is an 8.x or lower Android version this would match that there are no vX registers, but in your log there is also an entry for Invalid slot. for p0 which confuses me as it uses the pX notation which should be supported.
As workaround my recommendation would be to use an emulator with Android 9+. To my understanding it should not be affected by this problem.
yes but I'm really using Android v9.0-rc2
I've just tested with a real phone and it did work, however the are some GUI problems:
- It doesn't let me resize the window of the values, so I can't see the actual values there since they are below the Debugger log window and the call stack window:
- The "Copy Value" option on the right click context menu doesn't work when I click on it, however it works if I just type CTRL + C
I am also encountering the exact same issue (1.4.7). I am also running the application on an avd emulator (x86_64). So this reproduces only when using an emulator? I still haven't tried the same app on a real device.
Debugging Android apps on Android Pie and above
Update (March 2020): It looks li ke the problem highlighted below regarding the impossibility to read locals that do not have associated DebugLocalInfo on Android P and Q was fixed in Android R (verified with the Developer Preview 1 released on Feb 19). The patch solving this issue is likely this one.
Same issue with Android-x86 9 (Pie):
- switch to
android-x86_64-8.1-r6.iso(Android 8.1 Oreo) :+1: - use
jadx 1.4.7andAndroid Debug Bridge version 1.0.41
and
- no more :no_entry:
JDWP Error Code:35:bug: -
UnCrackable-Level1.apkdynamically solved :medal_sports:- by changing
v0values at first checks :pencil2: - using breakpoint to get the secret :mag_right:
- by changing
Did this bug resloved when debug a apk in android 9 emulator with jadx 1.4.7?I meet this problem too