---
title: EXC_GUARD
framework: xcode
role: article
role_heading: Article
path: xcode/exc_guard
---

# EXC_GUARD

The process violated a guarded resource protection, often related to file descriptors.

## Overview

Overview There are multiple types of guarded system resources, however most guarded resource crashes are from guarded file descriptors, which have the GUARD_TYPE_FD value in the Exception Subtype field. The operating system marks a file descriptor as guarded so that normal file descriptor APIs can’t modify them. For example, if an app closes the file descriptor used to access the SQLite file backing a Core Data store, Core Data could mysteriously crash much later on. The guard file description identifies these problems when they happen, making them easier to identify and address. The Exception Message field contains the specific violation: The Exception Message field also identifies the specific guarded file descriptor that the process attempted to modify. To understand the context triggering this exception, consult the backtrace of the crashed thread.

## See Also

### Exceptions

- [EXC_ARITHMETIC](xcode/exc_arithmetic.md)
- [EXC_BAD_ACCESS](xcode/exc_bad_access.md)
- [EXC_BAD_ACCESS (SIGBUS)](xcode/sigbus.md)
- [EXC_BAD_ACCESS (SIGSEGV)](xcode/sigsegv.md)
- [EXC_BREAKPOINT (SIGTRAP) and EXC_BAD_INSTRUCTION (SIGILL)](xcode/sigtrap_sigill.md)
- [EXC_CRASH](xcode/exc_crash.md)
- [EXC_CRASH (SIGABRT)](xcode/sigabrt.md)
- [EXC_CRASH (SIGKILL)](xcode/sigkill.md)
- [EXC_CRASH (SIGQUIT)](xcode/sigquit.md)
- [EXC_CRASH (SIGSYS)](xcode/sigsys.md)
- [EXC_CRASH (SIGTERM)](xcode/sigterm.md)
- [EXC_RESOURCE](xcode/exc_resource.md)
