Latest SVN - NPE when trying to Edit Token

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

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

Latest SVN - NPE when trying to Edit Token

Post by Rumble »

I'm running into an NPE when I try to edit a token by double-clicking. I was messing with the EditTokenDialog.java class, so I first thought that might be it, but the error persisted after reverting to the head version from SVN. Here's the specific error:

Code: Select all

java.lang.NullPointerException
	at net.rptools.maptool.client.ui.token.EditTokenDialog.updatePropertyTypeCombo(EditTokenDialog.java:311)
	at net.rptools.maptool.client.ui.token.EditTokenDialog.bind(EditTokenDialog.java:149)
	at net.rptools.maptool.client.ui.token.EditTokenDialog.showDialog(EditTokenDialog.java:136)
	at net.rptools.maptool.client.tool.PointerTool.mousePressed(PointerTool.java:417)
	at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
This occurs when I try to double-click on a token to edit it. As mentioned, this is using the latest checkout from the source, version 5259 of EditTokenDialog.java.

Thoughts? I figure there's something in the midst of changing, but I don't know what it is.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Latest SVN - NPE when trying to Edit Token

Post by jfrazierjr »

Is this a new token, or one that already exists? It might be the restriction Az put in for duplicate property names that differ only in case causing an issue. Of course, I have no idea and am just taking a guess.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

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

Re: Latest SVN - NPE when trying to Edit Token

Post by Rumble »

jfrazierjr wrote:Is this a new token, or one that already exists? It might be the restriction Az put in for duplicate property names that differ only in case causing an issue. Of course, I have no idea and am just taking a guess.
New token, just dragged on to the map (in the default setup, too).

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Latest SVN - NPE when trying to Edit Token

Post by Azhrei »

That error is apparently caused by MapTool not being able to find the propertyTypeCombo component in the Abeille form for the token editor dialog.

I can't see any reason why your form might be messed up.

As things stand right now, the code checked into SVN does not use XML forms -- those forms do have a bug in which components cannot be found byName within the form. (You can verify this in your code by looking at line 110 of net.rptools.maptool.client.ui.token.EditTokenDialog. It should not end with .xml.)

I will make a note to try this when I next do a MapTool test. Does this problem persist even in an empty campaign?

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

Re: Latest SVN - NPE when trying to Edit Token

Post by Rumble »

Azhrei wrote:That error is apparently caused by MapTool not being able to find the propertyTypeCombo component in the Abeille form for the token editor dialog.

I can't see any reason why your form might be messed up.

As things stand right now, the code checked into SVN does not use XML forms -- those forms do have a bug in which components cannot be found byName within the form. (You can verify this in your code by looking at line 110 of net.rptools.maptool.client.ui.token.EditTokenDialog. It should not end with .xml.)

I will make a note to try this when I next do a MapTool test. Does this problem persist even in an empty campaign?
Hm. It was persistent in an empty campaign (in fact, that's where it was cropping up - I was testing something with a blank campaign and a token I'd just dragged in, and it wasn't working). The changes I'd made are trivial, so I'll try to revert everything (I'd looked at the Abeille form in the course of the work I was doing; maybe I accidentally ganked it).

However, it's not happening now - I was working on a different machine, perhaps my checkout there was out of date or something. I can't reproduce it at the moment, so I guess the best I can say is "keep an eye out for it?" Probably had something not synchronized between the repository and my working copy.

Post Reply

Return to “Developer Notes”