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

UI crashes if a UI camera is removed #4856

Closed
robtfm opened this issue May 27, 2022 · 0 comments
Closed

UI crashes if a UI camera is removed #4856

robtfm opened this issue May 27, 2022 · 0 comments
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash

Comments

@robtfm
Copy link
Contributor

robtfm commented May 27, 2022

Bevy version

main

Operating system & version

Windows 10

What you did

Run the text example and close the window.

What you expected to happen

Clean exit

What actually happened

thread 'main' panicked at 'view entity should exist: QueryDoesNotMatch(0v0)', crates\bevy_ui\src\render\render_pass.rs:72:14

Additional information

I think this occurs any time a CameraUI entity is despawned, but not if one is never spawned. I didn't look deeply into it, but would suggest we could just warn instead of expecting if the query doesn't resolve. Maybe "camera driven rendering" will fix this already.

@robtfm robtfm added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 27, 2022
@alice-i-cecile alice-i-cecile added P-Crash A sudden unexpected crash A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels May 27, 2022
@bors bors bot closed this as completed in 09a3d8a May 30, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Jun 7, 2022
# Objective

- We can't minimise if there's a 2d camera because ??? there legally must be a 2d target.
- Fixes bevyengine#4526
- Fixes bevyengine#4856

## Solution

- Make it not crash in those cases, just do nothing
- Seems to work ¯\\_(ツ)_/¯
- See also the companion commit in bevyengine#3597 - 503c247

Co-authored-by: Asteria <asteria131@outlook.com>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- We can't minimise if there's a 2d camera because ??? there legally must be a 2d target.
- Fixes bevyengine#4526
- Fixes bevyengine#4856

## Solution

- Make it not crash in those cases, just do nothing
- Seems to work ¯\\_(ツ)_/¯
- See also the companion commit in bevyengine#3597 - 503c247

Co-authored-by: Asteria <asteria131@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants