calmackenzie / VG1819

Final Project for CS4830 2018 - 2019
0 stars 2 forks source link

[bug] Two clients sometimes load different maps and cause a crash. #414

Closed austinbrianrogers closed 5 years ago

austinbrianrogers commented 5 years ago

Repro:

Start a multiplayer game with 2 players over and over again until it occurs.

austinbrianrogers commented 5 years ago

image

Image of two clients on different maps

austinbrianrogers commented 5 years ago

image

Callstack and breakpoint

kamarapala commented 5 years ago

Pretty sure Austin was just on an old build without the fix.

I had more than a dozen sessions running today while testing something else and they were always on the same map. Need confirmation from @austinbrianrogers.

kamarapala commented 5 years ago

Austin had this happen again yesterday on the feature/enemyCardTracker branch. Tested again yesterday on that specific branch and couldn't get the issue to occur. Tested many more times today while fixing other issues on a fresh branch and still haven't run into it.

I suspect an issue locally with Austin's branch since I was running the same branch I downloaded from remote and it was fine.

Has anyone else ran into mismatching maps while playing multiplayer?

calmackenzie commented 5 years ago

I have not had this issue occur I'm going to close this issue -- if the issue is encountered again it can be re-opened

calmackenzie commented 5 years ago

Austin experienced this again during multiplayer testing with me I was host so did not experience issue

kamarapala commented 5 years ago

I spent a several hours testing and walking through every step of the logic behind loading the map during multiplayer and nothing jumped out at me that could cause any issues.

I extended my testing to using two different machines, swapping the host between them, selecting different maps, trying to do anything that could cause them to load different maps for myself, but they would always load the same map as the host.

I also got a few friends to download the current release and play and never had issues with different maps running off of release.

@austinbrianrogers Since I can't get the issue to occur in order to debug, I'll have to ask you to please try a few things for me:

  1. Get the problem to occur on your end and when different maps load, check the console from connecting client and let me know what map ID was received from the server. Also check the console for the host and see what ID was sent to the Server.

    • The host console should have something like the last line from this image:

    • The client console should have something like the middle line from this image:

    • Visually compare the IDs with the actual maps loaded by both the host and the client; default is 0, Hollow (3x3 white flags in the middle) is 1, River (9x7 blue flags at the top) is 2, NarrowRoad (narrow map with the gems) is 3.

      • This will help tell me if the server and clients are sending/receiving the right IDs, but the actual game is loading a different map, or if one client is just receiving the wrong ID
    • Let me know if the map ID received on the client is garbage or -1 or if it matches the map loaded by the host

  2. Download and run release v0.3 and test the multiplayer and let me know if you run into different maps between clients

  3. I created a new branch called mp_different_maps_issue and made small changes; run that and test and tell me if you still get different maps