VM Error Codes
These errors occur at the virtual machine level during program execution:Virtual machine execution completed successfully.
Invalid or corrupted program text/code segment. This indicates the executable format is malformed or the program code cannot be loaded properly.
Illegal instruction encountered during execution. The program attempted to execute an invalid or unsupported instruction. See Instruction Set for supported operations.
Segmentation fault - invalid memory access. The program attempted to access memory outside its allocated segments or violated memory protection rules. See Memory Layout for segment boundaries.
General memory fault. A memory operation failed due to invalid addressing or protection violations.
Compute units (CU) exhausted during execution. The program exceeded its allocated computational resources. See Compute Units for resource limits.
Storage units (SU) exhausted during execution. The program exceeded its allocated memory/storage resources. See Memory Units for resource limits.
VM Fault Types
Program execution was explicitly reverted. The program called the exit syscall with a revert instruction.
Compute unit exhaustion fault. Execution halted due to CU limit being reached.
Storage unit exhaustion fault. Execution halted due to SU limit being reached.
Syscall Errors
These errors can occur during syscall execution and are returned by system calls to indicate specific failure conditions:Success Codes
Syscall completed successfully.
Syscall completed successfully and program should exit normally.
Account and Segment Errors
The segment table size is invalid or corrupted. This may occur when memory layout is incorrectly configured.
The provided account index is out of bounds or invalid. Account indices must be within the transaction’s account list range.
The referenced account does not exist in the ledger state. See account_create syscall to create new accounts.
Attempted to modify an account that is not marked as writable in the transaction. The account must be included in the read-write account list. See set_account_data_writable syscall.
Attempted to create an account that already exists. Use account_create syscall only for new accounts.
The provided account address is malformed or invalid format.
Attempted a program-specific operation on an account that is not executable/program account.
Attempted to perform an operation that requires an empty account, but the account contains data. See account_delete syscall to clear account data.
The account reference or structure is invalid or corrupted.
The specified account data size is invalid or exceeds limits. See account_resize syscall for resizing constraints.
Balance and Transfer Errors
A balance operation would result in integer overflow. This prevents balance corruption.
Insufficient account balance for the requested transfer operation. See account_transfer syscall.
Memory and Segment Errors
The account size exceeds maximum allowed limits for account data.
Attempted to map a memory segment that is already mapped or in use.
The provided segment ID is invalid or out of range. See Memory Layout for valid segment types.
The requested segment size is invalid, zero, or exceeds limits. See set_anonymous_segment_sz syscall.
Insufficient memory pages available for the requested allocation.
Attempted to free a memory page that cannot be freed (e.g., system pages).
The provided memory address is invalid, out of bounds, or improperly aligned.
The provided offset is invalid or out of bounds for the target operation.
Object and Reference Errors
The object reference type is invalid or not supported for the requested operation.
Attempted to modify an object that is not writable or is read-only.
System and Execution Errors
Invalid parameters provided to the syscall. Check parameter types, ranges, and requirements.
Maximum call depth exceeded. Prevents infinite recursion in invoke syscall chains.
Explicit revert requested. The program called exit syscall with revert flag.
Compute units exhausted during syscall execution. See Compute Units.
Invalid flags provided to the syscall. See individual syscall documentation for valid flag values.
The provided signature is invalid or verification failed. This occurs when creating an EOA account with an invalid Ed25519 signature. See account_create_eoa syscall for signature requirements.
State and Proof Errors
The provided state proof is invalid, corrupted, or does not match the current state.
The proof length is invalid or does not match expected size requirements.
The slot reference in the state proof is invalid or outdated.
Logging and Event Errors
The log data size exceeds maximum allowed length. See log syscall for size limits.
The event data size exceeds maximum allowed length. See emit_event syscall for size limits.
Compression and Special Account Errors
The account is in compression timeout and cannot be accessed. Wait for timeout period to expire.
The seed length for account derivation is invalid. Seeds must meet specific length requirements.
The transaction contains compressed accounts that cannot be processed in this context.
An ephemeral account attempted to create a persistent account, which is not allowed. Ephemeral accounts can only create other ephemeral accounts. See account_create_ephemeral syscall.
Error Handling
VM errors typically occur during program execution and may indicate issues with program logic, resource management, or invalid operations. Check the program implementation and ensure proper error handling for syscall operations.
Virtual machine-level errors (fault codes and syscall errors) typically occur during program execution and may indicate issues with program logic, resource management, or invalid operations. Check the program implementation and ensure proper error handling for syscall operations.
For runtime-level errors that occur outside of VM execution, see Runtime Errors.