{"record":{"id":"6eb71521d4f74576","repo":"bevyengine/bevy","slug":"not-available-until-all-configured-schedules-have","errorCode":null,"errorMessage":"not available until all configured schedules have been run; try again next frame","messagePattern":"not available until all configured schedules have been run; try again next frame","errorType":"exception","errorClass":"NotReady","httpStatus":null,"severity":"warning","filePath":"crates/bevy_ecs/src/schedule/stepping.rs","lineNumber":91,"sourceCode":"/// Updates to [`Stepping::schedule_states`] that will be applied at the start\n/// of the next render frame\nenum Update {\n    /// Set the action stepping will perform for this render frame\n    SetAction(Action),\n    /// Enable stepping for this schedule\n    AddSchedule(InternedScheduleLabel),\n    /// Disable stepping for this schedule\n    RemoveSchedule(InternedScheduleLabel),\n    /// Clear any system-specific behaviors for this schedule\n    ClearSchedule(InternedScheduleLabel),\n    /// Set a system-specific behavior for this schedule & system\n    SetBehavior(InternedScheduleLabel, SystemIdentifier, SystemBehavior),\n    /// Clear any system-specific behavior for this schedule & system\n    ClearBehavior(InternedScheduleLabel, SystemIdentifier),\n}\n\n#[derive(Error, Debug)]\n#[error(\"not available until all configured schedules have been run; try again next frame\")]\npub struct NotReady;\n\n#[derive(Resource, Default)]\n/// Resource for controlling system stepping behavior\npub struct Stepping {\n    // [`ScheduleState`] for each [`Schedule`] with stepping enabled\n    schedule_states: HashMap<InternedScheduleLabel, ScheduleState>,\n\n    // dynamically generated [`Schedule`] order\n    schedule_order: Vec<InternedScheduleLabel>,\n\n    // current position in the stepping frame\n    cursor: Cursor,\n\n    // index in [`schedule_order`] of the last schedule to call `skipped_systems()`\n    previous_schedule: Option<usize>,\n\n    // Action to perform during this render frame","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_ecs/src/schedule/stepping.rs#L73-L109","documentation":"Stepping derives the schedule execution order by observing schedules as they run; Stepping::schedules() returns NotReady until every schedule registered for stepping has executed at least once (schedule_order is only complete when it matches schedule_states). It is a transient, recoverable error: retry on a later frame.","triggerScenarios":"Calling stepping.schedules() in the same frame the Stepping resource was created/populated, before all stepping-enabled schedules have run once; adding a schedule to stepping mid-frame and querying immediately; debug UI reading the list on frame 0.","commonSituations":"Custom debug front-ends or inspector UIs integrating with bevy's Stepping resource; headless tests that create Stepping but never actually run the app loop.","solutions":["Treat the error as 'skip this frame': return early and retry after the frame completes.","Ensure the app actually runs every stepping-enabled schedule so the order can be discovered.","If a schedule was added to stepping mid-session, wait until it has run once before querying again."],"exampleFix":"// before\nlet schedules = stepping.schedules().unwrap(); // panics on frame 0\n\n// after\nlet Some(schedules) = stepping.schedules().ok() else {\n    return; // not all schedules have run yet; try again next frame\n};","handlingStrategy":"retry","validationCode":"if stepping.schedules().is_err() {\n    return; // schedules not all observed yet; try again next frame\n}","typeGuard":null,"tryCatchPattern":"match stepping.schedules() {\n    Ok(order) => draw_stepping_ui(order),\n    Err(NotReady) => {} // render nothing this frame; retry next frame\n}","preventionTips":["Query Stepping only from systems that run after the schedules of interest.","Gate stepping UI on schedules() returning Ok.","In tests, advance at least one full frame before asserting on stepping state."],"tags":["bevy","ecs","stepping","debugging","schedule","transient"],"backgroundTag":"try-again-later","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"}