Instruction errors (runtime)

ProgramFailedToComplete

Appears as Program failed to complete

Instruction

ProgramFailedToComplete

“Program failed to complete”

The program crashed (panic, memory access violation, stack overflow) or hit a fatal runtime error, instead of returning an error code.

Common causes

  • A Rust panic!, unwrap on None, out-of-bounds index or arithmetic overflow in debug mode.
  • Stack frame larger than 4 KiB (large structs on the stack) or heap exhaustion (default 32 KiB).
  • access violation from reading beyond an account's data.

How to fix it

  • Read the Program log: lines just before the failure; panics print the source file and line.
  • Box large structs, use zero-copy accounts, or request more heap with setComputeUnitLimit/requestHeapFrame.

Decode another error

Try: