Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unidentified LLDB behavior in Android Studio 2.2

So I just updated to Android Studio 2.2 and I'm having problems running my app on my device. What seems to happen is that now there are two separate debuggers running when I try to debug my app. One of them is the good old Java debugger and the other one is I think the LLDB debugger.

My app has a splash screen which is presented as the first Activity in the app. What happened before was the splash screen would only be shown around 1 second before the actual intro screen showed up. After I updated my Android Studio to version 2.2, it takes around a minute before the splash screen disappears.

I put a breakpoint to the SplashScreenActivity.onCreate() to see if everything was OK. After I launch the app, it waits for some time before the LLDB debugger stops with a SIGURG signal. I click resume program and again it hits the same signal. This happens 7-8 times, after which my breakpoint in SplashScreenActivity.onCreate() is hit by the Java debugger. After this, the app keeps working normal.

I don't know if it helps but the console of the LLDB debugger is like this:

09/26 00:19:32: Launching app
No apk changes detected since last installation, skipping installation of D:\Documents\SourceTree\autocolorsplash-android\app\build\outputs\apk\app-debug.apk
$ adb shell am force-stop com.kayimapps.autocolorsplash_android
$ adb shell am start -n "com.kayimapps.autocolorsplash_android/com.kayimapps.autocolorsplash_android.activities.SplashScreenActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.kayimapps.autocolorsplash_android | com.kayimapps.autocolorsplash_android.test
Waiting for application to come online: com.kayimapps.autocolorsplash_android | com.kayimapps.autocolorsplash_android.test
Connecting to com.kayimapps.autocolorsplash_android
Now Launching Native Debug Session
Starting LLDB server: /data/data/com.kayimapps.autocolorsplash_android/lldb/bin/start_lldb_server.sh /data/data/com.kayimapps.autocolorsplash_android/lldb unix-abstract /data/data/com.kayimapps.autocolorsplash_android/lldb/tmp platform-1474838375380.sock "lldb process:gdb-remote packets"
Debugger attached to process 927
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)
Signal: SIGURG (signal SIGURG)

I'm not using any C++ in my app other than some compiled OpenCV code, which I haven't touched at all. I'm only using the Java wrapper for OpenCV.

The debugger frame looks like this after the first SIGURG signal:

debug frame debug frame

I don't know if there's any other relevant information I can give about the situation since I have no idea what's going on. Please do tell me if this seems like something you have seen before and requires some additional info.

like image 592
halileohalilei Avatar asked Sep 25 '16 21:09

halileohalilei


People also ask

What is LLDB in Android Studio?

Android Studio attaches both the Java debugger and LLDB to your app process, one for the Java debugger and one for LLDB, so you can inspect breakpoints in both your Java and native code without restarting your app or changing your debug configuration.

How do I debug an APK file?

To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.


1 Answers

So I couldn't find why LLDB made me wait for around a minute but I found where to disable LLDB altogether. I don't know if it was there prior to Android Studio 2.2, but you can go to Run->Edit Configurations and from the Debugger pane you can set Debug Type to Java instead of Auto.

This disables LLDB and turns things back to how they were before 2.2. However launching the app for the first time through adb still causes the splash screen to stick around for some time.

like image 127
halileohalilei Avatar answered Oct 13 '22 09:10

halileohalilei