-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
UI crashes if a UI camera is removed #4856
Copy link
Copy link
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashA sudden unexpected crash
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashA sudden unexpected crash