java.lang.RuntimeException at android.app.ActivityThread.performLaunchActivity

San Moohak picture San Moohak · Dec 31, 2018 · Viewed 8.2k times · Source

From Google Play Console, java.lang.RuntimeException occurs without "Caused by:"

The below log is copied from Google Play Console Crash log.
This is for: Android 8.0, Android 8.1, Android 7.0, Android 7.1

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
  at android.app.ActivityThread.-wrap11 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

Please help me regarding this!

Answer

Martin Zeitler picture Martin Zeitler · Sep 24, 2019

ActivityThread.java says it's updatePendingConfiguration() or registerOnActivityPausedListener(), so it either fails with .onPause() or it fails to call the super() method with the correct arguments - or something is wrong with the Configuration being applied.

I'd glady explain how to solve the issue, but the question lacks the code which throws the exception. The best way to tackle this might be to employ something alike Firebase Crashlytics, so that one can see where exactly this is coming from and which devices are affected (in case this should be specific). I'd almost suspect that it might be caused by starting an Activity with the application's Context, while not setting flag Intent.FLAG_ACTIVITY_NEW_TASK (see: this answer).