Innoxia / liliths-throne-public

Public repository for Lilith's Throne. (18+)
Other
484 stars 434 forks source link

Clover Clamps have a chance to generate NullPointerException in any Threesome scene #906

Open Zsar opened 6 years ago

Zsar commented 6 years ago

Game version: 0.2.10.2 Java version: 1.8u161 OS: Win10E 10.0.17134

Steps to reproduce:

  1. acquire:
    • 2x Clover Clamps
    • 1x Slave
  2. make Slave follow you
  3. equip Clover Clamps both on yourself and Slave
  4. start any Threesome scene with a Dominion Backalley attacker
    • secondary issue: both NPCs will be reluctant to unequip and shift items in general
    • the Exception will usually happen within the first few turns
    • most (sometimes all) entries of all Actions menues will be unresponsive
    • often the options in the Sex Actions menu will be shuffled and/or incomplete

The issue seems to be much more rare, if only either PC or Slave wear Clover Clamps - so far I have been unable to produce it with such a setup.

So far this setup has generated one of the two stack traces below;

Zsar commented 6 years ago
java.lang.NullPointerException
    at com.lilithsthrone.game.sex.Sex.manageClothingToAccessCoverableArea(Sex.java:2885)
    at com.lilithsthrone.game.sex.managers.SexManagerDefault.getPartnerSexAction(SexManagerDefault.java:283)
    at com.lilithsthrone.game.sex.Sex.endSexTurn(Sex.java:1321)
    at com.lilithsthrone.game.dialogue.utils.InventoryDialogue$6$33.effects(InventoryDialogue.java:5355)
    at com.lilithsthrone.game.dialogue.responses.Response.applyEffects(Response.java:184)
    at com.lilithsthrone.game.Game.setContent(Game.java:1610)
    at com.lilithsthrone.controller.eventListeners.SetContentEventListener.handleEvent(SetContentEventListener.java:36)
    at com.sun.webkit.dom.EventListenerImpl.fwkHandleEvent(EventListenerImpl.java:129)
    at com.sun.webkit.WebPage.twkProcessMouseEvent(Native Method)
    at com.sun.webkit.WebPage.dispatchMouseEvent(WebPage.java:807)
    at javafx.scene.web.WebView.processMouseEvent(WebView.java:1045)
    at javafx.scene.web.WebView.lambda$registerEventHandlers$32(WebView.java:1168)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
    at com.sun.glass.ui.View.notifyMouse(View.java:937)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
    at java.lang.Thread.run(Thread.java:748)
Zsar commented 6 years ago
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
    at com.lilithsthrone.game.sex.Sex.addLubrication(Sex.java:2411)
    at com.lilithsthrone.game.sex.Sex.addLubrication(Sex.java:2382)
    at com.lilithsthrone.game.character.GameCharacter.ingestFluid(GameCharacter.java:10694)
    at com.lilithsthrone.game.character.npc.NPC.calculateGenericSexEffects(NPC.java:2276)
    at com.lilithsthrone.game.occupantManagement.OccupancyUtil.generateEvents(OccupancyUtil.java:631)
    at com.lilithsthrone.game.occupantManagement.OccupancyUtil.performHourlyUpdate(OccupancyUtil.java:295)
    at com.lilithsthrone.game.Game.endTurn(Game.java:1210)
    at com.lilithsthrone.game.Game.endTurn(Game.java:1165)
    at com.lilithsthrone.game.Game.setContent(Game.java:1979)
    at com.lilithsthrone.game.Game.setContent(Game.java:2049)
    at com.lilithsthrone.game.Game.setContent(Game.java:1617)
    at com.lilithsthrone.controller.MainController.processResponse(MainController.java:968)
    at com.lilithsthrone.controller.MainController.access$5(MainController.java:966)
    at com.lilithsthrone.controller.MainController$2.handle(MainController.java:908)
    at com.lilithsthrone.controller.MainController$2.handle(MainController.java:1)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:282)
    at com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
    at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:223)
    at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$KeyHandler.process(Scene.java:3964)
    at javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3910)
    at javafx.scene.Scene.impl_processKeyEvent(Scene.java:2040)
    at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2501)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$352(GlassViewEventHandler.java:248)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
    at com.sun.glass.ui.View.handleKeyEvent(View.java:546)
    at com.sun.glass.ui.View.notifyKey(View.java:966)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
    at java.lang.Thread.run(Thread.java:748)
Zsar commented 6 years ago

Note that, instead of just stubbornly fixing this bug, it might be more sensible to change the very setup of Clover Clamps: Currently, by blocking the chest, they are incompatible with the Open Cup Bra, which ought to be compatible, as far as common sense goes.

It might be more sensible to have other bras block the Nipple slot rather than Clover Clamps block the Chest slot... of course, this will then - again unintuitively - prevent the former from being equipped together with Tape Crosses.

Seeing that the current system necessarily prevents any one of these two sensible combinations, it stands to reason that a design change has to take place, before the issue can be resolved in a sensible manner.

A somewhat easy fix might be to introduce a new item tag "protruding" and change the current blocking mechanism to allow any non-protruding items in a blocked slot, e.g.: