yairm210 / Unciv

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

Game crashes when generating a map with a large number of provinces on PC #12229

Closed Jaba583 closed 1 day ago

Jaba583 commented 1 day ago

Is there an existing issue for this?

Game Version

4.13.8

Describe the bug

I went into the map editor, wrote down the height and width of the map 450x257, there were no mods, it took a long time to load and crashed

Steps to Reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

Screenshots

No response

Link to save file

No response

Operating System

Android

Additional Information

Platform: Desktop Version: 4.13.8-patch1 (Build 1 049) Rulesets: [Unciv Vanilla Music Pack, Civ V - Vanilla, RekMOD, Tech Stopper WW2, temp-388f727, Tech Stopper WW1, Community Maps, 3rd and 4th Unique Component, Project All Slavs, Civ6 Tileset, Terrain MOD create pull request patch, Tech Stopper Renaissance , Tech Stopper Medieval, Playable Barbarians, rebalansMOD, Civ V - Gods & Kings, Ancient Greece, Tech Stopper Classical, Tech Stopper Industrial, Difficulty_Sandbox] Last Screen: com.unciv.ui.screens.mapeditorscreen.MapEditorScreen


OS: Windows 10 Windows 10 Home Single Language Version 22H2 (Build 19045) Java: Eclipse Adoptium Temurin-11.0.24+8 Max Memory: 1024 MB System default encoding: windows-1251


Message:

java.lang.OutOfMemoryError: Java heap space
    at com.badlogic.gdx.scenes.scene2d.Actor.<init>(Actor.java:60)
    at com.badlogic.gdx.scenes.scene2d.ui.Widget.<init>(Widget.java:35)
    at com.badlogic.gdx.scenes.scene2d.ui.Image.<init>(Image.java:82)
    at com.badlogic.gdx.scenes.scene2d.ui.Image.<init>(Image.java:72)
    at com.unciv.ui.images.ImageWithCustomSize.<init>(ImageWithCustomSize.kt:15)
    at com.unciv.ui.images.ImageGetter.getImage(ImageGetter.kt:215)
    at com.unciv.ui.components.tilegroups.layers.TileLayerOverlay.<init>(TileLayerOverlay.kt:18)
    at com.unciv.ui.components.tilegroups.TileGroup.<init>(TileGroup.kt:52)
    at com.unciv.ui.components.tilegroups.TileGroup.<init>(TileGroup.kt:21)
    at com.unciv.ui.screens.mapeditorscreen.EditorMapHolder.addTiles(EditorMapHolder.kt:75)
    at com.unciv.ui.screens.mapeditorscreen.EditorMapHolder.<init>(EditorMapHolder.kt:46)
    at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.newMapHolder(MapEditorScreen.kt:185)
    at com.unciv.ui.screens.mapeditorscreen.MapEditorScreen.loadMap(MapEditorScreen.kt:223)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.generate$freshMapCompleted(MapEditorGenerateTab.kt:94)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab.access$generate$freshMapCompleted(MapEditorGenerateTab.kt:36)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$2.invokeSuspend(MapEditorGenerateTab.kt:131)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$2.invoke(MapEditorGenerateTab.kt)
    at com.unciv.ui.screens.mapeditorscreen.tabs.MapEditorGenerateTab$generate$2$2.invoke(MapEditorGenerateTab.kt)
    at com.unciv.utils.ConcurrencyKt$launchCrashHandling$1.invokeSuspend(Concurrency.kt:89)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:190)
    at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:190)
    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.Dispatchers$CrashHandlingDispatcher.dispatch$lambda$0(Concurrency.kt:190)
    at com.unciv.utils.Dispatchers$CrashHandlingDispatcher$$Lambda$86/0x000000010017a840.run(Unknown Source)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:209)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:167)
    at com.unciv.app.desktop.HardenGdxAudio.<init>(HardenGdxAudio.kt:54)
    at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:104)
Ooooscar commented 1 day ago

It's basically already written on your error message: java.lang.OutOfMemoryError: Java heap space... You need a more powerful device :(

yairm210 commented 1 day ago

Yeah, that's a ridonkulous map size That is definitely something we do not support