-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ambiguous_with
breaks run conditions
#9114
Labels
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
P-Regression
Functionality that used to work but no longer does. Add a test for this!
Milestone
Comments
NiseVoid
added
C-Bug
An unexpected or incorrect behavior
S-Needs-Triage
This issue needs to be labelled
labels
Jul 11, 2023
Appears to be caused by Minimal reproduction: use bevy::prelude::*;
#[derive(SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
struct Set;
fn main() {
App::new()
.configure_set(Last, Set.run_if(|| false))
.add_systems(
Last,
(|| println!("This should not print."))
.ambiguous_with(|| ()) // Remove this line and it no longer prints
.in_set(Set),
)
.run();
} edit: Reduced to a truly minimal reproduction. |
Selene-Amanita
added
A-Windowing
Platform-agnostic interface layer to run your app in
P-Regression
Functionality that used to work but no longer does. Add a test for this!
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Jul 11, 2023
alice-i-cecile
changed the title
WinitPlugin somehow breaks run conditions in Last
Jul 22, 2023
ambiguous_with
breaks run conditions
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 3, 2023
# Objective - Fixes #9114 ## Solution Inside `ScheduleGraph::build_schedule()` the variable `node_count = self.systems.len() + self.system_sets.len()` is used to calculate the indices for the `reachable` bitset derived from `self.hierarchy.graph`. However, the number of nodes inside `self.hierarchy.graph` does not always correspond to `self.systems.len() + self.system_sets.len()` when `ambiguous_with` is used, because an ambiguous set is added to `system_sets` (because we need an `NodeId` for the ambiguity graph) without adding a node to `self.hierarchy`. In this PR, we rename `node_count` to the more descriptive name `hg_node_count` and set it to `self.hierarchy.graph.node_count()`. --------- Co-authored-by: James Liu <contact@jamessliu.com>
cart
pushed a commit
that referenced
this issue
Aug 10, 2023
# Objective - Fixes #9114 ## Solution Inside `ScheduleGraph::build_schedule()` the variable `node_count = self.systems.len() + self.system_sets.len()` is used to calculate the indices for the `reachable` bitset derived from `self.hierarchy.graph`. However, the number of nodes inside `self.hierarchy.graph` does not always correspond to `self.systems.len() + self.system_sets.len()` when `ambiguous_with` is used, because an ambiguous set is added to `system_sets` (because we need an `NodeId` for the ambiguity graph) without adding a node to `self.hierarchy`. In this PR, we rename `node_count` to the more descriptive name `hg_node_count` and set it to `self.hierarchy.graph.node_count()`. --------- Co-authored-by: James Liu <contact@jamessliu.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
P-Regression
Functionality that used to work but no longer does. Add a test for this!
Bevy version
0.11
What you did
I migrated my project to bevy 0.11 and noticed a system in Last started misbehaving despite having the configuration for the set it was in in all schedules.
This is the most simplified version of my code that still produces the bug
What went wrong
The above code should output:
and then stop.
Instead, if the
WinitPlugin
is enabled it also outputs this every frame:Since the runcondition of the set that system is in is not met, it should not be printing this. Especially considering it only happens in Last while Update works as expected. If the
WinitPlugin
is disabled and theScheduleRunnerPlugin
is turned back on this problem is gone.The text was updated successfully, but these errors were encountered: