yairm210 / Unciv

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

Crash: NullPointerException #9561

Closed marek22k closed 1 year ago

marek22k commented 1 year ago

Platform: Desktop Version: 4.6.18-patch1 (Build 876) Rulesets: [Civ V - Gods & Kings, UnCiv-Great-Farmer, Civ V - Vanilla, UnCiv-Logicians] Last Screen: com.unciv.ui.screens.worldscreen.WorldScreen


OS: Linux (amd64, 6.1.0-1parrot1-amd64) Parrot OS 5.3 (Electro Ara) Java: Eclipse Adoptium Temurin-11.0.19+7 Max Memory: 1024 MB


Message:

java.lang.NullPointerException
    at com.unciv.logic.civilization.Civilization.getEquivalentBuilding(Civilization.kt:497)
    at com.unciv.models.ruleset.Building$getRejectionReasons$1.invokeSuspend(Building.kt:540)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:129)
    at kotlin.sequences.SequencesKt___SequencesKt.none(_Sequences.kt:2130)
    at com.unciv.models.ruleset.Building.isBuildable(Building.kt:644)
    at com.unciv.logic.automation.city.ConstructionAutomation$filterBuildable$1.invoke(ConstructionAutomation.kt:70)
    at com.unciv.logic.automation.city.ConstructionAutomation$filterBuildable$1.invoke(ConstructionAutomation.kt:67)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:171)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at com.unciv.logic.automation.city.ConstructionAutomation.addScienceBuildingChoice(ConstructionAutomation.kt:590)
    at com.unciv.logic.automation.city.ConstructionAutomation.chooseNextConstruction(ConstructionAutomation.kt:83)
    at com.unciv.logic.city.CityConstructions.chooseNextConstruction(CityConstructions.kt:631)
    at com.unciv.logic.civilization.Civilization.addCity(Civilization.kt:777)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActions$getFoundCityAction$foundAction$1.invoke(UnitActions.kt:197)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActions$getFoundCityAction$foundAction$1.invoke(UnitActions.kt:194)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActions$getFoundCityAction$1.invoke(UnitActions.kt:220)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActions$getFoundCityAction$1.invoke(UnitActions.kt:216)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActionsTable$getUnitActionButton$1.invoke(UnitActionsTable.kt:64)
    at com.unciv.ui.screens.worldscreen.unit.actions.UnitActionsTable$getUnitActionButton$1.invoke(UnitActionsTable.kt:63)
    at com.unciv.ui.components.extensions.Scene2dExtensionsKt$onActivation$1.invoke(Scene2dExtensions.kt:194)
    at com.unciv.ui.components.extensions.Scene2dExtensionsKt$onActivation$1.invoke(Scene2dExtensions.kt:192)
    at com.unciv.ui.components.extensions.ActorAttachments.activate(Scene2dExtensions.kt:140)
    at com.unciv.ui.components.extensions.Scene2dExtensionsKt.activate(Scene2dExtensions.kt:183)
    at com.unciv.ui.components.extensions.ActorAttachments$addActivationAction$2.clicked(Scene2dExtensions.kt:151)
    at com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(ClickListener.java:88)
    at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:71)
    at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:355)
    at com.unciv.ui.screens.basescreen.UncivStage.access$touchUp$s80204510(UncivStage.kt:17)
    at com.unciv.ui.screens.basescreen.UncivStage$touchUp$1.invoke(UncivStage.kt:78)
    at com.unciv.ui.screens.basescreen.UncivStage$touchUp$1.invoke(UncivStage.kt:78)
    at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandling$1.invoke(CrashHandlingExtensions.kt:17)
    at com.unciv.ui.screens.basescreen.UncivStage.touchUp(UncivStage.kt:78)
    at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:70)
    at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:378)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
    at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:80)

Save Mods:

[Civ V - Gods & Kings, UnCiv-Logicians]

Save Data:

Show Saved Game ``` H4sIAAAAAAAAAO1dXZPbRpL8KxN8uosTNwYfJAFF3IOkXa10J1k6S7YfNvSAIaEZhEliDiTHmnX4vx9AAiA4RAFdmQ2eN+ywQ9KQA3RWoVFdVVld/evoIc42SboePf91tN6tbuJs9Nx7NppncbSNFz8l27vim238bTt6PvL/Mv2LE4zvo+38zhk9qy8IZtPffssvSh6SZfLPaJvfbzN6/o9fi0++i1ZxfunLKLuJsiTKv3iW325e3Da/5D5dJvMk3hx+yn/9VX7pNtvNy3sUn/7vLt5s30fr6LYYq/gki5fJbf4LJx/epstFvH5xW93sthDhY5zeL+PDB/HmPr8mv+Dksodkvk2zx9P775L15uSTbZQjmkfLF2/Le327X6ZZvPg+vj0oL5f/19H9MnqMs8+P94XEb3araD161tDBu/Q2F/ZEBfu/N9/HmzjK5nfxItfa6MVtlsx3y+0ui0dfTnU02tylu+Xiw328/lh8+vgxmf9cYMxVFv+uFXifpd+SVbJ9LKT4fBdfvY8eo1wn36XrOFfHi10OOml88GO0nqe7h+Ly6qO/rW+X0Xpx/CAfIFk2rnmZ5VNvs4weGp+9iZebZP1zcvzk3V20afzCp8fFOn6sfm551PNku1d+Pp2X6Xw/uQsZvo2ej91no/zKsZ//VlLgChb+11noeuOJ/9Uf+0F4M76J469j33Xd2XweTG5it3htGtPh6s3uJv/oa7pbL5L17avk4clEuU/vd8tq1AOcx6fPeHSzS5bbl/kfxT0KrKOP0TKaH+ZPPlfzW9U3qJ79k2dazvNkWcp6Kt/hZ+/w86T62Tn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Vv468BAA== ```
marek22k commented 1 year ago

It seems the crash is due Requires a [Science] in at least [3] cities unique in a building.

marek22k commented 1 year ago

The example of the unique Example: "Requires a [Culture] in all cities" also created a crash.

yairm210 commented 1 year ago

Well yeah, that's not a building name, makes sense The mod checker should have said so as well

marek22k commented 1 year ago

But on https://yairm210.github.io/Unciv/Modders/Unique-parameters/#buildingfilter it also says that you can specify "Gold" or "Culture" and in the example it also says that. Furthermore, perhaps there should be a warning rather than a crash.

marek22k commented 1 year ago

And no, the mod checker didn't say anything. Screenshot at 2023-06-10 22-24-36

Schoenios commented 1 year ago

Is this a current problem, if so then I have it. I can't even start the game before it crashes.

SomeTroglodyte commented 1 year ago

Is this a current problem, if so then I have it. I can't even start the game before it crashes.

Yes you can. Just don't select any mod. :partying_face: :rofl: :upside_down_face: :zany_face: ... :speak_no_evil:

SomeTroglodyte commented 1 year ago

My two cents - please some other coder brain check and weigh:

Ideas as patch: ```patch Index: core/src/com/unciv/logic/civilization/Civilization.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/core/src/com/unciv/logic/civilization/Civilization.kt b/core/src/com/unciv/logic/civilization/Civilization.kt --- a/core/src/com/unciv/logic/civilization/Civilization.kt (revision 8d2af7af78c64a6eda41812f596a7f071c9dc332) +++ b/core/src/com/unciv/logic/civilization/Civilization.kt (date 1686536501924) @@ -494,6 +494,10 @@ return tech.currentTechnology() == null && cities.isNotEmpty() } + fun getEquivalentBuildingNameForFilter(buildingFilter: String): String = + gameInfo.ruleset.buildings[buildingFilter]?.let { getEquivalentBuilding(it).name } + ?: buildingFilter + fun getEquivalentBuilding(buildingName: String) = getEquivalentBuilding(gameInfo.ruleset.buildings[buildingName]!!) fun getEquivalentBuilding(baseBuilding: Building): Building { if (baseBuilding.replaces != null) Index: core/src/com/unciv/models/ruleset/Building.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt --- a/core/src/com/unciv/models/ruleset/Building.kt (revision 8d2af7af78c64a6eda41812f596a7f071c9dc332) +++ b/core/src/com/unciv/models/ruleset/Building.kt (date 1686538006404) @@ -115,9 +115,10 @@ val isFree = name in city.civ.civConstructions.getFreeBuildings(city.id) if (uniqueTo != null) translatedLines += if (replaces == null) "Unique to [$uniqueTo]".tr() else "Unique to [$uniqueTo], replaces [$replaces]".tr() - val missingUnique = getMatchingUniques(UniqueType.RequiresBuildingInAllCities).firstOrNull() + if (isWonder) translatedLines += "Wonder".tr() if (isNationalWonder) translatedLines += "National Wonder".tr() + if (!isFree) { val availableResources = if (!showAdditionalInfo) emptyMap() else city.civ.getCivResourcesByName() @@ -132,21 +133,26 @@ } // Inefficient in theory. In practice, buildings seem to have only a small handful of uniques. - val missingCities = if (missingUnique != null) - // TODO: Unify with rejection reasons? - city.civ.cities.filterNot { - it.isPuppet + val requiresBuildingMissingInfo = mutableListOf>>() + if (showAdditionalInfo) { + for (missingUnique in getMatchingUniques(UniqueType.RequiresBuildingInAllCities)) { + val missingCities = city.civ.cities.filterNot { + it.isPuppet || it.cityConstructions.containsBuildingOrEquivalent(missingUnique.params[0]) + }.map { it.name } + requiresBuildingMissingInfo.add(missingUnique to missingCities) } - else listOf() + } + if (uniques.isNotEmpty()) { if (replacementTextForUniques != "") translatedLines += replacementTextForUniques.tr() else translatedLines += getUniquesStringsWithoutDisablers( - filterUniques = if (missingCities.isEmpty()) null + filterUniques = if (requiresBuildingMissingInfo.isEmpty()) null else { unique -> !unique.isOfType(UniqueType.RequiresBuildingInAllCities) } // Filter out the "Requires a [] in all cities" unique if any cities are still missing the required building, since in that case the list of cities will be appended at the end. ).map { it.tr() } } + if (!stats.isEmpty()) translatedLines += stats.toString() @@ -165,13 +171,17 @@ if (cityStrength != 0) translatedLines += "{City strength} +$cityStrength".tr() if (cityHealth != 0) translatedLines += "{City health} +$cityHealth".tr() if (maintenance != 0 && !isFree) translatedLines += "{Maintenance cost}: $maintenance {Gold}".tr() - if (showAdditionalInfo && missingCities.isNotEmpty()) { + + if (requiresBuildingMissingInfo.isNotEmpty()) { // Could be red. But IMO that should be done by enabling GDX's ColorMarkupLanguage globally instead of adding a separate label. - translatedLines += "\n" + - "[${city.civ.getEquivalentBuilding(missingUnique!!.params[0])}] required:".tr() + - " " + missingCities.joinToString(", ") { it.name.tr(hideIcons = true) } - // Can't nest square bracket placeholders inside curlies, and don't see any way to define wildcard placeholders. So run translation explicitly on base text. + for ((missingUnique, missingCities) in requiresBuildingMissingInfo) { + val required = city.civ.getEquivalentBuildingNameForFilter(missingUnique.params[0]) + translatedLines += "\n" + "[$required] required:".tr() + + " " + missingCities.joinToString(", ") { it.tr(hideIcons = true) } + // Can't nest square bracket placeholders inside curlies, and don't see any way to define wildcard placeholders. So run translation explicitly on base text. + } } + return translatedLines.joinToString("\n").trim() } @@ -531,15 +541,15 @@ } UniqueType.RequiresBuildingInSomeCities -> { - val buildingName = unique.params[0] + val buildingFilter = unique.params[0] val numberOfCitiesRequired = unique.params[1].toInt() val numberOfCitiesWithBuilding = civ.cities.count { - it.cityConstructions.containsBuildingOrEquivalent(buildingName) + it.cityConstructions.containsBuildingOrEquivalent(buildingFilter) } if (numberOfCitiesWithBuilding < numberOfCitiesRequired) { - val equivalentBuildingName = civ.getEquivalentBuilding(buildingName).name - yield( - // replace with civ-specific building for user + // replace with civ-specific building for user + val equivalentBuildingName = civ.getEquivalentBuildingNameForFilter(buildingFilter) + yield( RejectionReasonType.RequiresBuildingInSomeCities.toInstance( unique.text.fillPlaceholders(equivalentBuildingName, numberOfCitiesRequired.toString()) + " ($numberOfCitiesWithBuilding/$numberOfCitiesRequired)" @@ -548,16 +558,15 @@ } UniqueType.RequiresBuildingInAllCities -> { - val filter = unique.params[0] - if (civ.gameInfo.ruleset.buildings.containsKey(filter) - && civ.cities.any { - !it.isPuppet && !it.cityConstructions.containsBuildingOrEquivalent(unique.params[0]) - } - ) { - yield( - // replace with civ-specific building for user + val buildingFilter = unique.params[0] + if (civ.cities.any { + !it.isPuppet && !it.cityConstructions.containsBuildingOrEquivalent(buildingFilter) + }) { + // replace with civ-specific building for user + val equivalentBuildingName = civ.getEquivalentBuildingNameForFilter(buildingFilter) + yield( RejectionReasonType.RequiresBuildingInAllCities.toInstance( - "Requires a [${civ.getEquivalentBuilding(unique.params[0])}] in all cities" + "Requires a [$equivalentBuildingName] in all cities" ) ) } @@ -728,7 +737,7 @@ replaces -> true else -> { if (uniques.contains(filter)) return true - val stat = Stat.safeValueOf(filter) + val stat = Stat.safeValueOf(filter.removeSuffix(" Building")) if (stat != null && isStatRelated(stat)) return true return false } Index: android/assets/jsons/translations/template.properties IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties --- a/android/assets/jsons/translations/template.properties (revision 8d2af7af78c64a6eda41812f596a7f071c9dc332) +++ b/android/assets/jsons/translations/template.properties (date 1686530344717) @@ -1766,6 +1766,15 @@ Does not need removal of [feature] = Gain a free [building] [cityFilter] = +# Additional buildingFilters +Food Building = +Production Building = +Gold Building = +Happiness Building = +Culture Building = +Science Building = +Faith Building = + # Uniques not found in JSON files Only available after [] turns = Index: core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt (revision 8d2af7af78c64a6eda41812f596a7f071c9dc332) +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt (date 1686529440959) @@ -235,7 +235,10 @@ /** Implemented by [Building.matchesFilter][com.unciv.models.ruleset.Building.matchesFilter] */ BuildingFilter("buildingFilter", "Culture") { private val knownValues = mutableSetOf("All","Building","Buildings","Wonder","Wonders","National Wonder","World Wonder") - .apply { addAll(Stat.names()) } + .apply { + addAll(Stat.names()) + addAll(Stat.names().map { "$it Building" }) + } override fun getErrorSeverity( parameterText: String, ruleset: Ruleset Index: core/src/com/unciv/logic/city/CityConstructions.kt IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt --- a/core/src/com/unciv/logic/city/CityConstructions.kt (revision 8d2af7af78c64a6eda41812f596a7f071c9dc332) +++ b/core/src/com/unciv/logic/city/CityConstructions.kt (date 1686535154973) @@ -227,8 +227,7 @@ internal fun getBuiltBuildings(): Sequence = builtBuildingObjects.asSequence() - fun containsBuildingOrEquivalent(buildingNameOrUnique: String): Boolean = - isBuilt(buildingNameOrUnique) || getBuiltBuildings().any { it.replaces == buildingNameOrUnique || it.hasUnique(buildingNameOrUnique) } + fun containsBuildingOrEquivalent(buildingFilter: String) = getBuiltBuildings().any { it.matchesFilter(buildingFilter) } fun getWorkDone(constructionName: String): Int { return if (inProgressConstructions.containsKey(constructionName)) inProgressConstructions[constructionName]!! ```
Schoenios commented 1 year ago

