2

I'm investigating ANR reports from Google Console in my app and very often I found the HeapTaskDaemon thread to be in one of the following states:

  • Blocked
  • WaitingForCheckPointsToRun
  • WaitingForTaskProcessor
  • WaitingForGcToComplete

Example: Example

Except for Blocked, which is referenced in Android documentation explicitly, I've found very little documentation on those states (in fact there's almost no Google results for WaitingForCheckPointsToRun). WaitingForGcToComplete looks intuitive by the name, but a more experienced opinion would be appreciated.

Do you know what do they mean? What's the difference between them? Official documentation would be appreciated as well, I couldn't find it.

For context: on those reports, there is no indication that the main thread is somehow blocked (it appears to be fine), so I'm guessing the problem could be an ANR generated by memory leaks + Garbage Collector struggling to run. I've managed to reproduce similar thread dumps by forcing the memory heap to be full in my app, however I'd like to have more understanding on these stack traces to be sure I'm on the right track.

Renato
  • 685
  • 1
  • 6
  • 11

0 Answers0