yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.53k stars 1.58k forks source link

I cant Next turn #10461

Closed riverajusko closed 12 months ago

riverajusko commented 1 year ago

Platform: Android Version: 4.8.15 (Build 925) Rulesets: [Unciv Religion Plus, Ark s UNCIV Evolved, Civ V - Vanilla, =GeneCiv=, Ark s UNCIV Expansion, Uncivilized Enhancer, Unciv Rebalance Mod Beta, A Religion For Everyone, Ancient Civilizations, Advance Wars Mod, Civ V - Gods & Kings, Warframe Civs, AquaExtension GAK] Last Screen: com.unciv.ui.screens.worldscreen.WorldScreen


Device Model: Infinix X6835B API Level: 33


Message:

java.lang.Exception: Unit Eumycetozoa of Burgess at Tile @(3.0,10.0), Plains, {2} {Coal} can't be put in tile Tile @(4.0,12.0), Lakes, Eumycetozoa - Burgess!
    at com.unciv.logic.map.mapunit.MapUnit.putInTile(MapUnit.kt:720)
    at com.unciv.logic.map.mapunit.movement.UnitMovement.swapMoveToTile(UnitMovement.kt:530)
    at com.unciv.logic.automation.unit.UnitAutomation.trySwapRetreat(UnitAutomation.kt:281)
    at com.unciv.logic.automation.unit.UnitAutomation.automateUnitMoves(UnitAutomation.kt:198)
    at com.unciv.logic.automation.civilization.NextTurnAutomation.automateUnits(NextTurnAutomation.kt:1012)
    at com.unciv.logic.automation.civilization.NextTurnAutomation.automateCivMoves(NextTurnAutomation.kt:88)
    at com.unciv.logic.civilization.managers.TurnManager.automateTurn(TurnManager.kt:327)
    at com.unciv.logic.GameInfo.nextTurn(GameInfo.kt:375)
    at com.unciv.ui.screens.worldscreen.WorldScreen$nextTurn$1.invokeSuspend(WorldScreen.kt:603)
    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:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)

Save Mods:

[=GeneCiv=]

Save Data:

Show Saved Game ```

I can't next turn

SomeTroglodyte commented 1 year ago

trySwapRetreat

10364 - @tuvus you'll find this quicker than me

https://github.com/hachchch/-GeneCiv-

Side note: Maybe we should add a RulesetValidator warning when too many game* texture atlantae exist and point them to the wiki on how to actively distribute textures... (found it - @hachchch hint for you)

The Unit is UnitType "Cell", "movementType": "Land", and Terrains seem unchanged, Lakes are still "type": "Water"... No embarkment allowed but tried by retreat anyway?

That Mod is hilarious. The squeaky 80es-game-style music, the Art throughout, well done. But also in need of results of the discussion about untyped Uniques.

hachchch commented 1 year ago

Is it a problem in geneciv that game.png is larger than 2048,2048? I'm a noob so I don't really understand the Unciv github pages. P.S. It fixed with xy2048,2048 now

SomeTroglodyte commented 1 year ago

Read that link - has something to do with graphic chips, texture loading into them (because even for 2D the 3D engine is used) and so on. Performance impact depends very much on the actual chip, so we give just general guidelines that textures often used close to each other should go into the same atlas. It's by no means certain our distribution is optimal, but we tried.

Wait - larger than? ~Nope~ only a few, one is 6400x100? Waaaait - those aren't done using Unciv itself as packer - you have some with dimensions that aren't a power of 2, and the numbering would also be different. Did your tool not warn that such sizes may not load on all graphic chips? Anyway, not a game breaker, and no chip off my block. Feel free to read up or not, and to think about whether your images have some structure as in which will most frequently be used at the same time... Or not. Having a good grip on your tools may be more important than performance going down the drain on older devices.

tuvus commented 1 year ago

I'll look into it. It would be very nice if you could add the save game. I have seen this type of error before but I thought I had solved them.

tuvus commented 1 year ago

Okay, something must be wrong within the movement.canSwapTo/swapToTile.

if (unit.movement.canUnitSwapTo(swapTile)) { 
    unit.movement.swapMoveToTile(swapTile) <-------
    return true
}

This should not be causing a problem if I directly call a method that is responsible for determining if the other method that is causing problems is valid or not. This might take me a day or two to figure this out.

tuvus commented 1 year ago

Are you still having this problem? If so could you send the save game file? I have ran some simulations on Vanilla G&K but I haven't found anything yet.

yairm210 commented 12 months ago

Closing as researched, inactive and unworkable