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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)