Closed Godzillagamerx closed 1 year ago
Edit: Fixed markdown/html formatting of OP - your save, if there was one, got lost. There were only four spurious letters there.
I'd guess you have some improvable resource close to a workboat that it can't reach due to borders or units of a competing civ blocking the way. But - better see, give us save, uga uga.
Edit: No - the trace says tryRelocateMissileToNearbyAttackableCities
- it's a Nuke???
(edited, because wrapped as details it's easier to copy to clipboard - and to read over)
Miss click
...git history of these functions is cut due to file reorg, but they're older than 2023-10-04... Must be #9967.
What I see immediately - tryRelocateMissileToNearbyAttackableCities
limits relocation range to bombing range, even if relocation range is twice that? Can't cause this.
...the tile in question is "Tile @(-29.0,-12.0), Wasteland, Hill, {3} {Power}, Wind farm" - yup you can't move a Nuke there. Which nuke? A Warhead Truck belonging to Crimson Legion. Oh my, a Land unit made into a Nuke. That can't be healthy.
Mod breaking Unciv's capabilities!
So - what do we do? Report "Land units can't be nukes" to the mod's issues? Write a RulesetValidator rule? Amend UnitAutomation line 183 to if (unit.baseUnit.isNuclearWeapon() && unit.type.isAirUnit())
? @tuvus ?
The solution if (unit.baseUnit.isNuclearWeapon() && unit.type.isAirUnit()) seems best. I don't see a reason why we shouldn't allow it. Its AI might be a little weird, not taking the nuclear capabilities of the truck. I remember reading that someone on Discord wanted a NuclearExplosionOnDeath unique, which is similar.
But what will that Warhead Turd then do - will it just sit? Anyway, tested and it indeed avoids the crash. Feel free to wrap as PR.
Does that mean that you will make the PR or should I?
I'm so tempted to just add a :+1: omuji and let you brood over what that means - I'd be glad for one less branch here.
Now fix
Platform Operating system type, major version, architecture (64/32 bit).
Version Google App store and version 4.8.17 Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior 1 let city Auto build 2 city makes boat 3 Leave automation on 4 Press next Turn
Crashscreen
**Platform:** Android **Version:** 4.8.17 (Build 927) **Rulesets:** [The Undead, Civ V - Vanilla, RekMOD, DeCiv Redux, Community Maps, Epic of Fantasy, tempZip, Alpha Frontier, Antarctica Unciv mod, Unciv IV mod, The North Pole, Smoky Skies Redux, Ancient Civilizations, Tiberium Dawn Mod, Civ V - Gods & Kings, Difficulty_Sandbox] **Last Screen:** `com.unciv.ui.screens.worldscreen.WorldScreen` -------------------------------- Device Model: moto g play (2021) API Level: 30 -------------------------------- **Message:** ``` java.lang.Exception: Can't reach this tile! at com.unciv.logic.map.mapunit.movement.PathsToTilesWithinTurn.getPathToTile(UnitMovement.kt:797) at com.unciv.logic.map.mapunit.movement.UnitMovement.moveToTile(UnitMovement.kt:399) at com.unciv.logic.map.mapunit.movement.UnitMovement.moveToTile$default(UnitMovement.kt:364) at com.unciv.logic.automation.unit.AirUnitAutomation.tryMoveToCitiesToAerialAttackFrom(AirUnitAutomation.kt:73) at com.unciv.logic.automation.unit.AirUnitAutomation.tryRelocateMissileToNearbyAttackableCities(AirUnitAutomation.kt:177) at com.unciv.logic.automation.unit.AirUnitAutomation.automateNukes(AirUnitAutomation.kt:92) at com.unciv.logic.automation.unit.UnitAutomation.automateUnitMoves(UnitAutomation.kt:184) at com.unciv.logic.automation.civilization.NextTurnAutomation.automateUnits(NextTurnAutomation.kt:339) at com.unciv.logic.automation.civilization.NextTurnAutomation.automateCivMoves(NextTurnAutomation.kt:68) at com.unciv.logic.civilization.managers.TurnManager.automateTurn(TurnManager.kt:327) at com.unciv.logic.GameInfo.nextTurn(GameInfo.kt:376) at com.unciv.ui.screens.worldscreen.WorldScreen$nextTurn$1.invokeSuspend(WorldScreen.kt:602) at com.unciv.ui.screens.worldscreen.WorldScreen$nextTurn$1.invoke(Unknown Source:8) at com.unciv.ui.screens.worldscreen.WorldScreen$nextTurn$1.invoke(Unknown Source:4) at com.unciv.utils.ConcurrencyKt$launchCrashHandling$1.invokeSuspend(Concurrency.kt:87) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at com.unciv.utils.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:173) at com.unciv.utils.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:173) at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandling$1.invoke(CrashHandlingExtensions.kt:17) at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33) at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandlingUnit$1.invoke(CrashHandlingExtensions.kt:33) at com.unciv.utils.CrashHandlingDispatcher.dispatch$lambda$0(Concurrency.kt:173) at com.unciv.utils.CrashHandlingDispatcher.$r8$lambda$GFMOlD6QMgmLfgwAvPAW33Ob6HE(Unknown Source:0) at com.unciv.utils.CrashHandlingDispatcher$$ExternalSyntheticLambda0.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) ``` **Save Mods:** ``` [DeCiv Redux] ```Expected behavior The turn would go to the next
Screenshots If applicable, add screenshots to help explain your problem.
Additional context I was able to get around the game crashing for at least two turns by getting rid of all automated units besides workers and disbanding all most all of my work boats then the bug occured again