---
title: AccessViolation
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/diagnostics/forcedcrashcategory/accessviolation
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/diagnostics/forcedcrashcategory/accessviolation.md
last_updated: 2026-10-07
generated_at: 2026-11-11T14:53:10.911Z
locale: en-us
---

# AccessViolation

> Cause a crash by performing an invalid memory access. The invalid memory access is performed on each platform as follows:

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine.Diagnostics](/engine/7000.0/script-reference/unityengine/diagnostics.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
AccessViolation = 0
```

### Remarks

**OSX, Android**: Invoked using **raise(SIGSEGV)**;

**Windows, Windows Store**: Invoked using **RaiseException** with EXCEPTION\_ACCESS\_VIOLATION

**Other**: Invoked using **int\* p = NULL; \*p = 5;**
