Slay the Spire

Slay the Spire

Corrupt the Spire
Regi 29 Dec, 2021 @ 8:39pm
Game crash with "More Choices" mod (I believe)
The crash happened as I selected one of the option in a corrupted campfire. I think the option was "corrupt" or something like that, I don't really remember. It was the only option available to me, and the one in the top left. It seem to be related to the Zylophone relic in Hubris mod, but maybe I'm wrong. Also not sure if I'm supposed to report this crash to you or to the Hubris dev (assuming I'm correct in my assessment).

Modlist:
Version Info:
- Java version (1.8.0_144)
- Slay the Spire (12-22-2020)
- ModTheSpire (3.23.4)
Mod list:
- basemod (5.35.1)
- stslib (1.24.1)
- AchievementEnabler (1.0.0)
- CapriCore (1.2.8)
- coloredmap (2.4.1)
- coloredpowertips (2.3.0)
- StSModEnergizedSpire (1.9.2)
- hubris (0.24.8)
- infinitespire (0.23.0)
- KinomotoSakuraMod (2.2.210123)
- Koishi (2.1.0)
- TS05_Marisa (0.15.4)
- permNeow (1)
- RandomCharacterButton (1.1.0)
- RandomCharacterMod (1.0.1)
- RelicStats (1.2.2)
- reliquary (0.4)
- Remilia_Modoki (0.0.9)
- ReplayTheSpireMod (1.6.7)
- RobotSpaceExplorer (1.0.8)
- luka_mod (1.2.6)
- gatherermod (1.0.7)
- MokouMod (1.3)
- TheMarked:TheMarked (1.2.10)
- BlackRuseMod (0.9.4)
- TheSwordswoman (1.5)
- WarShipGirlsRmod (1.1)
- youkari (1.1.5)
- YuriMod (1.7.0)
- OptimizeTheSpire (1.1.0)
- alteregomod (1.0.4)
- eventfilter (1.1.0)
- VUPShionMod (2.0.1)
- PruneThePool (1.0.0)
- PatchouliMod (0.9.10.6)
- MoreChoices (1.0.2)
- Sakuya_mod (1.0.5)
- Akemi_Homura (1.10.8)
- aigisMod (3.0.0)
- CorruptTheSpire (1.0.2)


Crashlog:
04:31:32.314 ERROR core.CardCrawlGame> Exception caught
java.lang.NullPointerException: null
at com.evacipated.cardcrawl.mod.hubris.patches.ZylophonePatch$AvoidIfNoAppropriateCards.Postfix(ZylophonePatch.java:114) ~[Hubris.jar:?]
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomRelicKey(AbstractDungeon.java:1040) ~[?:?]
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomRelic(AbstractDungeon.java:899) ~[?:?]
at moreChoices.MoreChoices.setupPotionsAndRelicsRewardList(MoreChoices.java:442) ~[MoreChoices.jar:?]
at moreChoices.patches.ButtonPatches$UpdateButtons.PostFix(ButtonPatches.java:163) ~[MoreChoices.jar:?]
at com.megacrit.cardcrawl.screens.CombatRewardScreen.update(CombatRewardScreen.java:58) ~[?:?]
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2576) ~[?:?]
at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:871) ~[?:?]
at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:419) [?:?]
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225) [?:?]
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126) [?:?]


Cause:
java.lang.NullPointerException
at com.evacipated.cardcrawl.mod.hubris.patches.ZylophonePatch$AvoidIfNoAppropriateCards.Postfix(ZylophonePatch.java:114)
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomRelicKey(AbstractDungeon.java:1040)
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomRelic(AbstractDungeon.java:899)
at moreChoices.MoreChoices.setupPotionsAndRelicsRewardList(MoreChoices.java:442)
at moreChoices.patches.ButtonPatches$UpdateButtons.PostFix(ButtonPatches.java:163)
at com.megacrit.cardcrawl.screens.CombatRewardScreen.update(CombatRewardScreen.java:58)
at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2576)
at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:871)
at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:419)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)



EDIT
My bad, it seem I didn't properly read. Looks like it's an issue with More Choices, not Hubris. I'll just have to disable it if I want to play with your mod.
Last edited by Regi; 29 Dec, 2021 @ 8:43pm
< >
Showing 1-1 of 1 comments
modargo  [developer] 30 Dec, 2021 @ 5:26am 
Looks to me like this is caused by More Choices not handling special relics in rewards (e.g., relics that aren't Common, Uncommon, or Rare, like what Corrupt the Spire has or what you get from events). In the code, these are defined as RelicTier.Special.

Specifically, More Choices tries to generate random relics using code that doesn't know how to handle Special relics. From my testing, without Hubris running it will just give you Circlets as the alternate relic options, but with Hubris running it will crash. That's because Hubris adds a check that happens after you generate a random relic. But it's the same underlying problem (random relic code being called for a case it doesn't properly handle), just expressed in different ways.

I think the cleanest fix would be for the More Choices mod to have code that handled special relics in rewards, perhaps by skipping them entirely and not generating alternate relic choices. Still, I see a fairly easy way to avoid the crash by changing Corrupt the Spire code slightly, so I'll probably do that in the next small code update I make. Even if the root problem is elsewhere, avoiding crashes is good.

Thanks for reporting this and taking a bit of time to work out what was causing it!
< >
Showing 1-1 of 1 comments
Per page: 1530 50