{"record":{"id":"313365b493d553ca","repo":"bevyengine/bevy","slug":"the-system-is-not-present-in-the-registeredsystem","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"RegisteredSystemError","httpStatus":null,"severity":"error","filePath":"crates/bevy_ecs/src/system/system_registry.rs","lineNumber":870,"sourceCode":"    /// The `RegisteredSystem` component is missing.\n    #[error(\"System {0:?} does not have a RegisteredSystem component. This only happens if app code removed the component.\")]\n    MissingRegisteredSystemComponent(SystemId<I, O>),\n    /// A system tried to remove itself.\n    #[error(\"System {0:?} tried to remove itself\")]\n    SelfRemove(SystemId<I, O>),\n    /// System could not be run due to parameters that failed validation.\n    /// This is not considered an error.\n    #[error(\"System did not run due to failed parameter validation: {0}\")]\n    Skipped(SystemParamValidationError),\n    /// System returned an error or failed required parameter validation.\n    #[error(\"System returned error: {0}\")]\n    Failed(BevyError),\n    /// [`SystemId`] had different input and/or output types than [`SystemIdMarker`]\n    #[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)]\n    IncorrectType(SystemId<I, O>, SystemIdMarker),\n    /// System is not present in the `RegisteredSystem` component.\n    // TODO: We should consider using catch_unwind to protect against the panic case.\n    #[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.\")]\n    SystemMissing(SystemId<I, O>),\n}\n\nimpl<I: SystemInput, O> From<RunSystemError> for RegisteredSystemError<I, O> {\n    fn from(value: RunSystemError) -> Self {\n        match value {\n            RunSystemError::Skipped(err) => Self::Skipped(err),\n            RunSystemError::Failed(err) => Self::Failed(err),\n        }\n    }\n}\n\nimpl<I: SystemInput, O> core::fmt::Debug for RegisteredSystemError<I, O> {\n    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n        match self {\n            Self::SystemIdNotRegistered(arg0) => {\n                f.debug_tuple(\"SystemIdNotRegistered\").field(arg0).finish()\n            }","sourceCodeStart":852,"sourceCodeEnd":888,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_ecs/src/system/system_registry.rs#L852-L888","documentation":"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.","triggerScenarios":"Thrown at crates/bevy_ecs/src/system/system_registry.rs:870 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Avoid recursive runs of the same SystemId from within itself","Fix the panic that aborted the previous run, then re-run or re-register the system","Check the returned error before re-running and re-register if needed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}