-
-
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
noop system with commands argument added to Render schedule exhibits racing behavior #12498
Comments
Perhaps this isn't actually a bug in Bevy and is just considered a breaking change. I'll explore configuring Humm.. if I do: render_app.edit_schedule(Render, |schedule| {
schedule.set_build_settings(ScheduleBuildSettings {
auto_insert_apply_deferred: false,
..default()
});
}); then stuff panics and errors out:
.. Nah, as I think about it more, I do think something is wrong here. I don't think the automatic |
I'd add as a side note that we recently found a similar bug in 🎆 Hanabi due to weak ordering (under-constrained systems) and it's entirely possible seeing the symptoms that |
I'm not expecting Bevy to be smart enough to detect the noop system. I think it's fine to assume that the signature defined in the system's arguments is indicative of the systems side-effects. I just don't think there is an intent to apply command buffers automatically in an unordered set of systems. If In the MRE's code, It's possible that my understanding here is wrong though. If you could share the Hanabi weak ordering code that might be illuminating to me. Also, I noted this PR exists - #11669 which makes me wonder if there's more at play here with the subapp's Render schedule. EDIT: I might be incorrect about my belief that the set isn't ordered. One sec. schedule.configure_sets(
(
ExtractCommands,
ManageViews,
Queue,
PhaseSort,
Prepare,
Render,
Cleanup,
)
.chain(),
); So ... so I guess Okayyy so this is a bug with bevy-ecs-tilemap and not bevy. I'll keep this open for a little while longer just to mull it over. |
Am confident this isn't an issue with Bevy at this point |
Hanabi had a system in |
Agreed.
I don't know what sets being ordered means or does, but yes, systems in those sets are not ordered. That was the Hanabi bug, and that behavior was confirmed with the rendering team. So yes this looks like the same kind of bug in |
Bevy version
0.13
[Optional] Relevant system information
What you did
I updated to Bevy 0.13 from Bevy 0.12. I attempted to render a tilemap using
bevy-ecs-tilemap
in a WASM/singlethreaded environment.What went wrong
Nothing rendered. The issue occurs approximately 1 in every 5 loads of the app.
Additional information
MRE: https://github.com/MeoMix/bevy_bug_example/blob/master/src/main.rs
The crucial thing to note about the MRE is that
test_system
acceptsmut commands: Commands
but is otherwise empty.test_system
is added toRenderApp
in the setRenderSet::Queue
.The issue does not reproduce if I remove the unused argument.
I see that
bevy-ecs-tilemap
also inserts a system into the setRenderSet::Queue
here: https://github.com/StarArawn/bevy_ecs_tilemap/blob/main/src/render/material.rs#L130My assumption is that this bug relates to #9822 but only because I have awareness of this change and lack awareness of all changes made in Bevy 0.13.
Correct Output:
Incorrect Output:
The text was updated successfully, but these errors were encountered: