Panic in bevy_render::renderer::render_system
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.11.3
## AdapterInfo
```2023-10-27T08:10:36.037827Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics", vendor: 32902, device: 39745, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }```
## What you did
Instantiating / rendering 2d Mesh circles / capsules.
## What went wrong
Crash
```note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in exclusive system `bevy_render::renderer::render_system`!
thread 'Compute Task Pool (3)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', C:\Users\robin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.11.3\src\pipelined_rendering.rs:143:45```
## Additional information
The source of this panic seems to be in pipelined_rendering.rs at line 143, where an unwrap() call was made on a Result that contained an Err variant.
```receiver.0.recv().await.unwrap()```
Here, the recv().await is attempting to receive a message from a channel. The unwrap() call afterwards assumes that this operation will always succeed, but in thiscase, it has failed, returning a RecvError. This means that the sending end of the channel has been dropped without sending a message or that there was some other error in receiving the message.
perhaps handle unwrap :
```let received_value = match receiver.0.recv().await {
Ok(value) => value,
Err(_) => {
eprintln!("Failed to receive message from the channel!");
return; // or handle this error appropriately
}
};```
Contributor guide
Research direction
Read bevy_render/src/pipelined_rendering.rs around line 143 and trace how render_system uses the channel while rendering 2D mesh circles or capsules. Reproduce the failure with RUST_BACKTRACE=full, then determine the expected behavior when recv() returns RecvError and verify that rendering no longer panics in that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100