Quick answer: Fatal signal 6 (SIGABRT) means the process called abort() on itself: a library detected something it refused to continue past. The reason is almost always printed as Abort message: in the crash dump, a few lines below the signal. Read that message first. It tells you whether the cause is an uncaught C++ exception, a failed assert, a FORTIFY check, heap corruption caught by the allocator, or a JNI error, and each of those has a different fix.
A segfault is an accident. An abort is a decision: some code in your process looked at its own state, concluded it could not go on safely, and killed the game deliberately. That makes SIGABRT one of the easier native crashes to work with, because the code that pulled the trigger usually left a sentence explaining why. The work is finding that sentence, skipping the frames that belong to the abort machinery, and landing on the frame that is yours. This guide covers the message families a game runs into on Android, with Unity, Unreal, Godot and plain NDK notes for each.
- The exact error
- Find the abort message and the frame that matters
- What each abort message means
- Fix an uncaught C++ exception
- Fix a failed assert or engine fatal error
- Fix a FORTIFY detection or a destroyed mutex
- Fix heap corruption reported by the allocator
- Fix JNI errors
- Aborts with no message
- How to confirm the fix
- Where Bugnet fits
- Related guides
- Frequently asked questions
The exact error
On current Android versions the crash looks like this in logcat (example values, made-up package name, backtrace trimmed to three of its frames):
11-20 21:14:03.412 12300 12345 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12345 (UnityMain), pid 12300 (m.studio.mygame)
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 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-20 21:14:03.655 12790 12790 F DEBUG : Abort message: 'terminating due to uncaught exception of type std::out_of_range: vector'
11-20 21:14:03.655 12790 12790 F DEBUG : backtrace:
11-20 21:14:03.655 12790 12790 F DEBUG : #00 pc 000000000005e1ac /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 9c1f0a3e5b7d2c4e6f8091a2b3c4d5e6)
11-20 21:14:03.655 12790 12790 F DEBUG : #01 pc 00000000000a3f58 /data/app/~~Qf3xT1==/com.studio.mygame-9aBc==/lib/arm64/libc++_shared.so (BuildId: 4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f70)
11-20 21:14:03.655 12790 12790 F DEBUG : #04 pc 0000000000412c90 /data/app/~~Qf3xT1==/com.studio.mygame-9aBc==/lib/arm64/libgame.so (BuildId: 0a1b2c3d4e5f60718293a4b5c6d7e8f901234567)
Older Android versions report the same thing with a different code:
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Both codes mean the signal was sent by the process to itself, and fault addr -------- means there is no faulting address to read: nothing dereferenced a bad pointer. If a crash tool prints the code as an unsigned hex number, 0xfffffffa is -6 (SI_TKILL) and 0xffffffff is -1 (SI_QUEUE). Neither value carries more information than “this was an abort”.
Find the abort message and the frame that matters
Get the whole crash block right after it happens:
adb logcat -b crash -d > crash.txt
Search it for Abort message:. The same line is in the full tombstone, and the tombstone guide covers how to get that file off a device. Then read upward in the normal log too (adb logcat -d): engines print their own fatal error under their own tag (Unity, UE, godot) just before the signal, and that text is often more specific than the abort message.
In the backtrace, the top frames are never the culprit. Skip abort, raise, tgkill and anything else in libc.so, then skip the reporter that called it: __fortify_fatal, __assert2, __stack_chk_fail, std::terminate and __cxa_throw in the C++ runtime, Scudo’s error functions, art::Runtime::Abort. The first frame after those, in your library or the engine’s, is where to look. It will be a bare offset until you symbolicate it with ndk-stack.
What each abort message means
| Abort message starts with | Who aborted | Cause |
|---|---|---|
terminating due to uncaught exception of type (older NDKs: terminating with uncaught exception of type) | The C++ runtime | A C++ exception nobody caught |
file.cpp:123: function: assertion "x" failed | assert() | A failed assertion in a native library |
FORTIFY: | The C library | A libc call that would have overrun a buffer, or a misuse it can detect |
stack corruption detected (-fstack-protector) | The compiler’s stack check | A write past the end of a local array |
Scudo ERROR: | The heap allocator | Heap corruption, double free, bad pointer passed to free |
JNI DETECTED ERROR IN APPLICATION: | The Android runtime | A JNI rule was broken |
Pure virtual function called! | The C++ runtime | A virtual call on an object being constructed or already destroyed |
| No message | The engine, a driver or a plugin calling abort() directly | Read the log lines above the signal and the backtrace |
In rough order of how often games hit them: uncaught exceptions and engine fatal errors first, JNI errors in any project with Java-side SDKs, then allocator and FORTIFY detections, which are rarer and more serious because they mean memory was already damaged.
Fix an uncaught C++ exception
The message names the type and, for standard exceptions, the what() text. The usual sources in a game:
std::bad_alloc: an allocation failed. Either the request was absurd (a size read from a corrupt file) or the process ran out of address space or memory. Treat it as a memory problem; crashes on low-memory Android devices covers that side.std::out_of_range,std::invalid_argument,std::length_error:vector::at,std::stoi,string::substrfed data from a save file, a config download or user input.- An exception crossing a boundary that cannot carry it: out of a thread’s entry function, out of a
noexceptfunction or a destructor, through C code, or across JNI into Java. Unreal compiles most modules with exceptions disabled, so a third-party library that throws into engine code ends here too.
Catch at every boundary and turn the exception into an error the caller can handle:
extern "C" JNIEXPORT void JNICALL
Java_com_studio_mygame_Native_loadSave(JNIEnv* env, jclass, jstring path) {
try {
LoadSave(ToStdString(env, path));
} catch (const std::exception& e) {
env->ThrowNew(env->FindClass("java/lang/RuntimeException"), e.what());
}
}
Do the same at the top of every thread function you start. Then fix the real bug: validate sizes and indices that come from outside before using them.
Fix a failed assert or engine fatal error
An assertion message gives you file, line, function and the expression, so there is nothing to decode. If it is in a third-party library, the expression usually describes an API contract you broke: a call before init, a null argument, a call from the wrong thread. Release builds of well-behaved libraries define NDEBUG and compile assert() out, so seeing one in production suggests a debug build of a plugin slipped into your release.
Engine notes: Unreal logs Assertion failed: with the expression, file and line when a check() fails, before the process dies, so search the log for that text. Godot’s fatal checks print a line starting FATAL: and then execute a trap instruction, so in Godot an engine-detected fatal error may arrive as a trap signal instead of SIGABRT; the message in the log is the part to read either way. In Unity, look at the last Unity-tagged lines before the signal.
Fix a FORTIFY detection or a destroyed mutex
FORTIFY is the C library checking calls whose buffer size the compiler knew:
Abort message: 'FORTIFY: memcpy: prevented 4096-byte write into 16-byte buffer'
Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x7b3c0a8f20)'
Very old Android releases print the first kind without sizes (prevented write past end of buffer). For buffer messages, the frame just above __fortify_fatal is a checked variant such as __memcpy_chk, and the frame above that is your bug: a fixed-size array receiving a length that came from data. The two numbers in the message tell you which buffer it was. Clamp the length or size the buffer from it.
The destroyed-mutex message fires in apps that target API level 28 or higher, and in games it nearly always happens at quit. One thread calls exit(), which runs the destructors of global objects, while a worker thread is still running and locks a global std::mutex that has just been destroyed. Two fixes work: stop and join your worker threads before the process exits, or make the shared object outlive everything by allocating it once and never destroying it:
// Broken: destroyed during exit() while the audio thread still uses it.
static std::mutex g_queueLock;
// Fixed: intentionally leaked, so it is valid for the life of the process.
static std::mutex& QueueLock() {
static auto* lock = new std::mutex;
return *lock;
}
Fix heap corruption reported by the allocator
Since Android 11, Scudo is the allocator for native code on all but low-memory devices, and it aborts when a heap block fails its checks:
Abort message: 'Scudo ERROR: corrupted chunk header at address 0x7c5d1e8a40'
Abort message: 'Scudo ERROR: invalid chunk state when deallocating address 0x7c5d1e8a40'
invalid chunk state on deallocation is typically a double free. corrupted chunk header means the bytes just before the block were overwritten, or the pointer handed to free was never a heap block. misaligned pointer and allocation type mismatch point at freeing an interior pointer or mixing malloc with delete.
The backtrace shows the free or malloc that noticed the damage, which can be far from the code that did it. To catch the writer, ship a test build with android:gwpAsanMode="always" on the application element of the manifest: GWP-ASan samples allocations and reports use after free and overflows with the allocating and freeing stacks. In game code the usual suspects are a native handle disposed twice, a buffer freed by a different library than the one that allocated it, and index math on mesh or audio buffers. The same bug on a device without Scudo tends to appear as a SIGSEGV inside the allocator instead.
Fix JNI errors
The runtime aborts with a message that states the rule you broke:
Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.NoSuchMethodError: no non-static method "Lcom/studio/mygame/Bridge;.onScore(I)V"'
Abort message: 'JNI DETECTED ERROR IN APPLICATION: use of deleted local reference 0x71'
Abort message: 'JNI ERROR (app bug): global reference table overflow (max=51200)'
- Called with pending exception: a lookup such as
GetMethodIDfailed and left a Java exception pending, and the code made another JNI call anyway. Often the method was renamed or removed by code shrinking; see crashes from R8 stripping. - Deleted or invalid reference: a local reference was kept past the native call that received it, or used on another thread. Convert it with
NewGlobalRefif it must live longer. - Reference table overflow: global references are leaking, for example Unity
AndroidJavaObjectinstances created every frame and never disposed. On Android 7 and older, local references in a long loop overflow a much smaller table. - Making JNI calls without being attached: a native thread used JNI before calling
AttachCurrentThread, or reused another thread’sJNIEnv.
JNIEnv* env = nullptr;
bool attached = false;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) == JNI_EDETACHED) {
vm->AttachCurrentThread(&env, nullptr);
attached = true;
}
jmethodID mid = env->GetMethodID(bridgeClass, "onScore", "(I)V");
if (mid == nullptr) {
env->ExceptionClear(); // NoSuchMethodError was pending
} else {
env->CallVoidMethod(bridge, mid, score);
if (env->ExceptionCheck()) { env->ExceptionDescribe(); env->ExceptionClear(); }
}
if (attached) vm->DetachCurrentThread();
Many of these checks only run when CheckJNI is on, which is the default on emulators and for debuggable builds. Turn it on for a release build on a test device with adb shell setprop debug.checkjni 1 and relaunch the game; a bug that was a random segfault becomes an abort with a sentence attached. In Unity, wrap AndroidJavaObject and AndroidJavaClass in using blocks, and call AndroidJNI.AttachCurrentThread() before touching Java from a thread you created.
Aborts with no message
When there is no Abort message: line, something called abort() directly. Look at which library holds the first frame after libc. A GPU driver library (libGLES_mali.so, vulkan.adreno.so) means the driver hit an internal assert: handle it like any driver crash, by grouping on GPU model in Play Console and avoiding the feature that triggers it. A plugin’s library means that SDK gave up; its own log lines just above the signal usually say why. Your own library means a call to abort() or a failed release-mode check in your code, and the symbolicated frame names it.
How to confirm the fix
Reproduce the abort on a device first, with the exact message in hand, then confirm the same steps no longer produce it in a release build. For JNI and heap fixes, run the test pass once more with CheckJNI on and with GWP-ASan set to always, since a fix that only moved the corruption will show up there. After release, filter Android vitals > Crashes and ANRs in Play Console to the new app version and check that the cluster with abort on top and your function beneath it has stopped collecting reports.
Where Bugnet fits
Bugnet does not capture native crashes as stack traces, does not read tombstones and does not symbolicate, so it will not hand you the abort message of a process that died in libc. It covers the part the game can still observe. The Unreal SDK hooks the engine’s fatal error delegate, so failed asserts and fatal errors are filed with the engine’s error message and recent log lines. The Unity SDK files logged exceptions, errors and asserts the same way, which often includes the Java or plugin error that preceded the abort. Player-written reports arrive with OS version, CPU, GPU, RAM and game version attached. Once you have symbolicated a crash, attach the ndk-stack output to the report as a text file so the evidence stays with the bug; the bug reports docs describe attachments.
Related guides
- How to Fix “Fatal signal 11 (SIGSEGV)” Crashes in an Android Game
- How to Read an Android Tombstone From a Game Crash (ndk-stack and addr2line)
- How to Symbolicate Native Crashes in a Game
- How to Fix a Crash from R8 / ProGuard Stripping on Android
- What Is a Native Crash vs a Managed Crash?
Frequently asked questions
What does Fatal signal 6 (SIGABRT) mean on Android?
The process called abort on itself. A library, the C++ runtime, the allocator or the Android runtime detected a condition it would not continue past and ended the process deliberately. The reason is normally printed as an Abort message line in the crash dump.
Where is the abort message for a SIGABRT crash?
In logcat, a few lines below the Fatal signal 6 line, in the block tagged DEBUG, as a line starting with Abort message. Run adb logcat -b crash -d to dump that block. The same line appears near the top of the tombstone file.
What do code -6 (SI_TKILL) and code -1 (SI_QUEUE) mean?
Both say the signal was sent by the process to one of its own threads, which is how abort works. Older Android versions report SI_TKILL and newer ones SI_QUEUE. A tool that prints the code as unsigned hex shows 0xfffffffa for -6.
Why does my game abort with pthread_mutex_lock called on a destroyed mutex when quitting?
One thread called exit, which destroyed global objects, while another thread was still running and locked a global mutex that no longer exists. Join worker threads before exiting, or allocate shared mutexes once and never destroy them.
What causes JNI DETECTED ERROR IN APPLICATION?
Native code broke a JNI rule and the Android runtime aborted: calling JNI with a Java exception pending, using a deleted or invalid reference, using JNI from a thread that is not attached, or leaking references until the table overflows.
With SIGABRT the answer is usually written down for you. Find the Abort message line before you open a single stack frame.