Quick answer: EXC_BAD_ACCESS means your game read, wrote or jumped to memory it has no right to use. The crash report’s header says how: KERN_INVALID_ADDRESS near zero is a null pointer, any other address is usually a freed object or corruption, and KERN_PROTECTION_FAILURE inside a STACK GUARD region is a stack overflow. Symbolicate the crashed thread with the dSYM from that build, see which binary the top frames belong to, and reproduce with Address Sanitizer or Zombie Objects.
Every iOS crash report for a memory fault opens with the same few lines, and most people scroll straight past them to the stack. Those lines are where the diagnosis starts: the exception subtype and address tell you what kind of pointer went bad, the VM Region Info line tells you what the address was near, and the Triggered by Thread line tells you which stack to read. This guide goes through that header, then the patterns in the crashed thread, the causes that show up in Unity, Unreal, Godot and custom engines, and the Xcode tools that turn a one-in-fifty crash into a reproducible one.
- The exact error
- Reading the header fields
- Reading the address
- Reading the crashed thread
- What causes it in games
- Symbolicate the crashed thread
- Catch it at the source with Xcode’s tools
- Fixes in Unity
- Fixes in Unreal, Godot and custom engines
- How to confirm the fix
- What Bugnet can and cannot tell you
- Related guides
- Frequently asked questions
The exact error
An example report (a .ips file shown as text, with invented values and a made-up bundle ID), trimmed to the fields that matter:
Hardware Model: iPhone12,1
Process: MyGame [1052]
Identifier: com.studio.mygame
Version: 1.4.2 (87)
Code Type: ARM-64 (Native)
Role: Foreground
OS Version: iPhone OS 17.5.1 (21F90)
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Codes: 0x0000000000000001, 0x0000000000000018
VM Region Info: 0x18 is not in any region. Bytes before following region: 4366499816
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 104438000-10443c000 [ 16K] r-x/r-x SM=COW ...ame.app/MyGame
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [1052]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 UnityFramework 0x0000000106a3c5d4 0x105f20000 + 11650516
1 UnityFramework 0x0000000106a3b1a8 0x105f20000 + 11645352
2 UnityFramework 0x000000010712e0c0 0x105f20000 + 18931904
Variants of the first two lines:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016c070a30
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00006f126c1a9aa0 -> 0x000000126c1a9aa0 (possible pointer authentication failure)
In Xcode’s debugger the same fault stops the app with Thread 1: EXC_BAD_ACCESS (code=1, address=0x18). It is a native fault, so there is no C# or GDScript exception to catch and no managed stack trace.
Reading the header fields
| Field | What it tells you |
|---|---|
Exception Type | The Mach exception and the matching signal. SIGSEGV and SIGBUS are both bad memory accesses; Apple describes SIGBUS as more often a misaligned or invalid address, or a pointer authentication failure. Treat them the same way. |
KERN_INVALID_ADDRESS | The address is not mapped in the process. Null pointers, freed and unmapped memory, garbage pointers. |
KERN_PROTECTION_FAILURE | The address is valid but protected: read-only memory, non-executable memory, or a stack guard. |
KERN_MEMORY_ERROR | The memory could not supply data at that moment, for example a memory-mapped file that became unavailable. |
VM Region Info | Where the address sits relative to the process’s mapped regions. The arrow marks the region that contains it, or the gap it fell into. |
Triggered by Thread | The thread that faulted. Read that thread’s backtrace, marked Crashed. |
Version, OS Version, Hardware Model | Which build, iOS release and device. You need the build to pick the dSYM. |
Reading the address
0x0to roughly0xfff: a null pointer. A non-zero value is the offset of the field or array element that was accessed through it, which helps identify the type involved once you know the function.- Inside a region labelled
STACK GUARD, withKERN_PROTECTION_FAILURE: a stack overflow. The guard is a no-access region placed at the end of each thread’s stack, and running into it means the thread used all of its stack. - The address equals the
pcregister: the code jumped to a bad address through a function pointer, a block, or the vtable of a destroyed C++ object. Frame 0 will be???. Thelrregister holds the return address, which you can symbolicate to find the caller. - A plausible-looking heap address: a pointer to memory that was freed or never valid. This is the use-after-free pattern, and the address changes from crash to crash.
- High bits set, or the pointer authentication text: on the
arm64earchitecture a signed pointer failed its check. Apple notes that plain memory corruption with stray high bits looks the same, so treat it as a corrupted pointer. - A repeated byte pattern such as
0x5555555555555555: with Malloc Scribble enabled, freed memory is filled with0x55, so a pointer loaded from a freed block looks like this.
Reading the crashed thread
Each frame names the binary it is in. That name sorts the crash before you symbolicate anything:
UnityFramework: in a Unity game this one binary holds the engine, your IL2CPP-compiled C# and statically linked plugins. Symbolicated names tell them apart: a name likePlayerController_Update_m3A1F...is your C#.- Your app’s own binary: Unreal and Godot link the engine into the executable, so engine and game frames both appear under the app’s name.
- A binary whose name starts with
AGXMetal, orMetal: the GPU driver and Metal. The crash is inside rendering; look further down for the engine frame that issued the call. libobjc.A.dylibwithobjc_msgSend,objc_retainorobjc_releaseon top: Apple’s guidance is direct here: this is a message sent to a deallocated Objective-C object. In a game that means native bridge code: an ad, analytics or store plugin, or your own.mmfiles.libsystem_platform.dyliborlibsystem_c.dylib(_platform_memmove,strlen): a system routine handed a bad pointer or length. The caller beneath it is the bug.
The backtrace shows the code that touched the bad memory. With corruption, that is the victim, and the code that damaged the memory ran earlier, possibly on another thread.
What causes it in games
- A native object used after it was destroyed. A delegate or callback from an SDK firing after the bridge object was released; an Unreal
UObjectkept in a raw pointer and collected; a GDExtension holding a pointer to a freed node; a C++ object deleted while a lambda still captures it. - Engine or graphics objects touched from the wrong thread. A completion handler from a network or store API arrives on a background queue and calls straight into engine code that assumes the main thread.
- Null or out-of-range access in code without checks. C++ gameplay code,
unsafeC#, Burst jobs,NativeArrayindexing in player builds, or IL2CPP code where null checks and bounds checks were disabled withIl2CppSetOption. - Stack overflow on a secondary thread. Apple’s threading guide gives the defaults as 1 MB for the main thread and 512 KB for secondary threads. Recursion that survives on the main thread, or on a desktop, overflows on a job or audio thread.
- Metal resource lifetime in a custom renderer. Writing past the end of a buffer’s
contentspointer, or releasing a texture that a command buffer created with unretained references still uses. The crash lands in driver frames a moment later. - A plugin signature mismatch. A
[DllImport("__Internal")]declaration whose parameter types or struct layout differ from the C function. - Fallout from memory pressure. An allocation returns null and the result is used unchecked, or cache-purging code run on a memory warning frees something another thread is reading. If the app vanishes with no crash report at all, that is the system killing it for memory, covered in jetsam terminations.
Symbolicate the crashed thread
Crashes from TestFlight and the App Store appear symbolicated in Xcode under Window > Organizer > Crashes when Xcode can find the dSYM for that build. For a report a player sent you, do it by hand with atos. Take the load address of the binary (the second number in an unsymbolicated frame, also the start of its line under Binary Images) and the frame address:
atos -arch arm64 -o UnityFramework.framework.dSYM/Contents/Resources/DWARF/UnityFramework -l 0x105f20000 0x0000000106a3c5d4
The output is a function, the binary and a source location, for example PlayerController_Update_m3A1F... (in UnityFramework) (Assembly-CSharp.cpp:20431). The dSYM must be the one produced with the shipped build. Compare dwarfdump --uuid UnityFramework.framework.dSYM with the UUID in angle brackets on the binary’s Binary Images line; if they differ, the names will be wrong. Symbolicating an iOS crash with a dSYM covers finding the right archive, reading .ips files explains the file format, and getting crash logs from a player’s iPhone covers collecting the report in the first place.
Catch it at the source with Xcode’s tools
A symbolicated stack tells you where the game fell over. For use after free and corruption you need the tool that stops at the first bad access. All of these are in Product > Scheme > Edit Scheme, under the Run action’s Diagnostics section:
- Address Sanitizer. Reports use after free, heap and stack overflows at the faulting line, with the stacks that allocated and freed the block. It instruments the code Xcode compiles: your plugins and, in a Unity project, the generated IL2CPP sources. Prebuilt engine libraries are not instrumented. Expect a slower game and more memory use.
- Zombie Objects. Keeps deallocated Objective-C objects around so a message to one is reported with its class name. Use it when
objc_msgSendorobjc_releaseis on top. - Malloc Scribble. Fills freed memory with a recognisable pattern so stale reads fail quickly and visibly.
- API Validation, under Metal. Checks for incorrect Metal calls when creating resources and encoding commands. In Unity, the Player setting named Metal API Validation is the editor’s own shader check; Apple’s validation is enabled by setting Run in Xcode as to Debug in Build Profiles, or in the scheme as above.
- Thread Sanitizer finds data races. Check that it is offered for your run destination, and note it cannot be combined with Address Sanitizer in one run.
For the hardest cases Apple also points to the malloc debugging features such as Guard Malloc.
Fixes in Unity
- Check Script Call Optimization. Under Player Settings > Other Settings, the options are Slow and Safe and Fast but no Exceptions. With IL2CPP, Unity’s own notes say the fast option changes one thing: an unhandled managed exception crashes the app instead of being logged. Switch to Slow and Safe. If the crash turns into a logged
NullReferenceException, the bug is ordinary C#. - Re-enable IL2CPP checks. Search the project and its packages for
Il2CppSetOption. WithOption.NullChecksorOption.ArrayBoundsChecksset to false, a null reference or a bad index becomes a raw memory access. - Marshal native callbacks to the main thread. Capture
SynchronizationContext.Currenton the main thread at startup andPostto it from plugin callbacks before touching any Unity object. - Order teardown. Unregister callbacks and stop jobs before disposing native containers and plugin handles, then null the handle.
// Broken: the store plugin calls back on its own queue.
void OnPurchaseFinished(string json) { coinsLabel.text = Parse(json).coins.ToString(); }
// Fixed: hop to the main thread, and check the object still exists.
void OnPurchaseFinished(string json)
{
mainThread.Post(_ =>
{
if (this == null) return;
coinsLabel.text = Parse(json).coins.ToString();
}, null);
}
Fixes in Unreal, Godot and custom engines
Unreal. Mark every stored UObject pointer with UPROPERTY() or hold it in a TWeakObjectPtr and test IsValid() before use. Route results from tasks and platform callbacks back through AsyncTask(ENamedThreads::GameThread, ...). To get usable reports at all, enable Generate dSYM file for code debugging and profiling in the iOS project settings and archive the dSYM with each build; crash reporting for Unreal on iOS has the details.
Godot. Guard stored references with is_instance_valid(), especially in callbacks from iOS plugins and in deferred calls after a scene change. For crashes inside the engine itself, Godot crashes on iOS lists the known patterns. Engine frames only resolve to names if the export template you linked kept its symbols.
Custom C++. Give deep recursion an explicit stack, or create that thread with a larger stack size through pthread_attr_setstacksize. Keep Metal resources alive until the command buffer that uses them completes, and bound every copy into a buffer’s contents by the buffer’s length. Null a pointer when you free what it points to, so the next misuse is a clean null dereference instead of silent corruption.
How to confirm the fix
Run the reproduction on a real device with Address Sanitizer on and confirm it completes with no report, then again in a release build without the debugger. Test on the oldest device you support, since timing-dependent lifetime bugs show up there first. After release, watch the crash’s signature in Xcode’s Organizer filtered to the new version. Memory faults that depend on timing rarely drop to zero on the first attempt, so compare counts per version instead of waiting for silence.
What Bugnet can and cannot tell you
Bugnet does not capture native crashes as stack traces, does not ingest .ips files and does not symbolicate, so an EXC_BAD_ACCESS will never arrive in the dashboard as a ready-made stack. Xcode’s Organizer and the dSYM do that job. What the Unity SDK does capture on iOS is everything that reaches the Unity log as an exception, error or assert, with recent log lines, and those lines are often the trail leading up to the native fault: the plugin error, the failed load, the callback that fired late. Reports written by players through the in-game form carry the device’s OS version, CPU, GPU, RAM and the game version, which tells you which dSYM to reach for. For a crash you cannot fix this week, a public known-issue entry gives affected players the workaround.
Related guides
- How to Fix 0x8badf00d Watchdog Terminations in an iOS Game
- How to Fix iOS Jetsam (Out of Memory) Terminations in Your Game
- How to Symbolicate an iOS Game Crash with dSYM
- Where macOS Stores Crash Reports for Your Game (.ips Files) and How to Read Them
- How to Get Crash Logs From a Player’s iPhone or Android Phone
Frequently asked questions
What does EXC_BAD_ACCESS (SIGSEGV) mean in an iOS crash report?
The process tried to read, write or execute memory at an address it is not allowed to use, and the system terminated it. The Exception Subtype line gives the kind of failure and the address, and the crashed thread’s backtrace shows the code that made the access.
What is the difference between KERN_INVALID_ADDRESS and KERN_PROTECTION_FAILURE?
KERN_INVALID_ADDRESS means the address is not mapped in the process at all, as with a null pointer or freed memory. KERN_PROTECTION_FAILURE means the address is mapped but protected, such as read-only memory or the guard region at the end of a thread stack.
Why is objc_msgSend at the top of my crash?
The Objective-C runtime tried to send a message to an object that had already been deallocated. In a game this usually comes from native plugin or bridge code. Enable Zombie Objects in the Xcode scheme to see which class the dead object was.
How do I symbolicate an EXC_BAD_ACCESS crash from a Unity game?
Use the dSYM for UnityFramework from the same build. Run atos with -arch arm64, the dSYM’s DWARF file, the binary’s load address after -l, and the frame address. Frames from your C# resolve to IL2CPP names that include the class and method.
Can a stack overflow cause EXC_BAD_ACCESS on iOS?
Yes. It appears as KERN_PROTECTION_FAILURE with VM Region Info pointing at a STACK GUARD region. Secondary threads default to a 512 KB stack, half the main thread’s 1 MB, so deep recursion on a worker thread overflows first.
Do not skip the header. The exception subtype, the address and the VM Region Info line tell you which kind of bad pointer you are hunting before you read a single frame.