Smujb / powered-pixel-dungeon

Powered Pixel Dungeon - a mod of Shattered Pixel Dungeon that reworks many aspects of gameplay.
GNU General Public License v3.0
9 stars 2 forks source link

Pressing "Start new game" in menu right after death produces a crash #10

Closed Similacrest closed 4 years ago

Similacrest commented 4 years ago

See log.

Works fine if I go to main menu and start the game from there.

* UCE HANDLER Library 
* by Rohit Surwase 

* DEVICE INFO 
Brand: Xiaomi
Device: nitrogen
Model: MI MAX 3
Manufacturer: Xiaomi
Product: nitrogen
SDK: 29
Release: 10.0

* APP INFO 
Version: 0.4.4-INDEV
Installed On: 2020-03-28 06:49:49
Updated On: 2020-06-12 21:58:56
Current Date: 2020-06-12 22:13:04

* ERROR LOG 
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.shatteredpixel.yasd.general.actors.hero.Hero.isAlive()' on a null object reference
 at com.shatteredpixel.yasd.general.items.rings.Ring.setKnown(Ring.java:163)
 at com.shatteredpixel.yasd.general.items.rings.Ring.identify(Ring.java:222)
 at com.shatteredpixel.yasd.general.actors.mobs.Statue.newItem(Statue.java:170)
 at com.shatteredpixel.yasd.general.actors.mobs.Statue.<init>(Statue.java:89)
 at com.shatteredpixel.yasd.general.levels.rooms.special.StatueRoom.paintRoom(StatueRoom.java:95)
 at com.shatteredpixel.yasd.general.levels.rooms.LockedRoom.paint(LockedRoom.java:43)
 at com.shatteredpixel.yasd.general.levels.painters.RegularPainter.paint(RegularPainter.java:123)
 at com.shatteredpixel.yasd.general.levels.RegularLevel.build(RegularLevel.java:103)
 at com.shatteredpixel.yasd.general.levels.Level.create(Level.java:571)
 at com.shatteredpixel.yasd.general.Dungeon.newLevel(Dungeon.java:371)
 at com.shatteredpixel.yasd.general.Dungeon.newLevel(Dungeon.java:360)
 at com.shatteredpixel.yasd.general.LevelHandler.doInit(LevelHandler.java:194)
 at com.shatteredpixel.yasd.general.windows.WndStartGame$1.onClick(WndStartGame.java:138)
 at com.watabou.noosa.ui.Button$1.onClick(Button.java:67)
 at com.watabou.noosa.PointerArea.onSignal(PointerArea.java:85)
 at com.watabou.noosa.PointerArea.onSignal(PointerArea.java:33)
 at com.watabou.utils.Signal.dispatch(Signal.java:81)
 at com.watabou.input.PointerEvent.processPointerEvents(PointerEvent.java:99)
 at com.watabou.input.InputHandler.processAllEvents(InputHandler.java:50)
 at com.watabou.noosa.Game.update(Game.java:249)
 at com.watabou.noosa.Game.step(Game.java:218)
 at com.watabou.noosa.Game.render(Game.java:149)
 at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:494)
 at android.opengl.GLSurfaceView$GLThread.guardedRun(Unknown Source:548)
 at android.opengl.GLSurfaceView$GLThread.run(Unknown Source:24)

* END OF LOG *
Smujb commented 4 years ago

This seems to happen only in the case that there is a Statue on floor 1, as the game attempts to identify items without the hero existing yet (floor is built before player). Fixed by https://github.com/Smujb/yet-another-shattered-dungeon/commit/96f236b5d6951080ae9876669791f6c31dd58e47