Android ActivityThread.reportSizeConfigurations causes app to freeze with black screen and then crash Android ActivityThread.reportSizeConfigurations causes app to freeze with black screen and then crash android android

Android ActivityThread.reportSizeConfigurations causes app to freeze with black screen and then crash


The crash is caused by the ANR on your Service, prior to the launch of your Activity.

If a user launches your app during a long-running task in your Service, the Activity will not be created until the task on the service finishes. This waiting might look bizarre to the user launching your app, and they then swipe your app away in the task switcher, which removes the task record from the ActivityManager (but process is still kept alive at this time).

When the long-running task on the service finally returns, it unblocks the activity from launching, but at this time the activity will throw ActivityRecord not found exception because it was removed already.

The following sequence diagram might explain the crash better.enter image description here

Credit goes to YogiAi, who originally investigated the issue in this post.


There is a bug opened with Google, seems exclusive to Samsung on app upgrades

https://issuetracker.google.com/issues/62427912


One of reasons of this problem can be - memory leak.In Houde's blog he writes the app that uses EventBus to receive the event to close the Activity, and an Event was writing an internal class, that caused by a memory leak.

Memory leak causes activity not no launch but relaunch. That causes problem by his words.

Another problem could be Activity pause/stop/destroy timeout. It can lead to the same