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 onNone, 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 violationfrom 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.