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

bevy_ggrs example is broken #417

Closed
AgustinRamiroDiaz opened this issue Feb 17, 2024 · 1 comment · Fixed by #423 · May be fixed by #422
Closed

bevy_ggrs example is broken #417

AgustinRamiroDiaz opened this issue Feb 17, 2024 · 1 comment · Fixed by #423 · May be fixed by #422
Labels
bug Something isn't working
Milestone

Comments

@AgustinRamiroDiaz
Copy link
Contributor

AgustinRamiroDiaz commented Feb 17, 2024

What

The example under examples/bevy_ggrs is broken.

How to reproduce

  1. git clone https://github.com/johanhelsing/matchbox
  2. cd matchbox/examples/bevy_ggrs
  3. cargo run
  4. See error
2024-02-17T14:34:05.377797Z  INFO bevy_ggrs_example: connecting to matchbox server: "ws://127.0.0.1:3536/bevy_ggrs?next=2"
2024-02-17T14:34:05.377909Z DEBUG log: Starting WebRtcSocket    
thread 'main' panicked at /home/az/dev/matchbox/matchbox_socket/src/webrtc_socket/socket.rs:477:33:
called `Result::unwrap()` on an `Err` value: Closed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_ggrs_example::lobby_system`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!

Additional context

  • It works with wasm version
  • Last working version was v0.6.1
  • v0.7.0 doesn't panic, yet it's not working. It only shows the floor with a bright magenta
@johanhelsing
Copy link
Owner

I've been digging into this issue, and it goes away if the example is built with the bevy multi-threaded feature.

When digging, I also found the following:

WebRtcSocket::try_update_peers returned Err(ChannelError::Closed) even though the channel was neither dropped, nor closed. So it looks like a bug in futures_channel::mpsc::UnboundedReceiver, that it's not behaving as documented, though that seems somewhat unlikely. I'm not sure what to think.

In any case, the workaround is to add multi-threaded to the bevy features. Perhaps we should add it as a requirement for bevy_matchbox as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants