~/talk

Understanding and debugging ANR's (Android Not Responding)

Talkat droidcon Berlin 2021 · 2021-10-20..10-22· [android]
links:none on file
slides:none on file

Explains how to read the ANR traces.txt snapshot to find the actual culprit: main thread states like main thread sleeping 30s or blocked waiting on TID 19 sample writer thread, and how that maps back to code. Shows concrete fixes: move heavy shared‑prefs reads (2–3 MB) off the UI thread, replace with DataStore or smaller prefs, use thread pools or WorkManager to avoid long locks, run StrictMode and Android Studio Profiler to spot disk IO and GC spikes.

AI-written summary · about

  1. 0:00Introduction to ANRs
  2. 1:49Understanding ANR traces.txt
  3. 3:14Analyzing ANR traces examples
  4. 5:42Debugging blocked main thread
  5. 7:48Common ANR causes and fixes
  6. 9:35Advanced debugging techniques
  7. 11:01Preventing ANRs with thread policy
  8. 11:41Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.