Is this a current problem, if so then I have it. I can't even start the game before it crashes.

Yes you can. Just don't select any mod. 🥳 🤣 🙃 🤪 ... 🙊

No, it doesn't work at all. On my Android, when I click the game icon, I not only get a black screen for a millisecond, or instead I get the message "Unciv is repeatedly quitting". The problem is that I haven't even been able to get into the game since Sunday.

SomeTroglodyte commented 1 year ago

We've had mods crashing the game on initial load before the main menu appears - means a "mad modder" found ways to combine rules the game really doesn't expect - in that case your only recourse with standard android / user level is to either update the game and be very very lucky or "Clear storage" for the app, losing settings saves maps mods, everything.

Or, use root or adb file access to clear the mods folder and retry which mod is the culprit. Or, try reading logcat for hints what happens. All of that is a bit advanced, however.

Anyway, pretty clearly distinct from what the OP reported.

Schoenios commented 1 year ago

Hello Yarim,

Thank you for your feedback. Clearing memory from the app is out of the question. An update that fixes the problem with "problem" mods would be ideal.

I saw that you see "Per Root" or "Per ADB HACK" as an option. Not really familiar with this, I watched a video ADB HACK to access the "mods folder". My question would be, can one access the ADB without using windows? Anyway, I'll figure out how to access the folder.

