Modify

Opened 3 weeks ago

Closed 3 weeks ago

#18002 closed defect (fixed)

IAE: negative width at GpxDrawHelper.drawAll if -1 is tried as parameter

Reported by: anonymous Owned by: Don-vip
Priority: normal Milestone: 19.08
Component: Core Version: tested
Keywords: template_report gpx Cc:

Description

What steps will reproduce the problem?

  1. open gpx file from disk
  2. open track drawing pref
  3. set track width to -1

What is the expected result?

Only GPS points are visible with no linking lines

What happens instead?

JOSM displays error

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-07-10 00:52:47 +0200 (Wed, 10 Jul 2019)
Build-Date:2019-07-10 01:30:51
Revision:15238
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15238 en) Linux Ubuntu 16.04.6 LTS
Memory Usage: 974 MB / 7138 MB (853 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 3600x1080, :0.1 1680x1050
Maximum Screen Size: 3600x1080
fonts-noto: fonts-noto:all-20160116-1
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true]

Plugins:
+ OpeningHoursEditor (34977)
+ buildings_tools (34982)
+ geochat (34977)
+ geojson (124)
+ gson (34908)
+ mapdust (35039)
+ measurement (35051)

Last errors/warnings:
- W: Not a single layer for the name 'Ukraine - Orthophotomaps 2012': []
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: Handled by bug report queue: java.lang.IllegalArgumentException: negative width
- E: Handled by bug report queue: java.lang.IllegalArgumentException: negative width


=== REPORTED CRASH DATA ===
MapView#paintLayer:
 - layer: GpxLayer [name=20190801.gpx, associatedFile=null]

Warning issued by: MapView#paintLayer

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (17) of main
java.lang.IllegalArgumentException: negative width
	at java.awt.BasicStroke.<init>(BasicStroke.java:194)
	at java.awt.BasicStroke.<init>(BasicStroke.java:267)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.drawAll(GpxDrawHelper.java:445)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.paint(GpxDrawHelper.java:356)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:469)
	at org.openstreetmap.josm.gui.MapView.drawMapContent(MapView.java:584)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:491)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:290)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	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:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1671)
	at java.awt.Component.setVisible(Component.java:1623)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doBeginTask$3(PleaseWaitProgressMonitor.java:255)
	at org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor.lambda$doInEDT$0(PleaseWaitProgressMonitor.java:113)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	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:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	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)

Attachments (0)

Change History (4)

comment:1 Changed 3 weeks ago by skyper

Keywords: gpx added
Version: tested

comment:2 Changed 3 weeks ago by Don-vip

Milestone: 19.08
Owner: changed from team to Don-vip
Status: newassigned
Summary: error loop if -1 is tried as parameterIAE: negative width at GpxDrawHelper.drawAll if -1 is tried as parameter

comment:3 Changed 3 weeks ago by Don-vip

I think the correct preference for what you want is to set the parameter to 0, not -1.

comment:4 Changed 3 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15282/josm:

fix #18002 - ignore negative width in GpxDrawHelper

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.