gschup / ggrs

GGRS is a reimagination of GGPO, enabling P2P rollback networking in Rust. Rollback to the future!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo crash

majg0 opened this issue · comments

Sorry to burst the issue template; wanted to get this out to you anyway.

Ran the demo in two chrome on the same macos, one of which was incognito.

Here are the browser logs.

One

Constructing socket...
mq_js_bundle.js:1 Starting new game...
mq_js_bundle.js:1 Event: Synchronizing { addr: "8ee20709-4dfe-4a99-8e38-4507b3008b2f", total: 5, count: 1 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "8ee20709-4dfe-4a99-8e38-4507b3008b2f", total: 5, count: 2 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "8ee20709-4dfe-4a99-8e38-4507b3008b2f", total: 5, count: 3 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "8ee20709-4dfe-4a99-8e38-4507b3008b2f", total: 5, count: 4 }
mq_js_bundle.js:1 Event: Synchronized { addr: "8ee20709-4dfe-4a99-8e38-4507b3008b2f" }
mq_js_bundle.js:1 PanicInfo { payload: Any { .. }, message: Some(send_to failed: TrySendError { kind: Disconnected }), location: Location { file: "C:\\Users\\Georg Schuppe\\.cargo\\git\\checkouts\\matchbox-9d3f96917a0a12d8\\94986ca\\matchbox_socket\\src\\webrtc_socket\\mod.rs", line: 122, col: 14 } }
ggrs_demo_bg.wasm:0xc2284 Uncaught RuntimeError: unreachable
    at __rust_start_panic (ggrs_demo_bg.wasm:0xc2284)
    at rust_panic (ggrs_demo_bg.wasm:0xbfd06)
    at std::panicking::rust_panic_with_hook::h19d99b2b2597d628 (ggrs_demo_bg.wasm:0xaf824)
    at std::panicking::begin_panic_handler::{{closure}}::hdf90814cf3dcdd18 (ggrs_demo_bg.wasm:0xb7cda)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h1a5f05611837cc03 (ggrs_demo_bg.wasm:0xc11b5)
    at rust_begin_unwind (ggrs_demo_bg.wasm:0xbe138)
    at core::panicking::panic_fmt::hbc500cb2b2c8690c (ggrs_demo_bg.wasm:0xbf43b)
    at core::result::unwrap_failed::he5c411e7d753a069 (ggrs_demo_bg.wasm:0xb8a65)
    at <matchbox_socket::ggrs_socket::WebRtcNonBlockingSocket as ggrs::NonBlockingSocket<alloc::string::String>>::send_to::h10606d0c2a54140a (ggrs_demo_bg.wasm:0xa3f30)
    at ggrs::network::protocol::UdpProtocol<T>::send_all_messages::hb4e724e6ae75d556 (ggrs_demo_bg.wasm:0x7b0d7)

Other

Starting new game...
mq_js_bundle.js:1 Event: Synchronizing { addr: "757d8ade-bcc0-46f2-a631-076ad7683413", total: 5, count: 1 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "757d8ade-bcc0-46f2-a631-076ad7683413", total: 5, count: 2 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "757d8ade-bcc0-46f2-a631-076ad7683413", total: 5, count: 3 }
mq_js_bundle.js:1 Event: Synchronizing { addr: "757d8ade-bcc0-46f2-a631-076ad7683413", total: 5, count: 4 }
mq_js_bundle.js:1 Event: Synchronized { addr: "757d8ade-bcc0-46f2-a631-076ad7683413" }
mq_js_bundle.js:1 PanicInfo { payload: Any { .. }, message: Some(send_to failed: TrySendError { kind: Disconnected }), location: Location { file: "C:\\Users\\Georg Schuppe\\.cargo\\git\\checkouts\\matchbox-9d3f96917a0a12d8\\94986ca\\matchbox_socket\\src\\webrtc_socket\\mod.rs", line: 122, col: 14 } }
ggrs_demo_bg.wasm:0xc2284 Uncaught RuntimeError: unreachable
    at __rust_start_panic (ggrs_demo_bg.wasm:0xc2284)
    at rust_panic (ggrs_demo_bg.wasm:0xbfd06)
    at std::panicking::rust_panic_with_hook::h19d99b2b2597d628 (ggrs_demo_bg.wasm:0xaf824)
    at std::panicking::begin_panic_handler::{{closure}}::hdf90814cf3dcdd18 (ggrs_demo_bg.wasm:0xb7cda)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h1a5f05611837cc03 (ggrs_demo_bg.wasm:0xc11b5)
    at rust_begin_unwind (ggrs_demo_bg.wasm:0xbe138)
    at core::panicking::panic_fmt::hbc500cb2b2c8690c (ggrs_demo_bg.wasm:0xbf43b)
    at core::result::unwrap_failed::he5c411e7d753a069 (ggrs_demo_bg.wasm:0xb8a65)
    at <matchbox_socket::ggrs_socket::WebRtcNonBlockingSocket as ggrs::NonBlockingSocket<alloc::string::String>>::send_to::h10606d0c2a54140a (ggrs_demo_bg.wasm:0xa3f30)
    at ggrs::network::protocol::UdpProtocol<T>::send_all_messages::hb4e724e6ae75d556 (ggrs_demo_bg.wasm:0x7b0d7)
