Opened 9 years ago

Closed 7 years ago

#3554 closed defect (duplicate)

Crash when joining a game with a map that was not found locally

Reported by: elexis Owned by:
Priority: Nice to Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by elexis)

If you join a multiplayer match or start a replay for a map that you don't have in your repository, the game will crash:

<p class="error">ERROR: CCacheLoader failed to find archived or source file for: "maps/scenarios/elephant_test.xml"</p>
<p class="error">ERROR: CCacheLoader failed to find archived or source file for: "maps/scenarios/elephant_test.xml"</p>
<p class="error">ERROR: CCacheLoader failed to find archived or source file for: "maps/scenarios/elephant_test.xml"</p>
<p class="error">ERROR: Failed to load map maps/scenarios/elephant_test.pmp: File_OpenFailed</p>
  • Showing a warning as in #3553 doesn't help with that, as one might join the match when a valid map was selected and the host selecting a non-existing map afterwards.
  • Especially if a random random-map is selected, the host will chose any map that it has without checking if the clients have them.

The client should check before starting the game whether it actually has that map and then returning cleanly to the menu.

In case of starting a game with a randomly chosen map that a client doesn't have, that client should send the not-ready signal to the host. The host should in return chose another map. The client should then send the ready signal again.

Probably some amount of refactoring could be done in gamesetup.js and functions_utility.js, as there are many functions related to loading mapdata, which could be moved to a new file functions_map.js.

Change History (1)

comment:1 by elexis, 7 years ago

Description: modified (diff)
Milestone: Backlog
Resolution: duplicate
Status: newclosed

Avoiding "map not found" situations, displaying notifications and graceful exit can be done by synchronizing the set of shared maps. So closing as duplicate of #4462. We can reopen this if the approach of that ticket is rejected.

Note: See TracTickets for help on using tickets.