NullPointerException when using removeFromInitiative()
Posted: Thu Jun 08, 2017 12:07 pm
Hi all!
I'm working on a Feng Shui 2 framework that takes a different view of initiative. Each time your character acts, your initiative decreases. My attack macro decreases the attacker's initiative, then if they KO the target it removes the target from the initiative list. Finally, at the end it sorts the initiative list. If the KO macro removes the token from the initiative list (removeFromInitiative()) and the macro is on a library token, then I get an exception (stack trace below) when the attacker's initiative is lower than the target's initiative.
I tried creating a simple test case campaign file to show this more clearly, but didn't get the exception. I can provide my campaign file if that will help, the problem shows up regularly there. This problem occurs on MapTools 1.4.0.5.
Also, while searching the forum I found this thread which seems to be very similar. http://forums.rptools.net/viewtopic.php ... ve#p136903
While I'm here I just want to say "Thank you!" for all of the effort on MapTool over the years. I really love the flexibility it provides and hope it continues to develop and get even stronger.
-------------------------
java.lang.NullPointerException
at net.rptools.maptool.client.ClientMethodHandler$1.run(ClientMethodHandler.java:506)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
I'm working on a Feng Shui 2 framework that takes a different view of initiative. Each time your character acts, your initiative decreases. My attack macro decreases the attacker's initiative, then if they KO the target it removes the target from the initiative list. Finally, at the end it sorts the initiative list. If the KO macro removes the token from the initiative list (removeFromInitiative()) and the macro is on a library token, then I get an exception (stack trace below) when the attacker's initiative is lower than the target's initiative.
I tried creating a simple test case campaign file to show this more clearly, but didn't get the exception. I can provide my campaign file if that will help, the problem shows up regularly there. This problem occurs on MapTools 1.4.0.5.
Also, while searching the forum I found this thread which seems to be very similar. http://forums.rptools.net/viewtopic.php ... ve#p136903
While I'm here I just want to say "Thank you!" for all of the effort on MapTool over the years. I really love the flexibility it provides and hope it continues to develop and get even stronger.
-------------------------
java.lang.NullPointerException
at net.rptools.maptool.client.ClientMethodHandler$1.run(ClientMethodHandler.java:506)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)