Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12312 closed defect (fixed)

Error when loading GPX file with single point and track dynamic track coloring

Reported by: Quelbs Owned by: team
Priority: normal Milestone: 16.02
Component: Core Version:
Keywords: gpx color velocity regression Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Start JOSM with a new profile
  2. Activate "Expert mode" in settings
  3. Set Track and point coloring to "Velocity"
  4. Activate "Dynamic color range"
  5. Open GPX with a single point

What is the expected result?

Single point should be shown

What happens instead?

Unexpected exception

This problem does not only occur in "latest" but also in "tested".

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

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1">
  <trk>
    <trkseg>
      <trkpt lat="48.1386" lon="11.573"/>
    </trkseg>
  </trk>
</gpx>
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-01-07 03:14:25 +0100 (Thu, 07 Jan 2016)
Build-Date:2016-01-07 02:34:00
Revision:9336
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9336 en) Linux Ubuntu 14.04.3 LTS
Memory Usage: 266 MB / 876 MB (171 MB allocated, but free)
Java version: 1.8.0_72-internal-b05, Oracle Corporation, OpenJDK 64-Bit Server VM


Last errors/warnings:
- E: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
- E: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
	at java.util.ArrayList.get(ArrayList.java:429)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.calculateColors(GpxDrawHelper.java:254)
	at org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper.drawAll(GpxDrawHelper.java:201)
	at org.openstreetmap.josm.gui.layer.GpxLayer.paint(GpxLayer.java:280)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:638)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:706)
	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:76)
	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:756)
	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:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	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 (7)

comment:1 Changed 4 years ago by Don-vip

Description: modified (diff)
Keywords: gpx color velocity added
Milestone: 16.02

comment:2 Changed 4 years ago by simon04

Resolution: fixed
Status: newclosed

In 9338/josm:

fix #12312 - Error when loading GPX file with single point and track dynamic track coloring

Regression of r9234.

comment:3 Changed 4 years ago by simon04

Description: modified (diff)
Keywords: regression added; gpx color velocity removed

comment:4 Changed 4 years ago by simon04

Keywords: gpx color velocity added

comment:5 Changed 4 years ago by Don-vip

Description: modified (diff)

comment:6 Changed 4 years ago by Don-vip

In 9339/josm:

see #12312 - add non-regression unit test

comment:7 Changed 4 years ago by simon04

Ticket #12375 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.