bevyengine/bevy · error · RegisteredSystemError

The system is not present in the RegisteredSystem component.

Error message

The system is not present in the RegisteredSystem component. This can happen if the system was called recursively or if the system panicked on the last run.

What it means

Documented cause on the RegisteredSystem lookup failure variant: the system is not present in the RegisteredSystem component because it called itself recursively or panicked during its previous run, leaving the registry entry cleared/inconsistent.

Source

Thrown at crates/bevy_ecs/src/system/system_registry.rs:870

    /// The `RegisteredSystem` component is missing.
    #[error("System {0:?} does not have a RegisteredSystem component. This only happens if app code removed the component.")]
    MissingRegisteredSystemComponent(SystemId<I, O>),
    /// A system tried to remove itself.
    #[error("System {0:?} tried to remove itself")]
    SelfRemove(SystemId<I, O>),
    /// System could not be run due to parameters that failed validation.
    /// This is not considered an error.
    #[error("System did not run due to failed parameter validation: {0}")]
    Skipped(SystemParamValidationError),
    /// System returned an error or failed required parameter validation.
    #[error("System returned error: {0}")]
    Failed(BevyError),
    /// [`SystemId`] had different input and/or output types than [`SystemIdMarker`]
    #[error("Could not get system from `{}`, entity was `SystemId<{}, {}>`", DebugName::type_name::<SystemId<I, O>>(), .1.input_type_id.name, .1.output_type_id.name)]
    IncorrectType(SystemId<I, O>, SystemIdMarker),
    /// System is not present in the `RegisteredSystem` component.
    // TODO: We should consider using catch_unwind to protect against the panic case.
    #[error("The system is not present in the RegisteredSystem component. This can happen if the system was called recursively or if the system panicked on the last run.")]
    SystemMissing(SystemId<I, O>),
}

impl<I: SystemInput, O> From<RunSystemError> for RegisteredSystemError<I, O> {
    fn from(value: RunSystemError) -> Self {
        match value {
            RunSystemError::Skipped(err) => Self::Skipped(err),
            RunSystemError::Failed(err) => Self::Failed(err),
        }
    }
}

impl<I: SystemInput, O> core::fmt::Debug for RegisteredSystemError<I, O> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        match self {
            Self::SystemIdNotRegistered(arg0) => {
                f.debug_tuple("SystemIdNotRegistered").field(arg0).finish()
            }

View on GitHub (pinned to 396ca72708)

Solutions

  1. Avoid recursive runs of the same SystemId from within itself
  2. Fix the panic that aborted the previous run, then re-run or re-register the system
  3. Check the returned error before re-running and re-register if needed
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/bevy_ecs/src/system/system_registry.rs:870 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20). Data as JSON: /api/errors/313365b493d553ca. Report an issue: GitHub.