Sincerely, L. Schoenwaelder.

SomeTroglodyte @.***> schrieb am Mo., 12. Juni 2023, 18:05:

We've had mods crashing the game on initial load before the main menu appears - means a "mad modder" found ways to combine rules the game really doesn't expect - in that case your only recourse with standard android / user level is to either update the game and be very very lucky or "Clear storage" for the app, losing settings saves maps mods, everything.

Or, use root or adb file access to clear the mods folder and retry which mod is the culprit. Or, try reading logcat for hints what happens. All of that is a bit advanced, however.

Anyway, pretty clearly distinct from what the OP reported.

— Reply to this email directly, view it on GitHub https://github.com/yairm210/Unciv/issues/9561#issuecomment-1587634498, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAPWGUT4MTTMYHTPQH7JEZTXK445DANCNFSM6AAAAAAZB3ST4E . You are receiving this because you commented.Message ID: @.***>

SomeTroglodyte commented 1 year ago

@Schoenios - Can you remember the last Mod you installed perhaps? With luck you remember, and with luck because it was only the one before things went down the drain...

Schoenios commented 1 year ago

hello yarim,

No, I can't remember which mod(s) it was exactly. Except several mods I checked didn't work. Thanks for your feedback, but unfortunately I can't help at this point, the crash was too sudden for that.

SomeTroglodyte @.***> schrieb am Di., 13. Juni 2023, 18:58:

@Schoenios https://github.com/Schoenios - Can you remember the last Mod you installed perhaps? With luck you remember, and with luck because it was only the one before things went down the drain...

— Reply to this email directly, view it on GitHub https://github.com/yairm210/Unciv/issues/9561#issuecomment-1589694825, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAPWGUWQXUR6KCZ3V7SP6UDXLCL3RANCNFSM6AAAAAAZB3ST4E . You are receiving this because you were mentioned.Message ID: @.***>