Quick answer: Fatal signal 11 (SIGSEGV) means native code in your game touched memory it does not own and Android killed the process. The log line narrows it down: a fault address near zero is a null pointer, SEGV_ACCERR is a protection violation (often a stack overflow), and the library in frame #00 says whether it is your code, the engine, a plugin or the GPU driver. Symbolicate the backtrace with that exact build’s symbols, then fix the call site it names.
A segfault on Android gives you one line in logcat and a block of hex underneath it, and no managed stack trace. That line is denser than it looks. The signal code, the fault address, the thread name and the library path of the first frame each rule out most of the possible causes, and you can read all four without any tools. This guide decodes the line field by field, lists what produces it in Unity (IL2CPP), Unreal, Godot and custom C++ engines, shows how to sort crashes by device in Play Console, and gives the fixes for each cause.
- The exact error
- Decoding the line field by field
- What the library in frame #00 implies
- What causes it in games
- How to find which cause is yours
- Triage by device, GPU and OS version
- Fix 1: lifetime and threading bugs in your code
- Fix 2: plugin signatures and unchecked access
- Fix 3: mitigate driver crashes
- How to confirm the fix
- What Bugnet adds, and what it does not
- Related guides
- Frequently asked questions
The exact error
This is the shape of the crash in adb logcat. The package name and all numbers here are made up for the example:
11-20 21:14:03.412 12300 12345 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 12345 (UnityMain), pid 12300 (m.studio.mygame)
11-20 21:14:03.655 12790 12790 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-20 21:14:03.655 12790 12790 F DEBUG : pid: 12300, tid: 12345, name: UnityMain >>> com.studio.mygame <<<
11-20 21:14:03.655 12790 12790 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
11-20 21:14:03.655 12790 12790 F DEBUG : Cause: null pointer dereference
11-20 21:14:03.655 12790 12790 F DEBUG : backtrace:
11-20 21:14:03.655 12790 12790 F DEBUG : #00 pc 00000000012a4b3c /data/app/~~Qf3xT1==/com.studio.mygame-9aBc==/lib/arm64/libil2cpp.so (BuildId: 6f1e2d3c4b5a69788796a5b4c3d2e1f001234567)
Variants of the first line you will meet:
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18 in tid 12345 (UnityMain), pid 12300 (m.studio.mygame)
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7a9c2ff000 in tid 12412 (Job.Worker 3), pid 12300 (m.studio.mygame)
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb400007c5d1e8a40 in tid 12377 (RenderThread 1), pid 12300 (m.studio.mygame)
The libc line is written by the crashing process itself. The DEBUG lines come from the system’s crash dumper, which is why they carry a different pid, and they are a short copy of the tombstone. The process name in the first line is cut to its last 15 characters, so com.studio.mygame shows as m.studio.mygame. The error only exists on a device or emulator: in the Unity editor the same bug surfaces as an editor crash or, more often, as a managed exception.
Decoding the line field by field
| Field | What it tells you |
|---|---|
signal 11 (SIGSEGV) | An invalid memory access by native code. Java and C# exceptions never produce this by themselves. |
code 1 (SEGV_MAPERR) | The address is not mapped at all. Null pointers, freed and unmapped memory, wild pointers. |
code 2 (SEGV_ACCERR) | The address is mapped but the access is not allowed: writing to read-only memory, executing data, or running into a stack guard page. |
fault addr 0x0 | A plain null pointer dereference. |
fault addr 0x18 (anything below 0x1000) | A null object pointer plus a field offset: obj->field where obj is null. The tombstone still prints Cause: null pointer dereference. |
| A large address | A dangling pointer (use after free), an out-of-range index, or corrupted memory. On Android 11 and later a 64-bit heap pointer carries a tag in its top byte, so an address that starts 0xb4 is a real heap pointer, not garbage. |
fault addr -------- | Seen in the tombstone when the signal has no address: it was sent by kill, by another process or by the process itself (codes SI_USER, SI_TKILL, SI_QUEUE). Nothing dereferenced a bad pointer. |
tid 12345 (UnityMain) | The thread that faulted. Names are limited to 15 characters. |
Thread names worth recognising: in Unity, UnityMain runs your scripts and the player loop, UnityGfxDeviceW is the render thread and Job.Worker N threads run jobs. In Unreal, look for GameThread, RenderThread and RHIThread. Godot drives its main loop from the rendering surface’s thread, typically named GLThread or VkThread. A crash on a render thread with a driver library on top points away from your gameplay code; a crash on a worker thread points at jobs, async callbacks and thread safety.
On devices with memory tagging enabled you may also see codes 8 and 9 (SEGV_MTEAERR, SEGV_MTESERR). Those are the hardware catching a use after free or an overflow at the moment it happens, and the tombstone names the allocation.
What the library in frame #00 implies
| Top frame is in | Whose code | First move |
|---|---|---|
libil2cpp.so | Your C# compiled by IL2CPP, or the IL2CPP runtime and its garbage collector | Symbolicate; the function name maps back to a C# method |
libunity.so | The Unity engine | Read the frames below it for the script call that led there; check the engine version against Unity’s issue tracker |
libUnreal.so (UE5), libUE4.so (UE4) | Engine and your game C++ in one library | Symbolicate with the unstripped library from packaging |
libgodot_android.so | The Godot engine | Symbolicate with the native debug symbols for that Godot version |
libGLES_mali.so, vulkan.adreno.so, libGLESv2_adreno.so and other files under /vendor | The GPU driver | Group by GPU and driver version in Play Console before touching code |
libc.so (memcpy, strlen, free) | The C library, handed a bad pointer | Blame the first frame outside libc |
libart.so | The Android runtime | Suspect JNI misuse |
A plugin’s .so | An SDK or native plugin | Check the SDK version, its init order and its threading rules |
If the program counter itself is the fault address, or frame #00 has no library, the code jumped through a bad function pointer or a destroyed object’s vtable. Read frame #01 for the caller.
What causes it in games
- Using a native object after it was freed. A plugin handle released in
OnDestroywhile a callback still writes to it; an UnrealUObject*held in a raw pointer withoutUPROPERTY()and collected by the garbage collector; a GDExtension keeping a pointer to a freed node. The fault address is large and changes between crashes. - A null pointer in native code. C++ gameplay or plugin code that skips a check. In IL2CPP a managed null normally throws
NullReferenceExceptioninstead, unless null checks were disabled withIl2CppSetOptionor the code isunsafeor Burst-compiled. - Touching engine objects from a background thread. An SDK callback arriving on its own thread and calling straight into the engine, or an Unreal task reading a
UObjectwhile the game thread destroys it. - A GPU driver bug on specific chips. Top frame in a driver library, crashes concentrated on one GPU family or one driver version, often during shader compilation or the first frame.
- Stack overflow from deep recursion. A recursive flood fill, pathfinder or JSON walker on a worker thread. Threads created with the platform default get about 1 MB of stack. The fault address sits just below the stack pointer and the tombstone may say
Cause: stack pointer is in a non-existent map; likely due to stack overflow. - Out-of-range access in unchecked code.
NativeArrayindexing in player builds (the collection safety checks run in the editor only), pointer arithmetic inunsafeblocks, IL2CPP array bounds checks switched off, plain C++ arrays. - JNI misuse. A local reference used after its native method returned or on another thread, a method ID called with the wrong signature. Top frames are in
libart.so. With CheckJNI on, the same bug aborts with a readable message instead, covered in the SIGABRT guide. - A native plugin ABI mismatch. A P/Invoke declaration whose parameter sizes do not match the C function on 64-bit, or a struct laid out differently on each side.
- 16 KB page size incompatibility. On devices with 16 KB pages, a library linked for 4 KB can crash with a segmentation fault when its read-only relocation region covers writable data, and code that hard-codes 4096 breaks
mmapmath. This only reproduces on 16 KB devices; see the 16 KB page size guide.
How to find which cause is yours
- Save the whole crash block. Right after the crash, run
adb logcat -b crash -d > crash.txt. Unity also prints its own copy under the tagCRASH. Save the main log as well (adb logcat -d > full.txt): the engine’s last lines before the crash (tagsUnity,UE,godot) often name the asset or system involved. - Symbolicate it.
ndk-stack -sym <symbols-for-this-build>/arm64-v8a -dump crash.txtturns the offsets into function names. The symbols must come from the same build, matched by BuildId. How to read an Android tombstone walks through it, and how to symbolicate native crashes covers the general workflow. For Unity projects, reading Unity crash logs with logcat shows the filters. - Make the bug fail earlier. Add
android:gwpAsanMode="always"to theapplicationelement of the manifest in a test build. GWP-ASan guards a sample of heap allocations and, when it catches one, the tombstone reads likeCause: [GWP-ASan]: Use After Free, 0 bytes into a 32-byte allocationwith the stacks that allocated and freed the memory. For JNI, runadb shell setprop debug.checkjni 1and relaunch the game. - Reproduce in a checked build. A Unity Development Build keeps script debugging information; in the editor, Jobs > Burst > Safety Checks turns an out-of-range job write into an exception with a line number.
Triage by device, GPU and OS version
One tombstone tells you where it crashed. The distribution tells you why. In Play Console open Android vitals > Crashes and ANRs, pick the cluster whose top frame matches, and look at how its occurrences split by device model, Android version and app version. Upload your native debug symbols for the release first, or the frames stay as offsets.
- One GPU family or one vendor’s models: a driver problem or a GPU feature you use that the driver gets wrong.
- One Android version and up: a platform behaviour change, such as a new page size or stricter checks.
- Spread across everything in proportion to your install base: your code or a plugin.
- Only the newest app version: diff that release, including SDK updates.
- Only 32-bit devices: pointer truncation or a plugin whose 32-bit build is stale.
Vitals only counts users who installed from Google Play and share diagnostics, so treat the numbers as a sample.
Fix 1: lifetime and threading bugs in your code
Stop the source of callbacks before freeing what they touch, then clear the handle so a late call fails loudly instead of corrupting memory. In Unity, with a hypothetical native audio plugin:
// Broken: the buffer is freed while the native callback can still fire.
void OnDestroy() { NativeAudio_Free(handle); }
// Fixed: detach first, free second, poison the handle.
void OnDestroy()
{
NativeAudio_SetCallback(handle, null);
NativeAudio_Free(handle);
handle = IntPtr.Zero;
}
In Unreal, keep object pointers visible to the garbage collector and never touch a UObject off the game thread:
// Broken: raw pointer used later on a pool thread.
Async(EAsyncExecution::ThreadPool, [this]() { Target->ApplyResult(Compute()); });
// Fixed: compute off-thread, apply on the game thread, check it is still alive.
TWeakObjectPtr<UScoreComponent> WeakTarget(Target);
Async(EAsyncExecution::ThreadPool, [WeakTarget]()
{
FScoreResult Result = Compute();
AsyncTask(ENamedThreads::GameThread, [WeakTarget, Result]()
{
if (WeakTarget.IsValid()) { WeakTarget->ApplyResult(Result); }
});
});
In Godot, call is_instance_valid(node) before using a stored reference from a signal or a deferred call, and have GDExtension code store an object ID and look the object up again instead of caching the pointer.
Fix 2: plugin signatures and unchecked access
Match every P/Invoke declaration to the C header, using pointer-sized types where the C side uses pointers or size_t:
// Broken on arm64: the native function takes size_t and returns a pointer.
[DllImport("mynative")] static extern int mn_alloc(int size);
// Fixed
[DllImport("mynative")] static extern IntPtr mn_alloc(UIntPtr size);
Leave IL2CPP null checks and array bounds checks on unless a profiler proved a specific method needs them off, and bound every index that comes from save data or the network before it reaches a NativeArray or a pointer. For recursion that overflows the stack, rewrite it with an explicit stack or queue; if the depth is legitimate, run that work on a thread you create with a larger stack size.
Fix 3: mitigate driver crashes
You cannot patch a GPU driver, so the goal is to avoid the path that breaks it.
- Find the trigger: the symbolicated engine frames under the driver frames usually name a shader compile, a specific texture format or a Vulkan feature. Remove or replace that feature for the affected devices.
- Switch graphics API for those devices. In Unity, untick Auto Graphics API under Player Settings > Other Settings and order Vulkan and OpenGLES3 deliberately. In Unreal, use device profiles to disable Vulkan for a GPU family. In Godot, the
rendering/renderer/rendering_method.mobileproject setting selects between the Vulkan-based Mobile renderer and Compatibility (OpenGL ES 3.0). - Update the engine. Driver workarounds ship in engine patch releases, and the release notes list the GPU they target.
- As a last resort, exclude a device model in the Play Console device catalog so players do not buy a build that cannot run.
How to confirm the fix
Reproduce on a device from the affected group, not on your newest phone, with a release build and the same graphics API players use. Then ship to a staged rollout and watch the cluster in Android vitals filtered to the new app version: the signature should stop appearing in that version while older versions keep reporting it. For 16 KB issues, test on an emulator image or device with 16 KB pages and confirm with adb shell getconf PAGE_SIZE that it prints 16384.
What Bugnet adds, and what it does not
Bugnet’s SDKs run inside the game, so they do not capture a SIGSEGV as a native stack trace, read tombstones or symbolicate anything; logcat, ndk-stack and Play Console do that. Bugnet supplies the context. The Unity SDK files managed exceptions and errors with recent log lines, which often shows the last thing the game did before the native fault. Every report, automatic or written by a player, carries the OS version, CPU, GPU, RAM and game version, so “it closes on level two” arrives with the GPU you need for driver triage. A process killed by a signal never reports its session end, so these crashes are invisible to the dashboard’s crash-free session rate. To count them, set a “previous run did not exit cleanly” flag at startup, clear it on a normal quit or pause, and log an error at the next launch if it is still set; the SDK files it and groups the repeats. A public known-issue entry can carry the workaround meanwhile.
Related guides
- How to Read an Android Tombstone From a Game Crash (ndk-stack and addr2line)
- How to Fix “Fatal signal 6 (SIGABRT)” Crashes in an Android Game
- How to Symbolicate Native Crashes in a Game
- How to Read Unity Android Crash Logs with Logcat
- How to Fix a Native Crash That Shows No Managed Stack Trace
Frequently asked questions
What does Fatal signal 11 (SIGSEGV) mean on Android?
Native code in the app read, wrote or executed memory it was not allowed to touch, and the kernel sent signal 11 to the process. Android logs the signal code, the fault address and the crashing thread, then writes a tombstone with the backtrace.
What is the difference between SEGV_MAPERR and SEGV_ACCERR?
SEGV_MAPERR (code 1) means the address is not mapped in the process at all, which covers null pointers and freed memory. SEGV_ACCERR (code 2) means the address exists but the access is forbidden, such as writing to read-only memory or running into a stack guard page.
What does fault addr 0x0 mean?
The code dereferenced a null pointer. A small non-zero address such as 0x18 is also a null pointer, with the offset of the field that was accessed added to it. A large address points to a dangling pointer, a bad index or memory corruption.
Why does my Unity game crash in libil2cpp.so with no C# stack trace?
libil2cpp.so is your C# code compiled to native code. When it faults, the system records native frames as offsets into the library. Symbolicate those offsets with the libil2cpp symbols from the same build and each frame resolves to a name that contains the C# class and method.
How do I know if a SIGSEGV is a GPU driver bug?
The top frames are in a driver library under the vendor partition, such as libGLES_mali.so or vulkan.adreno.so, and in Play Console the crash cluster is concentrated on one GPU family or driver version instead of following your overall device mix.
Read the fault address and the library of frame #00 before anything else. Those two values sort a segfault into null pointer, stale pointer, stack overflow or driver bug in under a minute.