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

Game crashes when loading/Create Cashe maps with invalid player spot positions #1166

Open
DevGeniusCode opened this issue Jan 16, 2025 · 3 comments
Labels

Comments

@DevGeniusCode
Copy link

This issue happens in Thyme's build, but not in the original game.

There is an issue when loading maps, If a player's spot is placed incorrectly, the loading process halts and the game crashes. In maps like AOD, this is done intentionally to hide the enemy's command center, while still allowing the enemy to be placed in the right spot.

Image

Logs:

DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:905: MapCache::Add_Map(): caching 'C:\Users\User\Documents\Command and Conquer Generals Zero Hour Data\Maps\aod general's powers! by twinsen [pashacnc com)\aod general's powers! by twinsen [pashacnc com).map' because 'c:\users\user\documents\command and conquer generals zero hour data\maps\aod general's powers! by twinsen [pashacnc com)\aod general's powers! by twinsen [pashacnc com).map' was not found
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:944: Missing TheKey_mapName!
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:960:   filesize = 42269 bytes
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:961:   displayName = aod general's powers! by twinsen [pashacnc com).map (5)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:962:   CRC = 547836EE
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:963:   isOfficial = no
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:964:   isMultiplayer = yes
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:965:   numPlayers = 5
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:970:   extent = (0.00,0.00) -> (5000.00,5000.00)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:973:     waypoint Player_1_Start: (1620.00,1410.00)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:973:     waypoint Player_2_Start: (3570.00,1410.00)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:973:     waypoint Player_3_Start: (1620.00,3530.00)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:973:     waypoint Player_4_Start: (3570.00,3530.00)
DEBUG C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:973:     waypoint Player_5_Start: (5190.00,5240.00)
FATAL C:\Users\User\Documents\GitHub\Thyme\src\game\client\maputil.cpp:356: ASSERTION FAILED!
  Function:bool __thiscall MapCache::Load_User_Maps(void)
  Expression:false
  Message:Found map 'aod general's powers! by twinsen [pashacnc com)' in wrong spot (c:\users\user\documents\command and conquer generals zero hour data\maps\aod generals powers by twinsen [pashacnc com)\aod general's powers! by twinsen [pashacnc com).map)

Steps to Reproduce:

  1. Load the map aod general's powers! by twinsen [pashacnc com) [Direct download] or similar maps where player positions are intentionally placed outside the map boundaries to hide the base.
  2. The game will fail to load the map and crash during the process.
@xezon xezon added the bug label Jan 16, 2025
@6emmes
Copy link
Contributor

6emmes commented Jan 18, 2025

"Invalid" player start positions work correctly in Thyme. In this case failed assert is captainslog_dbgassert(false, "no team or player named %s could be found!", name.Str());. It seems Thyme fails to load map's existing teams. For example whis map without patriots and airfileds loads correctly but an empty map with just barracks assigned to default teamAmerica crashes.

Image

@DevGeniusCode
Copy link
Author

Spent some time figuring out how you got to the map loading screen while I couldn't even start the game. I realized two things:

  1. I had two versions of the map installed: one with the wrong spot bug, and the version you used, which was downloaded from the website with the bug you described. I didn’t encounter the second version at all because the first version loaded first.
  2. The original game doesn’t display the first version with the wrong spot bug in the map list at all.

Once I removed the first version, I encountered the bug you mentioned. While reviewing the maps, I also found additional maps with the same bug in the original game, but they aren’t shown in the map list. In the Thyme version, this causes a crash.

Here’s a link to another map with the first bug I mentioned: Direct download.

By the way, I’m curious how they upload and test the maps when they’re not even shown in the map list in the game.

@6emmes
Copy link
Contributor

6emmes commented Jan 19, 2025

Map AOD survival by {cxn} valkyrie (AI_1 top left USA_team1 AI_2 Buttom right China_team2) [pashacnc.map is not showing up in vanillaZH either. It has stupid long filename which is painful to look at. After truncating the mapname and removing propaganda towers it loads in Thyme just like previous map. I fail to replicate "the first bug"

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants