Closed RobLoach closed 4 days ago
I need a save file to debug this, how can getTileImprovement() return null if attackedTile.improvement is not null? Only if the improvement on the tile no longer exists in the ruleset - but THAT is handled by removeMissingTerrainModReferences so I have no idea how this state came to be
Right? It's a strange one. Start Auto-Play after loading, and it occurs....
Apparently we would add city ruins even where they don't exist in the ruleset Usually this was harmless since as stated improvements are 'cleaned up' anyway on next turn BUT if you attack the tile in that same turn with a unit that could remove that tile improvement, then it would say "I have no idea what you're talking about" and crash What an edge case
Wow, great debugging. I was looking through for a while and couldn't find it. Thanks so much, I'll test this out later today.
This is only in Github, not in the latest release yet :)
Tested, and worked well! Have Unciv building locally :wink:
Is there an existing issue for this?
Game Version
4.19.9
Describe the bug
Platform: Desktop Version: 4.14.9 (Build 1,074) Rulesets: [Civ IV Beyond the Sword, Civ V - Vanilla, Civ IV Audio, Civ V - Gods & Kings, Civ IV Icons, Civ IV Warlords, Fairline, Civ IV] Last Screen:
com.unciv.ui.screens.worldscreen.WorldScreen
OS: Linux (amd64, 5.15.0-126-generic) Freedesktop SDK 23.08 (Flatpak runtime) Java: Flathub 21.9 Max Memory: 8008 MB System default encoding: UTF-8
Message:
Save Mods:
Steps to Reproduce
N/A
Screenshots
No response
Link to save file
No response
Operating System
Linux
Additional Information