tetraminus / RiskOfRelics

A mod for slay the spire including: relics, cards, potions, and spaghetti code.
https://www.Tetramin.us
MIT License
3 stars 2 forks source link

Null pointer exception when using trophy hunters tricorn #21

Closed KiNgBiLlYbOb closed 10 months ago

KiNgBiLlYbOb commented 10 months ago

Describe the bug When trying to use tricorn in an elite combat the game crashes and causes a null pointer exception to be thrown in the mod the spire logs. Below is the error thrown. I had also gained the missile launcher and used it in a previous fight

To Reproduce Steps to reproduce the behavior:

  1. Enter elite combat
  2. Right click on Trophy Hunters Tricorn

Expected behavior The elite is executed and the fight ends

Actual Behaviour The game crashes and throws the error shown below

Screenshots Game state when I used the tricorn image

Additional context Add any other context about the problem here. I have 6 other mods on being basemod, StsLib, Minty Spire, Relic Stats and Risk Of Relics. Also being played with the sacrifice Artifact active Error that was thrown

java.lang.NullPointerException
    at riskOfRelics.relics.MissileLauncher.CalcDamage(MissileLauncher.java:49)
    at riskOfRelics.relics.MissileLauncher.getUpdatedDescription(MissileLauncher.java:40)
    at com.megacrit.cardcrawl.relics.AbstractRelic.<init>(AbstractRelic.java:132)
    at basemod.abstracts.CustomRelic.<init>(CustomRelic.java:12)
    at riskOfRelics.relics.BaseRelic.<init>(BaseRelic.java:35)
    at riskOfRelics.relics.equipment.AbstractEquipment.<init>(AbstractEquipment.java:22)
    at riskOfRelics.relics.MissileLauncher.<init>(MissileLauncher.java:30)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at basemod.abstracts.CustomRelic.makeCopy(CustomRelic.java:54)
    at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomNonCampfireRelic(AbstractDungeon.java:920)
    at riskOfRelics.relics.Tricorn.onRightClick(Tricorn.java:48)
    at com.evacipated.cardcrawl.mod.stslib.relics.ClickableRelic.clickUpdate(ClickableRelic.java:38)
    at riskOfRelics.relics.equipment.AbstractEquipment.update(AbstractEquipment.java:180)
    at riskOfRelics.patches.equipment.EQUpdatePatches$UpdateEquipment.Postfix(EQUpdatePatches.java:16)
    at com.megacrit.cardcrawl.core.OverlayMenu.update(OverlayMenu.java:99)
    at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2649)
    at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:876)
    at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:423)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126)

Another null pointer I found while looking through the logs

java.lang.NullPointerException: null
    at riskOfRelics.relics.MissileLauncher.CalcDamage(MissileLauncher.java:49) ~[RiskOfRelics.jar:?]
    at riskOfRelics.relics.MissileLauncher.getUpdatedDescription(MissileLauncher.java:40) ~[RiskOfRelics.jar:?]
    at com.megacrit.cardcrawl.relics.AbstractRelic.<init>(AbstractRelic.java:132) ~[?:?]
    at basemod.abstracts.CustomRelic.<init>(CustomRelic.java:12) ~[BaseMod.jar:?]
    at riskOfRelics.relics.BaseRelic.<init>(BaseRelic.java:35) ~[RiskOfRelics.jar:?]
    at riskOfRelics.relics.equipment.AbstractEquipment.<init>(AbstractEquipment.java:22) ~[RiskOfRelics.jar:?]
    at riskOfRelics.relics.MissileLauncher.<init>(MissileLauncher.java:30) ~[RiskOfRelics.jar:?]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_144]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_144]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_144]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_144]
    at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_144]
    at basemod.abstracts.CustomRelic.makeCopy(CustomRelic.java:54) ~[BaseMod.jar:?]
    at com.megacrit.cardcrawl.dungeons.AbstractDungeon.returnRandomNonCampfireRelic(AbstractDungeon.java:920) ~[?:?]
    at riskOfRelics.relics.Tricorn.onRightClick(Tricorn.java:48) ~[RiskOfRelics.jar:?]
    at com.evacipated.cardcrawl.mod.stslib.relics.ClickableRelic.clickUpdate(ClickableRelic.java:38) ~[StSLib.jar:?]
    at riskOfRelics.relics.equipment.AbstractEquipment.update(AbstractEquipment.java:180) ~[RiskOfRelics.jar:?]
    at riskOfRelics.patches.equipment.EQUpdatePatches$UpdateEquipment.Postfix(EQUpdatePatches.java:16) ~[RiskOfRelics.jar:?]
    at com.megacrit.cardcrawl.core.OverlayMenu.update(OverlayMenu.java:99) ~[?:?]
    at com.megacrit.cardcrawl.dungeons.AbstractDungeon.update(AbstractDungeon.java:2649) ~[?:?]
    at com.megacrit.cardcrawl.core.CardCrawlGame.update(CardCrawlGame.java:876) ~[?:?]
    at com.megacrit.cardcrawl.core.CardCrawlGame.render(CardCrawlGame.java:423) [?:?]
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:225) [?:?]
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:126) [?:?]

SlayTheSpire.log

tetraminus commented 10 months ago

thank you for the extremely thorough report, I've found the issue and it will be fixed soon

tetraminus commented 10 months ago

fixed (probably)

KiNgBiLlYbOb commented 10 months ago

Thank you for fixing it :D Its the software engineer in me. I did try to find the fix but it was late and I wanted to go to bed