Page 1 of 1

[Bug 1.4] Bug with the drawing tool

Posted: Sun Nov 08, 2015 3:16 am
by satheyo
I've encountered an error when using the free-hand drawing tool on a hexagon map. The error below pops up whenever I attempt to draw using the free-hand tool. The line tool works just fine, I have not tried the other drawing tools yet.
Spoiler
java.lang.NullPointerException
at sun.dc.DuctusRenderingEngine.createStrokedShape(Unknown Source)
at java.awt.BasicStroke.createStrokedShape(Unknown Source)
at net.rptools.maptool.model.drawing.LineSegment.createLineArea(LineSegment.java:66)
at net.rptools.maptool.model.drawing.LineSegment.getArea(LineSegment.java:50)
at net.rptools.maptool.model.drawing.LineSegment.draw(LineSegment.java:76)
at net.rptools.maptool.model.drawing.AbstractDrawing.draw(AbstractDrawing.java:73)
at net.rptools.maptool.client.tool.drawing.AbstractDrawingTool.paintTransformed(AbstractDrawingTool.java:126)
at net.rptools.maptool.client.tool.drawing.AbstractLineTool.paintOverlay(AbstractLineTool.java:125)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:1193)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:707)
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.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$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1300(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
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)

Re: Possible Bug with the drawing tool

Posted: Sun Nov 08, 2015 9:09 am
by Jagged
I think you will need to give us more detail. I have just tried using the freehand drawing tool on both types of hex map and it worked without issue. So I am afraid I cannot duplicate your problem.

Re: Possible Bug with the drawing tool

Posted: Wed Nov 11, 2015 1:03 am
by satheyo
Sorry for taking so long to reply.

I've tried some tests on a new campaign, thinking it might be due to drawing on a b89 campaign which I imported maps from, everything seemed to be going well until I attempted to both left and right click at the same time, at which point the error showed up.
I think you will need to give us more detail. I have just tried using the freehand drawing tool on both types of hex map and it worked without issue. So I am afraid I cannot duplicate your problem.
As for more details, anything specific I should post?

Re: Possible Bug with the drawing tool

Posted: Wed Nov 11, 2015 4:04 am
by Jagged
satheyo wrote:As for more details, anything specific I should post?
Just the steps to reliably recreate the problem. If it is linked to a specific campaign you may need to provide us a link to that as well.

Re: Possible Bug with the drawing tool

Posted: Wed Nov 11, 2015 5:32 am
by satheyo
Alright, it occurs whenever I attempt to move the map by right-clicking while still holding down left-click in the freehand draw tool. It does not appear to be linked to any specific campaign.

Re: Possible Bug with the drawing tool

Posted: Wed Nov 11, 2015 7:00 am
by aliasmask
satheyo wrote:Alright, it occurs whenever I attempt to move the map by right-clicking while still holding down left-click in the freehand draw tool. It does not appear to be linked to any specific campaign.
Yep, using the freehand causes it, but if I switch to the line tool and do it I get a different error and it locks up MapTool.
Spoiler

Code: Select all

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at net.rptools.maptool.model.drawing.LineSegment.getBounds(LineSegment.java:94)
	at net.rptools.maptool.client.ui.zone.PartitionedDrawableRenderer.createChunk(PartitionedDrawableRenderer.java:206)
	at net.rptools.maptool.client.ui.zone.PartitionedDrawableRenderer.renderDrawables(PartitionedDrawableRenderer.java:115)
	at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderDrawableOverlay(ZoneRenderer.java:1772)
	at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:1099)
	at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:707)
	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.paintToOffscreen(Unknown Source)
	at javax.swing.BufferStrategyPaintManager.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$4.run(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$1200(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
	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)
I then closed MT and reopened. I then drew a couple of shapes using the straight line tool first then tried causing the error and it didn't happen. I then went back to the freehand tool and caused the error. The error was constant from there but only using the freehand and it didn't lock up MT like the last time.

Re: [Bug 1.4] Bug with the drawing tool

Posted: Tue Jul 04, 2017 10:07 pm
by satheyo
Update
I've found out that it is not the newest maptool that is causing this, it is Java 8. I found this out while using b87 (working on a map for a GM that only uses b87) where I had my maptools set to use java 8, after using the drawing tool and attempting to right-click and drag to move the screen but keep the drawing open, the error occurred again.
Using b87 or b89 when opened with java 7 or 6 does not cause this issue; I have not tested it with the newest versions.

Error code listed below
Spoiler
java.lang.NullPointerException
at sun.dc.DuctusRenderingEngine.createStrokedShape(Unknown Source)
at java.awt.BasicStroke.createStrokedShape(Unknown Source)
at net.rptools.maptool.model.drawing.LineSegment.createLineArea(LineSegment.java:65)
at net.rptools.maptool.model.drawing.LineSegment.getArea(LineSegment.java:49)
at net.rptools.maptool.model.drawing.LineSegment.draw(LineSegment.java:75)
at net.rptools.maptool.model.drawing.AbstractDrawing.draw(AbstractDrawing.java:72)
at net.rptools.maptool.client.tool.drawing.AbstractDrawingTool.paintTransformed(AbstractDrawingTool.java:76)
at net.rptools.maptool.client.tool.drawing.AbstractLineTool.paintOverlay(AbstractLineTool.java:124)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:1134)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:680)
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.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$4.run(Unknown Source)
at javax.swing.RepaintManager$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.access$1200(Unknown Source)
at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:38)
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)

Re: [Bug 1.4] Bug with the drawing tool

Posted: Thu Jul 06, 2017 6:22 pm
by Jagged
Wow! Something of a necro post :)

I seem to remember looking into this while working on some of the 1.4 stuff. I don't think that has the bug.

As for using Java8 with B87, I don't think any of the 1.3 builds work with java 8

Re: [Bug 1.4] Bug with the drawing tool

Posted: Thu Jul 06, 2017 9:08 pm
by paulstrait
This definitely still happens with 1.4.