Out-of-memory crashes are among the hardest Android bugs to fix. The report tells you the app ran out of memory, but not why. Firebase Crashlytics 21.0.0, shipped with Android BoM 35 on 7 October, now decorates OOM and memory-leak (MLK) events with whether a heap dump was generated and whether heap dump collection is enabled. The same release fixes event timestamps on ANR events, and Crashlytics NDK 21.0.1 fixes a file descriptor leak when reading native crash traces.
Without this context, teams chase OOMs blindly. They cannot tell whether a missing heap dump means the feature is off, the device was too low on resources, or the crash simply had no dump to give. Time is lost debating the report instead of reading it.
Data Points to Track
- crashlytics_version: the SDK version in the build
- heap_dump_enabled: whether collection is switched on for this build
- heap_dump_generated: whether the OOM or MLK event included a dump
- crash_type: OOM, MLK, ANR or native
- device_ram_mb: total memory on the handset
- free_memory_mb_at_crash: memory available when the crash happened
- screen_name: the screen in use
- session_age_min: minutes since the app started
- app_version: your own build number
Setup Steps
- Upgrade Crashlytics to 21.0.1 or later in a test build, noting the minSdk 24 requirement.
- Decide on heap dumps. Check your privacy review first, because dumps can contain in-memory data.
- Record heap_dump_enabled as a custom key so every report carries it.
- Log device_ram_mb and last-known free memory as custom keys at session start and at key screens.
- Build a view that groups OOM and MLK events by heap_dump_generated and screen_name.
- Trigger a test OOM on a low-memory emulator to confirm the flags appear as expected.
- Roll out gradually and compare OOM rate per thousand sessions against the previous build.
- Review weekly and open a ticket for each screen that shows repeated leaks.
Actionable Insights
If most OOM events show a generated dump, you have material to analyse. Start with the screens that appear most often and look for objects that grow with session age.
If dumps are enabled but rarely generated, look at device_ram_mb. Very low memory devices may fail before a dump can be written, so improve your memory use on those devices first.
If collection is off, you now know why the reports feel thin. Weigh the privacy cost against the debugging value before switching it on.
Watch ANR timestamps too. Corrected times may move some events into different days, so annotate the release date before comparing trends.
Common Pitfalls
Do not treat a missing dump as proof there was no leak.
Do not collect dumps without checking what personal data an in-memory snapshot could hold.
Turning Context Into Fixes
Good crash tracking explains why something failed, not only that it did. Keep flags such as heap_dump_enabled in your tracking plan, and review them after every Firebase upgrade.