Skip to content
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

Stop using unwrap in the pipelined rendering thread #9052

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

james7132
Copy link
Member

Objective

Fix #8936.

Solution

Stop using unwrap in the core pipelined rendering logic flow.

Separately also scoped the sub app span to just running the render app instead of including the blocking send.

Current unknowns: should we use std::panic::catch_unwind around running the render app? Other engine threads use it defensively, but we're letting it bubble up here, and a user-created panic could cause a deadlock if it kills the thread.


Changelog

Fixed: Pipelined rendering should no longer have spurious panics upon app exit.

@james7132 james7132 added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen P-Crash A sudden unexpected crash labels Jul 5, 2023
@james7132 james7132 requested a review from hymm July 5, 2023 21:51
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jul 10, 2023
@james7132 james7132 added this to the 0.11.1 milestone Jul 16, 2023
@mockersf mockersf added this pull request to the merge queue Jul 23, 2023
Merged via the queue into bevyengine:main with commit 630958a Jul 23, 2023
25 checks passed
cart pushed a commit that referenced this pull request Aug 10, 2023
# Objective
Fix #8936.

## Solution
Stop using `unwrap` in the core pipelined rendering logic flow.

Separately also scoped the `sub app` span to just running the render app
instead of including the blocking send.

Current unknowns: should we use `std::panic::catch_unwind` around
running the render app? Other engine threads use it defensively, but
we're letting it bubble up here, and a user-created panic could cause a
deadlock if it kills the thread.

---

## Changelog
Fixed: Pipelined rendering should no longer have spurious panics upon
app exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipelined rendering thread uses panic for control flow
5 participants