[1.3b57]Renaming Different Types of Sight

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

Post Reply
daeg
Kobold
Posts: 4
Joined: Fri Sep 18, 2009 3:43 pm

[1.3b57]Renaming Different Types of Sight

Post by daeg »

Edit:
Step-by-step:

1. Create a token
2. Edit token, check "Has sight"
3. Select an option from the dropdown, ex. Normal
4. Goto Edit->Campaign Properties->Sight
5. Change the "Normal: circle" entry to "Normal1: circle"
6. Hover the mouse cursor over the created token and errors will occur.

This will also occur when dragging and dropping a token from an existing campaign that has a type of sight not listed in the current campaign.

Suggestion to fix is to check if the variable held in the token's dropdown box is listed in the Campaign properties sight tab and if not, to default to the first sight listed in the Campaign properties sight tab.

java.lang.NullPointerException
at net.rptools.maptool.client.ui.zone.ZoneView.getVisibleArea(ZoneView.java:224)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderVisionOverlay(ZoneRenderer.java:995)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderGMVisionOverlay(ZoneRenderer.java:989)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:745)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:573)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
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.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at net.rptools.maptool.client.swing.GenericDialog.showDialog(GenericDialog.java:86)
at net.rptools.maptool.client.ui.token.EditTokenDialog.showDialog(EditTokenDialog.java:140)
at net.rptools.maptool.client.ui.AbstractTokenPopupMenu$ShowPropertiesDialogAction.actionPerformed(AbstractTokenPopupMenu.java:812)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at de.muntjak.tinylookandfeel.TinyMenuItemUI.doClick(TinyMenuItemUI.java:571)
at de.muntjak.tinylookandfeel.TinyMenuItemUI$MouseInputHandler.mouseReleased(TinyMenuItemUI.java:421)
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)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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)
Last edited by daeg on Sat Sep 19, 2009 10:07 am, edited 1 time in total.

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

Re: [1.3b57]Renaming Different Types of Sight

Post by Azhrei »

Welcome to RPTools, daeg!

I'm sorry your first post had to be a bug report, though. :(

Thank you for the trace log -- that will significantly help in narrowing down the problem.

daeg
Kobold
Posts: 4
Joined: Fri Sep 18, 2009 3:43 pm

Re: [1.3b57]Renaming Different Types of Sight

Post by daeg »

Oh don't worry about it, I fell in love with the program a minute into loading it up! After re-reading my report it does seem a bit confusing so if clarification is needed I'll try to explain again.

gramathy
Kobold
Posts: 9
Joined: Mon May 25, 2009 6:03 am

Re: [1.3b57]Renaming Different Types of Sight

Post by gramathy »

Turns out this was two issues - one would break if you changed a token's sight option there was no existence check), and one would break if you changed the name of the default sight assignment (it would try to default after the existence check, but would break because the default didn't exist as an option either.)

So it started as one issue that was hiding a different issue as well. It's lucky you used "normal" as the option you were changing, if you hadn't I might not have caught the problem with the default option breaking.

I submitted a patch for both, should be fixed in the next update, and the second case will auto-default to the first item in the list. In the future allowing a user to pick their own default is probably preferable to current behavior.

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

Re: [1.3b57]Renaming Different Types of Sight

Post by trevor »

Patch applied for 1.3b60
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”