{"record":{"id":"0087e6e0c9a76bba","repo":"bevyengine/bevy","slug":"systems-with-conflicting-access-have-indeterminate","errorCode":null,"errorMessage":"Systems with conflicting access have indeterminate run order: {:?}","messagePattern":"Systems with conflicting access have indeterminate run order: (.+?)","errorType":"exception","errorClass":"AmbiguousSystemConflictsWarning","httpStatus":null,"severity":"warning","filePath":"crates/bevy_ecs/src/schedule/node.rs","lineNumber":710,"sourceCode":"                .map(|id| components.get_name(*id).unwrap())\n                .collect();\n\n            (name_a, name_b, conflict_names)\n        })\n    }\n}\n\nimpl Deref for ConflictingSystems {\n    type Target = Vec<(SystemKey, SystemKey, Box<[ComponentId]>)>;\n\n    fn deref(&self) -> &Self::Target {\n        &self.0\n    }\n}\n\n/// Error returned when there are ambiguous system conflicts detected.\n#[derive(Error, Debug)]\n#[error(\"Systems with conflicting access have indeterminate run order: {:?}\", .0.0)]\npub struct AmbiguousSystemConflictsWarning(pub ConflictingSystems);\n\n/// Container for system sets in a schedule.\n#[derive(Default)]\npub struct SystemSets {\n    /// List of system sets in the schedule.\n    sets: SlotMap<SystemSetKey, InternedSystemSet>,\n    /// List of conditions for each system set, in the same order as `sets`.\n    conditions: SecondaryMap<SystemSetKey, Vec<ConditionWithAccess>>,\n    /// Map from system sets to their keys.\n    ids: HashMap<InternedSystemSet, SystemSetKey>,\n    /// System sets that have not been initialized yet.\n    uninit: Vec<UninitializedSet>,\n}\n\n/// A system set's conditions that have not been initialized yet.\nstruct UninitializedSet {\n    key: SystemSetKey,","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_ecs/src/schedule/node.rs#L692-L728","documentation":"Warning emitted when a schedule is built with ScheduleBuildSettings::ambiguity_detection enabled and two or more systems have conflicting World access (they cannot run in parallel) but no explicit relative order, so which one runs first is nondeterministic. It is a warning, not a hard error: the schedule still builds and runs. The payload (ConflictingSystems) lists each pair and the component ids they clash on (empty list means a general World conflict, e.g. an exclusive system).","triggerScenarios":"Two systems with &mut access to the same component (or overlapping queries) added to the same schedule without .before/.after/.chain between them, while ambiguity detection is turned on for that schedule.","commonSituations":"Adding a new system that writes a component another system also writes; enabling ambiguity checks on a large existing app and getting a flood of pairs; cross-plugin systems that touch the same data with no shared set ordering.","solutions":["Add an explicit order between the reported pair: .before()/.after(), put them in one .chain()ed tuple, or order their containing SystemSets.","If the conflict is accidental, narrow one system's access (Changed<T>/Added<T> filters, disjoint components) so the accesses no longer conflict.","If the order genuinely does not matter, leave ambiguity_detection off for that schedule (it is opt-in)."],"exampleFix":"// before\napp.add_systems(Update, (advance_timers, apply_damage)); // both &mut Health, no order\n\n// after\napp.add_systems(Update, (advance_timers, apply_damage).chain());","handlingStrategy":"validation","validationCode":"// Detect ambiguity during development only\napp.add_schedule(Update, Schedule::new(Update).set_build_settings(ScheduleBuildSettings {\n    ambiguity_detection: true,\n    ..default()\n}));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable ambiguity detection in dev builds and treat new pairs as review blockers.","Establish feature-level set ordering (e.g. InputSet, PhysicsSet) so cross-plugin order is explicit.","Chain tuples that touch the same data."],"tags":["bevy","ecs","schedule","ambiguity","parallelism","system-ordering"],"backgroundTag":"nondeterministic-execution-order","analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}