[1.3.b59] removeFromInitiative() throws error on clients

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Post Reply
User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

[1.3.b59] removeFromInitiative() throws error on clients

Post by Rumble »

I did not see this elsewhere (well, maybe I did, but I didn't look too hard). When using the macro function removeFromInitiative(), the following error is thrown on connected clients:

Code: Select all

java.lang.NullPointerException
	at net.rptools.maptool.model.InitiativeListModel.isTokenVisible(InitiativeListModel.java:133)
	at net.rptools.maptool.model.InitiativeListModel.getDisplayIndex(InitiativeListModel.java:76)
	at net.rptools.maptool.client.ui.tokenpanel.InitiativePanel$20.run(InitiativePanel.java:342)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
To reproduce:

1. Place a couple tokens on the map. Add them both to initiative.
2. On one token, place a macro with the code [h:removeFromInitiative()]
3. Start server, and connect with another instance
4. On Server instance, open the Init panel, select one token in the initiative window, and remove that token using the macro you wrote in step 2.

REsult: error is thrown on connected clients, but not on the server.

Edit: it's not every time, now that I check again - I think it's either when the token being removed has initiative, or when it's selected in the window. I'm checking the various combinations now.

Edit Again: okay, it appears to happen if you use Wiki: removeFromInitiative() on the token that is selected in the Initiative Window. If so, client machines will throw an error.

jmurrayufo
Cave Troll
Posts: 38
Joined: Mon Apr 27, 2009 5:04 pm

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by jmurrayufo »

I suspect that this bug and this bug are one in the same, although this one has the advantage of a output that i wasn't able to capture. Merge topics?

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by Rumble »

jmurrayufo wrote:I suspect that this bug and this bug are one in the same, although this one has the advantage of a output that i wasn't able to capture. Merge topics?
Could be - seems related. I did not have Lock Movement on (I don't use it usually) but it could definitely be related.

jmurrayufo
Cave Troll
Posts: 38
Joined: Mon Apr 27, 2009 5:04 pm

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by jmurrayufo »

With any luck the lock movement effect from the error that popped up at the end of combat is merely a side effect of what ever caused the initial crash! I'll sit down and see if my error is a duplicate of yours, and if causing that bug also is the cause of the movment issue sometime this weekend.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by jay »

I've found this bug and it will be fixed in the next release.

PS: Thanks for the debug info!

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by Rumble »

jay wrote:I've found this bug and it will be fixed in the next release.
Word.
PS: Thanks for the debug info!
Not a problem. You can actually thank my 8 and 10 year old kids - they were playing D&D with me the other day, all of us huddled around computers, and one of them managed to kill a monster and then they were both saying, "Uh, Dad? Dad, I have a...thing on the screen here."

To which I raised an eyebrow, stroked my beard wisely, and said, "Let's try hitting 'close.'"

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by jay »

Thank them for me. It even helped me find another bug in removing initiative items. So one bug for each kid. :)

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: [1.3.b59] removeFromInitiative() throws error on clients

Post by trevor »

This is in 1.3b60
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”