Closed Casperblaze closed 1 year ago
It might have something to do with mods. The important line in your error is buyInquisitorNear(ReligionAutomation.kt:176), which searches through the ruleset (determined by the mods) for a unit that can act like an Inquisitor.
Could it be that we are trying to get the current tile of a hypothetical MapUnit that hasn't been placed yet called by some unique checking code?
Pretty fascinating that you saw that in all the code, but therefore I think that's not fixable, that's something about the mods compatibility but Is there atleast a way to find out which of the mods is causing the error
Well, it.getMapUnit(civInfo).canDoLimitedAction(Constants.removeHeresy)
is pretty nasty: Create a map unit not on the map just to look for a property, then discard it immediately... Plus it checks a deprecated Unique. So some mod could definitely avoid the crash while still maintaining intent - use the supported Unique instead. The offending Mod could be found with a file system content regex search pretty easily - on 'ix or 'doze. Can \[Remove Foreign religions from your own cities\] \[\d+\] times.*<
should find it. Too lazy to download all that myself, maybe later (as in - 2024 :smiling_imp:) (spoiler: Mod checker will display the deprecation - go ahead, tell us)
Someone correct me (haven't checked the save that isn't even there yet), but is this not a duplicate of #10425? One of us should probably pr a fix for that
Dupe? In a way, yes, and the snippet in https://github.com/yairm210/Unciv/issues/10425#issuecomment-1793235892 would prevent this crash too. But is that a "solution" or A Solution... With that patch, all conditionals run on "I don't know my tile" and will probably return false, and thus logic relying on being able to recognize roles in the ruleset will fail silently instead of loudly as here - in other words, an Inquisitor that is only sometimes an Inquisitor will be treated by automation as never being an Inquisitor. Probably, depends on the specific unique, it could also decide "If I'm in an Alpha Centauri orbit, then <in [Forest] tiles>
must be true, as I don't see any trees, as the saying goes."
Crash starts in mapUnitCache.updateUniques
during getMapUnit
. Therefore, regardless of if the unique that is being checked would return false or not is irrelevant. The fake unit isn't spawning in the first place
Sure, we can have concerns regarding the AI not recognizing unit roles due to blocking conditionals. But even if that was the case, you would still need to address 10425 first in some way, or else we can't even reach a point of the AI checking the unit role
Wow, a Crocodile Dundee "this is a knife" reference! I am getting more and more convinced that you're actually my father in an alternate universe, your reference bag is almost entirely equivalent
And... To answer your question, yes, I independently came up with the #10425 solution before I saw your comment, so I think that despite how ugly it looks it's the way to go. If anyone has a better solution to replace it later, fantastic, if not, let's at least fix the bug
convinced
I would probably be honored...
reference bag
The other one is from 1999, thus 13 years younger :roll_eyes:
That solves the "bug" part. However, the point remains that the "tile entering" uniques are all cached into booleans in UpdateUniques, which means that conditionals placed upon them may not work. Sounds like yet another mod checker addition
cached
We already have exception detection somewhere, some flag that knows when mods make it un-cacheable...??? Hmmm... Not quite, only noTerrainMovementUniques
and its two siblings - could be a tad too simple for all the mad modders...
Hello, I haven't played this game in a while, but I Remember playing it with my father, we had a great time so I decided to start playing it again, this is the 2nd play attempt and I encounter the same error can somebody please help me with it
Platform: Android Version: 4.8.17 (Build 927) Rulesets: [Higher quality builtin sounds, Modern Civilizations, Civ V - Vanilla, Brave New World, Resource Recyclers, Community Maps, Extra Buildings, Expanded Warfare, Civ V - Gods & Kings, Dacia Unciv mod, More Luxuries, Closer Cities Distance of 1, 5Hex Tileset, Additional Music Various] Last Screen:
com.unciv.ui.screens.worldscreen.WorldScreen
Device Model: SM-A536B API Level: 33
Message:
Save Mods:
Save Data:
Show Saved Game
```