Transaction
AccessViolation
“Program failed to complete: Access violation in … at address … of size …”
The program read or wrote memory outside its allowed regions. Most often a stack overflow from large stack frames.
Common causes
- Local variables larger than the 4 KiB stack frame (big arrays or structs).
- Reading past the end of account data with unchecked slicing.
How to fix it
- Box large values or use
#[account(zero_copy)]. - Bounds-check slices on account data.