mq_js_bundle.js:1 Unsupported keyboard key:  MetaLeft
mq_js_bundle.js:1 PanicInfo { payload: Any { .. }, message: Some(failed to notify about open connection: TrySendError { kind: Disconnected }), location: Location { file: "C:\\Users\\Georg Schuppe\\.cargo\\git\\checkouts\\matchbox-9d3f96917a0a12d8\\94986ca\\matchbox_socket\\src\\webrtc_socket\\wasm\\message_loop.rs", line: 328, col: 14 } }
ggrs_demo_bg.wasm:0xaf81e Uncaught RuntimeError: unreachable
    at std::panicking::rust_panic_with_hook::h19d99b2b2597d628 (ggrs_demo_bg.wasm:0xaf81e)
    at std::panicking::begin_panic_handler::{{closure}}::hdf90814cf3dcdd18 (ggrs_demo_bg.wasm:0xb7cda)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h1a5f05611837cc03 (ggrs_demo_bg.wasm:0xc11b5)
    at rust_begin_unwind (ggrs_demo_bg.wasm:0xbe138)
    at core::panicking::panic_fmt::hbc500cb2b2c8690c (ggrs_demo_bg.wasm:0xbf43b)
    at core::result::unwrap_failed::he5c411e7d753a069 (ggrs_demo_bg.wasm:0xb8a65)
    at matchbox_socket::webrtc_socket::wasm::message_loop::create_data_channel::{{closure}}::h50fcb51dc975bac4 (ggrs_demo_bg.wasm:0xb5f85)
    at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h6246336136d39a8a (ggrs_demo_bg.wasm:0xc06d5)
    at __wbg_adapter_37 (ggrs_demo.js:219:10)
    at RTCDataChannel.real (ggrs_demo.js:192:20)

Hi, thanks for the error report!

I assume that before it crashed, you could "play" for approx. a minute? In that case, it is an issue with the signalling server that has been fixed in this PR. There are some other things to take care of, but I will update the demo to use this newer version of matchbox; probably over the weekend.

@gschup that's right!

If you want me to try it out, we can keep this open and have you leave me a comment when it's ready to test. Otherwise, go ahead and close this at your will :)

Good job on this, cool stuff! 👍🏼

@majg0 A tad late, but the problem should be fixed. I would be very grateful if you could try again :)

No crash! Great, solved!

Just FYI, more a problem with the demo integration I assume but if you disconnect while rotating, the other player will forever see you rotate: it says in the status that you're disconnected so probably it's just a matter of updating the game state upon disconnect etc. This is more of a design question than a bug, for sure. Not clear what should happen. Can one reconnect though? That would be cool!

Just saw the other issue, free to ignore! 👍🏼 Keep it up!

the player spinning when disconnected is by design. I wanted to showcase that ggrs is able to detect disconnects and that your game logic can handle disconnected players (for example by letting some bot take over). Maybe I need to improve the visuals for that :)

https://github.com/gschup/ggrs_demo/blob/ca2fbf11cf22b3036a5da6b3e41fd4b9c543b46c/src/ex_game.rs#L359

Haha oh really! Yeah it wasn't clear. Maybe "pump" the size of it, scaling up and down. Probably quite annoying to implement if you don't have existing infrastructure for doing that kind of thing though. Maybe just fade the color a bit? Definitely not a deal breaker anyway.