Quick answer: Out-of-memory crashes happen when your game uses more memory than the device has, from a high footprint (loading too much), memory leaks (memory never freed), or large assets, especially on lower-memory devices.
An out-of-memory (OOM) crash happens when your game asks for memory the device doesn't have. They're common on lower-memory devices you don't test on, so they're easy to miss. Here's what causes out-of-memory crashes and why they hit some players and not you.
Why a Game Runs Out of Memory
OOM crashes come down to your game's memory footprint exceeding the device's available memory. A few patterns drive that.
- A high memory footprint, loading too much into memory at once (all levels, all assets up front) instead of only what's needed
- Memory leaks, memory allocated and never freed, so usage grows over a session until it exceeds the limit
- Large assets, uncompressed or high-resolution textures and audio that consume far more memory than necessary
- Not unloading, holding onto assets and data you no longer need
- Memory spikes, a sudden surge (loading a big level, spawning many objects) that briefly exceeds available memory
When the total exceeds what the device has, the OS kills the game, an out-of-memory crash. The cause is using more than is available, whether steadily or in a spike.
Why They Hit Lower-Memory Devices
OOM crashes are invisible on your high-memory dev machine, they only happen on devices with less RAM than your game needs. A footprint that fits comfortably on your machine can exceed a budget phone's memory, crashing it while you see nothing.
Bugnet captures memory-related crashes tagged by device, so OOM crashes on lower-memory hardware surface in your data. This is the only way to see a problem affecting a segment of players you'd never notice from your own testing, where memory is plentiful.
Finding and Fixing the Cause
To address OOM crashes, you need to know which devices hit them and what's consuming the memory. Capturing the crashes by device shows you the affected hardware; then reducing your footprint (unloading what isn't needed, compressing assets, streaming instead of loading all at once) and checking for leaks brings usage within limits.
Bugnet shows which devices hit out-of-memory crashes and helps you confirm fixes worked. So out-of-memory crashes are caused by exceeding available memory, through footprint, leaks, or large assets, and finding the cause means capturing them by device and reducing what you hold resident.
OOM crashes happen when your game uses more memory than the device has, from a high footprint, leaks, or large assets. They hit lower-memory devices you don't test, so capture them by device.