Open Alaadel opened 3 years ago
I can't seem to follow the steps: at step 5 I don't see anything that says "Please click the button" or "Click me!". I only see a button that says "Ready", but if I click that, I don't see a timer, so none of the remaining steps seem to make sense.
It's also exceptionally difficult to debug reports like this. Multiplayer networking is really hard to begin with, three simultaneously running previews is extremely difficult to test, and you can't step in to a debugger without dropping connections due to a timeout. Can you reduce this further to make the absolutely most minimal possible test case with the fewest events and objects conceivable? It would also be a lot easier if you could reproduce it with just two previews (which is still extremely difficult to handle, but itself easier than three previews). Multiplayer networking is hard, and people often make mistakes with their events anyway - the bug report guidelines are there to try to avoid the situation we end up working for hours or days and it just turns out some event was wrong (as was the case with the room detection check in your other report #4593).
Thank you. Sorry if my report was not easy to follow. I really tried to follow the guidelines as much as I can.
I have attached 2 videos of reproduction. One on Chrome where the editors and previews hang, and one on Firefox where FF suggests to stop the script causing the error in the editor.
You can test with 2 previews now (you can test with 3, just change the TEST_PEER_COUNT variable to 3 in the "Game events" sheet):
Currently, I can reproduce this any time.
At step 5: If the peer didn't join, please refresh Ctrl+R the previews and repeat. This is the other bug I reported; that -for some inconsistent reason- the first preview does not allow the peer to join.. I had to Ctrl+R twice to get a working run while writing this.
I also found the problem: In the "Login events" sheet, the 1nd block inside "On Start of Layout" event (marked by "DISABLE ME" comment). This is the Sync (objects,inputs, and variables) actions. If I disable the block and repeat the steps, the crash will not happen, but the host is stuck at "joining..." while the peer keeps requesting room list and it returns 0. .. Maybe this 0 is related to my mistake in the room issue? I will check it after writing this.
Summary of the code: The code is taken directly from Pong sample, with some modifications. It is a host (server) and multiple peers. The host creates a room first, and the peers can join once there is a room available.
I know I might have made a mistake in my code, but I can't imagine why that would crash the editor. Thank you very much for your time.
Problem description
The project is a host and 2 peers. I request room list first, if there are no rooms, the host hosts a game; and if there is a room, the peers can join. Peers keep requesting the room list until a room is found. After the game, the peers leave, and after 5 seconds, the host leaves. When trying to repeat the process, and clicking host on the host (while peers are polling room list), the previews halt, and they crash along with the editor.
Attach a .c3p
Bug MP Crash 3.zip
Steps to reproduce
Observed result
The host will show "joining..." message, then all previews, along with the editor, will crash. There will be no crash report dialog in the editor. After force closing the editor, Chrome will show "Error code: RESULT_CODE_HUNG".
On Firefox: The same issue happens, but Firefox can avoid hung up by stopping the script in the host preview. I could get a log file from the console: log.zip
it shows details about a few errors, like:
Expected result
Graceful error handling. Firing OnError with an error message, or a normal disconnect.
More details
I solved it by waiting 5 more seconds after the host leaves and before it goes to the login layout (the relevant action is in "ComGame" group under "Common" group in the Game layout. Here is a working file: Bug MP Crash(1).zip)
Affected browsers/platforms: Chrome (Version 88.0.4324.182 (Official Build) (64-bit)) and Firefox 85.0 (64-bit)
First affected release:
System details
View details
PASTE HERE