yairm210 / Unciv

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

Creating Map Crash #9658

Closed Schoenios closed 6 months ago

Schoenios commented 1 year ago

Platform: Android Version: 4.7.2 (Build 881) Rulesets: [Civ V - Gods & Kings, Medieval Civilizations, Community Maps, More Luxuries, Civ V - Vanilla] Last Screen: com.unciv.ui.screens.mapeditorscreen.MapEditorScreen


Device Model: SM-A105FN API Level: 30


Message:

java.lang.IllegalStateException: TileMap.setTransients called on existing tileMatrix of different size
    at com.unciv.logic.map.TileMap.setTransients(TileMap.kt:437)
    at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.newMapHolder(MapEditorScreen.kt:177)
    at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.loadMap(MapEditorScreen.kt:218)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.generate$freshMapCompleted(MapEditorGenerateTab.kt:104)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.access$generate$freshMapCompleted(MapEditorGenerateTab.kt:36)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$1.invokeSuspend(MapEditorGenerateTab.kt:129)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$1.invoke(Unknown Source:8)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$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:106)
    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 com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:467)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1591)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1286)
SomeTroglodyte commented 1 year ago

Steps? What did you click to get there? Generate Landmass, change size, generate Landmass again? I thought I had code for that, but it might have regressed, as have other aspects of the editor as it seems....

Schoenios commented 1 year ago

First I clicked on "Generate", then on "To new map", first on "Create on map". After that I got the error message.

Sincerely L. Schönwälder

SomeTroglodyte @.***> schrieb am So., 25. Juni 2023, 02:16:

Steps? What did you click to get there? Generate Landmass, change size, generate Landmass again? I thought I had code for that, but it might have regressed, as have other aspects of the editor as it seems....

— Reply to this email directly, view it on GitHub https://github.com/yairm210/Unciv/issues/9658#issuecomment-1605787823, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAPWGUUIUABOCWLVA27HYILXM57PLANCNFSM6AAAAAAZSVPA7U . You are receiving this because you authored the thread.Message ID: @.***>

SomeTroglodyte commented 1 year ago

No, in that case I cannot reproduce.

Which is a pity - all that code mentioned in the stacktrace, including throwing that "tileMatrix of different size" guard, was originally mine as far as I can remember.

There must be some specific setting that's different. Maybe because map editor inherits map options from the new game screen? What are the settings on your side - do you see anything differing from defaults, including on the mods page? (And: can you still reproduce?)

Caballero-Arepa commented 1 year ago

I'm having this too

Steps I took: Create new map - Rectangular - Empty - Custom Size (any, in my case 57x88) - Create - Crash

Details

**Platform:** Desktop **Version:** 4.7.5-patch1 (Build 885) **Rulesets:** [New Building Icons, The Undead, RekMOD, Brave New World, Iron and Blood, Historica, Medieval Civilizations, DeCiv Redux, ph bonifacio unciv, Extra Buildings, Leader Mission, New minimal, Star Wars for Alpha Frontier, Community Civs, More Luxuries, Difficulty_Sandbox, Civ V - Vanilla, FantasyHex UI, Civ6 mod, Fire Emblem Civilizations, Epic of Fantasy, Alpha Frontier, Unciv IV mod, Ukraine Mod, Ancient Civilizations, Civ V - Gods & Kings, Latam_Civs Beta, Maid Empire, The Great Unciv Rework, Fantasia] **Last Screen:** `com.unciv.ui.screens.mapeditorscreen.MapEditorScreen` -------------------------------- OS: Windows 10 Java: Oracle Corporation 25.232-b09 Max Memory: 910 MB -------------------------------- **Message:** ``` java.lang.IllegalStateException: TileMap.setTransients called on existing tileMatrix of different size at com.unciv.logic.map.TileMap.setTransients(TileMap.kt:437) at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.newMapHolder(MapEditorScreen.kt:177) at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.loadMap(MapEditorScreen.kt:218) at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.generate$freshMapCompleted(MapEditorGenerateTab.kt:104) at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.access$generate$freshMapCompleted(MapEditorGenerateTab.kt:36) at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$1.invokeSuspend(MapEditorGenerateTab.kt:129) at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$1.invoke(MapEditorGenerateTab.kt) at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$1.invoke(MapEditorGenerateTab.kt) 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:106) 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.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:208) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:166) at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:80) ```

SomeTroglodyte commented 1 year ago

Ah - the secret is you have to do it twice in succession with different sizes? No doesn't crash reliably either...

SomeTroglodyte commented 1 year ago

I could repro this once but now I can twist and turn and still unable to provoke that crash.

So if any of you can still repro this, please comment with:

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

Caballero-Arepa commented 6 months ago

This was fixed recently, no?

SeventhM commented 6 months ago

This was fixed recently, no?

If you're saying this was fixed, then I'm closing unless someone says otherwise