yairm210 / Unciv

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

Crash when loading mod preview #9435

Closed Caballero-Arepa closed 1 year ago

Caballero-Arepa commented 1 year ago

I don't know why, but when I click in the Mod Manager page, the mod Latin American Civs, the app crashes. Maybe it's because the preview?

I click, then one second later it crashes, but I can see some of the info, but the preview doesn't load in those miliseconds.

Details

**Platform:** Desktop **Version:** 4.6.13 (Build 869) **Rulesets:** [Naciones pa deciv ES, The Undead, Mapping Tools, Victoria II Music, Brave New World, Medieval Civilizations, Bamboo Deciv Expans, Civilization 6 Mod, DeCiv Redux, 3rd and 4th Unique Component, Tech Stopper _Renaissance _, Warfare Expanded Lite, Better ruins Lite, Tech Stopper _Industrial_, Difficulty_Sandbox, More Fauna And Flora, Honor Wonders, Civ5Nations, Tech Stopper _WW2_, Civ style set by Bucketeer, Sheep Meta, Resource Recyclers, Epic of Fantasy, Alpha Frontier, Smoky Skies Redux, Civ V - Gods & Kings, The Barbarians, Fantasia, Warfare Expanded Unciv Bucketeer, capture GP, RekMOD, The raiders, Tech Stopper _WW1_, Community Maps, Thin Bubbly Borders, Barbarian xp farm, Uncivilized Enhancer, DeityPlus Difficulty, Latin American_Civs, Tech Stopper _Medieval_, Star Wars for Alpha Frontier, Community Civs, Only Mod Civilizations, Tech Stopper _Classical_, Civ V - Vanilla, Dreams of Steam, CS Rework, Ancient Civilizations, Naciones pa Unciv ES, Latam_Civs Beta, Closer Cities Distance of 1, Mapping Tools for Unciv] **Last Screen:** `com.unciv.ui.crashhandling.CrashScreen` -------------------------------- OS: Windows 10 Java: Oracle Corporation 25.232-b09 Max Memory: 910 MB -------------------------------- **Message:** ``` java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; at com.unciv.ui.screens.pickerscreens.Github.tryGetPreviewImage(GitHub.kt:263) at com.unciv.ui.screens.pickerscreens.ModManagementScreen$addPreviewImage$1.invokeSuspend(ModManagementScreen.kt:457) at com.unciv.ui.screens.pickerscreens.ModManagementScreen$addPreviewImage$1.invoke(ModManagementScreen.kt) at com.unciv.ui.screens.pickerscreens.ModManagementScreen$addPreviewImage$1.invoke(ModManagementScreen.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 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ```

yairm210 commented 1 year ago

It will no longer crash, but I'm still unsure why this is happening - the error log indicates that the position() function doesn't exist for your java implementation, but this suggests that it should be a standard Java 8 feature What OS are are using? Are you running from a zipped Unciv folder, or directly with the Jar?

Caballero-Arepa commented 1 year ago

I use a Windows 10 laptop

No, the Unciv folder isn't zipped. I just oppen the Aplication file, and when updating, I only download the JAR file. imagen imagen

Caballero-Arepa commented 1 year ago

I don't know if ut happens on mobile, as the update hasn't reached me yet.

Anyways, thank you once again sir.