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

Panic when adding non-UI child to UI nodes should provide a better message #10826

Closed
kleinesfilmroellchen opened this issue Dec 1, 2023 · 0 comments · Fixed by #12213
Closed
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis A-Hierarchy Parent-child entity hierarchies A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use

Comments

@kleinesfilmroellchen
Copy link

When adding a non-UI entity as a child to a UI node, Bevy (rev e3a59c4) panics like this:

thread 'Compute Task Pool (0)' panicked at C:\Users\$USER\.cargo\git\checkouts\bevy-f7ffde730c324c74\e3a59c4\crates\bevy_ui\src\stack.rs:63:14:
called `Result::unwrap()` on an `Err` value: QueryDoesNotMatch(40044v1)

This is not an issue in itself, it's the correct behavior. However, it took me quite a while to find out that the incorrect entity hierarchy was the issue. If a custom error message were provided, debugging this error would be much easier.

Additional information

The observed crash appears to be the same as presented in #9615.

@kleinesfilmroellchen kleinesfilmroellchen added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Dec 1, 2023
@Kanabenki Kanabenki added A-UI Graphical user interfaces, styles, layouts, and widgets A-Diagnostics Logging, crash handling, error reporting and performance analysis A-Hierarchy Parent-child entity hierarchies C-Usability A simple quality-of-life change that makes Bevy easier to use and removed S-Needs-Triage This issue needs to be labelled C-Docs An addition or correction to our documentation labels Dec 5, 2023
github-merge-queue bot pushed a commit that referenced this issue Feb 29, 2024
# Objective

- Fixes #10826
- Fixes #9615

## Solution

- Early-out when components are missing.
mockersf pushed a commit that referenced this issue Feb 29, 2024
# Objective

- Fixes #10826
- Fixes #9615

## Solution

- Early-out when components are missing.
spectria-limina pushed a commit to spectria-limina/bevy that referenced this issue Mar 9, 2024
# Objective

- Fixes bevyengine#10826
- Fixes bevyengine#9615

## Solution

- Early-out when components are missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis A-Hierarchy Parent-child entity hierarchies A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A simple quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants