Closed carriontrooper closed 2 years ago
I managed to reproduce the mods not loading part, but doesn't crash for me. Can you speicify the version of android as well?
Additionally if you include a logcat it would help a lot. ("Logcat reader" on google play) This would require a computer with adb tools in order to give the app permissions to read the log
Since this is a crash to desktop, it circumvents most of our tooling in trying to find the source of the crash. The only way we can investigate this is if you attach Android logs or something of the sort, or manage to reproduce this bug in from a Google Play download, which will send us the crash log itself
Platform: Desktop
Version: Desktop
Rulesets: [The Undead, BetterMountainFH, Civ V - Vanilla, Civ V - Gods & Kings, Medieval Civilizations, Community Maps, 3rd and 4th Unique Component, The Demon World, 5Hex Tileset, Greece plus The Middle East, philosophy mod]
Last Screen: com.unciv.ui.pickerscreens.ModManagementScreen
OS: Windows 10 Windows 10 Home Single Language Version 21H2 (Build 22000) Java: Oracle Corporation 11.0.11+9-b60-7590822 Max Memory: 3920 MB
Message:
java.lang.Exception: Could not parse json of file ModOptions.json
at com.unciv.JsonParser.getFromJson(JsonParser.kt:19)
at com.unciv.ui.pickerscreens.ModManagementScreen.rewriteModOptions(ModManagementScreen.kt:427)
at com.unciv.ui.pickerscreens.ModManagementScreen.addModInfoFromRepoSearch(ModManagementScreen.kt:244)
at com.unciv.ui.pickerscreens.ModManagementScreen.access$addModInfoFromRepoSearch(ModManagementScreen.kt:39)
at com.unciv.ui.pickerscreens.ModManagementScreen$tryDownloadPage$1$2.invoke(ModManagementScreen.kt:207)
at com.unciv.ui.pickerscreens.ModManagementScreen$tryDownloadPage$1$2.invoke(ModManagementScreen.kt:207)
at com.unciv.ui.utils.ExtensionFunctionsKt$wrapCrashHandling$1.invoke(ExtensionFunctions.kt:333)
at com.unciv.ui.utils.ExtensionFunctionsKt$wrapCrashHandlingUnit$1.invoke(ExtensionFunctions.kt:360)
at com.unciv.ui.utils.ExtensionFunctionsKt$wrapCrashHandlingUnit$1.invoke(ExtensionFunctions.kt:360)
at com.unciv.ui.crashhandling.CrashHandlingThreadKt.postCrashHandlingRunnable$lambda-0(CrashHandlingThread.kt:26)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:159)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:116)
at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:61)
Caused by: com.badlogic.gdx.utils.SerializationException: Unable to convert value to required type: [
{
isBaseRuleset: false
}
] (com.unciv.models.ruleset.ModOptions)
at com.badlogic.gdx.utils.Json.readValue(Json.java:1120)
at com.badlogic.gdx.utils.Json.fromJson(Json.java:828)
at com.unciv.JsonParser.getFromJson(JsonParser.kt:17)
... 12 more
Save Mods:
No mod data: kotlin.UninitializedPropertyAccessException: lateinit property gameInfo has not been initialized
Save Data:
Is this the crash log you need? I got it from android studio.
Yes! 👍🏿
The modlist doesn't always update due to rate limits.
E/Unciv Github: [threadpool-daemon-0] Exception during GitHub download | java.io.FileNotFoundException: https://api.github.com/search/repositories?q=topic:unciv-mod&sort:stars&per_page=30&page=1 at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30) at com.unciv.ui.pickerscreens.Github.download(GitHub.kt:43) at com.unciv.ui.pickerscreens.Github.tryGetGithubReposWithTopic(GitHub.kt:233) at com.unciv.ui.pickerscreens.Github.tryGetGithubReposWithTopic$default(GitHub.kt:223) at com.unciv.ui.pickerscreens.ModManagementScreen$tryDownloadPage$1.invokeSuspend(ModManagementScreen.kt:211) at com.unciv.ui.pickerscreens.ModManagementScreen$tryDownloadPage$1.invoke(Unknown Source:8) at com.unciv.ui.pickerscreens.ModManagementScreen$tryDownloadPage$1.invoke(Unknown Source:4) at com.unciv.utils.concurrency.ConcurrencyKt$launchCrashHandling$1.invokeSuspend(Concurrency.kt:83) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at com.unciv.utils.concurrency.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:164) at com.unciv.utils.concurrency.CrashHandlingDispatcher$dispatch$1.invoke(Concurrency.kt:164) 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.concurrency.CrashHandlingDispatcher.dispatch$lambda-0(Concurrency.kt:164) at com.unciv.utils.concurrency.CrashHandlingDispatcher.$r8$lambda$wZEPzfc3ap1lx3h-gfSjlNGDZEw(Unknown Source:0) at com.unciv.utils.concurrency.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) E/Unciv Github: [threadpool-daemon-0] Message from GitHub: {"message":"API rate limit exceeded for INSERT_IP_HERE. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
So the solution is to add proper exception handling when the ModOptions.json
can not be loaded.
And maybe find the mod that put an extra []
around the object.
[
{
isBaseRuleset: false
}
]
Well, found the problem mod, it was Greek and the Middle East mod. Mod dev fixed it, managed to update, and no more crashes in android or pc ver.
I'd keep the issue open. The actual issue hasn't actually been solved without exception handling
Platform Android
Version 4.1.12 patch 1, downloaded from Github
Describe the bug Crash to Desktop when opening mods menu from main menu, sometimes it's immediate, sometimes it takes a while. Can't sort them either, using any kind of sorting option. Right side mods list also doesn't show all mods, as if it's trying to load more but failed. There is no error message.
To Reproduce Steps to reproduce the behavior:
Expected behavior No crash
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.