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

[wasm] Attempting to get an EventWriter for an unregistered event type panics with an unhelpful message #2138

Closed
lukewestby opened this issue May 10, 2021 · 3 comments
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists

Comments

@lukewestby
Copy link

Bevy version

0.5.0

Operating system & version

wasm

What you did

  1. Create a system like so:
struct Event;

fn system(mut events: EventWriter<Event>) {}

Set up the app, but do not register the event

App::build()
    .with_system(system.system())
    .run();

What you expected to happen

The application is misconfigured so I expect this to panic, and ideally the message for the panic would explain that a system attempted to fetch an EventWriter for an unregistered event type.

What actually happened

The application panics with the following:

panicked at 'assertion failed: `(left == right)`
  left: `true`,
 right: `false`: cannot recursively acquire mutex',

## Additional information

Any additional information you would like to add such as screenshots, logs, etc.
@lukewestby lukewestby added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 10, 2021
@lukewestby
Copy link
Author

idk what happened here. github bug, maybe.

@alice-i-cecile alice-i-cecile removed the S-Needs-Triage This issue needs to be labelled label Jul 8, 2021
@alice-i-cecile alice-i-cecile reopened this Jul 8, 2021
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events D-Trivial Nice and easy! A great choice to get started with Bevy C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy labels Jul 8, 2021
@alice-i-cecile
Copy link
Member

Re-opening, since this isn't actually resolved.

That's an exceptionally unhelpful error message; I'd like to see if we can improve that.

@lukewestby
Copy link
Author

@alice-i-cecile i closed this one because github double-submitted my issue. this one is a duplicate of #2139.

@alice-i-cecile alice-i-cecile added the S-Duplicate This issue or PR already exists label Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists
Projects
None yet
Development

No branches or pull requests

2 participants