bevyengine / bevyengine/bevy

Window hangs, refuses to close with a `NonSend`/`NonSendMut` system parameter in the `render_app`

Open
#12,912 9 comments 1 reaction 0 assignees View on GitHub
A-ECS A-Rendering C-Bug D-Complex O-MacOS S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version

v0.13.2

## \[Optional\] Relevant system information

This took forever to find, but simply having a system that has a
`fn ...(x: NonSend(_)) {}`

added to the render app with default plugins will cause an infinite hang when you try to close the window. Not sure why.

We encountered this in the [`bevy_vello`](https://github.com/loopystudios/bevy_vello) demo, if ran on native platforms.

The line specifically is:
https://github.com/loopystudios/bevy_vello/blob/dcf1584ead46ad19ff72d7f34110e00f415263f9/src/render/systems.rs#L60

This has been tested and verified on both MacOS and Windows.

It applies to both `NonSend` and `NonSendMut`

Contributor guide

Open the contributing guide

Research direction

Start with the NonSend/NonSendMut system at src/render/systems.rs line 60 in the linked bevy_vello demo, then reproduce the hang on a native macOS or Windows run using the render_app and default plugins. Trace what happens when the window closes and verify that the demo exits normally with both parameter types.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.