Modify

Opened 8 years ago

Closed 4 years ago

#12209 closed defect (fixed)

[Patch] IAE at CorrelateGpxWithImages$LoadGpxDataActionListener.actionPerformed - when correlating image with gpx track

Reported by: anonymous Owned by: team
Priority: normal Milestone: 19.11
Component: Core image mapping Version:
Keywords: gpx correlate image Cc: Bjoeni

Description (last modified by Don-vip)

Ошибка при сопоставлении изображении с треком

Файл -> Открыть -> Изображение .jpg
В новом окне "Сопоставить изображение с GPX треком" выбрать трек, нажать "OK". Первые три раза не приведут ни к чему, четвертый приводит к ошибке.

Google translated version:
File -> Open -> Image .jpg
New window "Compare the image with the GPX track" to select the track, press "OK". The first three times does not lead to anything, and the fourth an error.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2015-11-24 00:04:12 +0100 (Tue, 24 Nov 2015)
Build-Date:2015-11-23 23:14:21
Revision:9060
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9060 ru) Windows 7 64-Bit
Memory Usage: 106 MB / 247 MB (31 MB allocated, but free)
Java version: 1.8.0_66, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:C:\Program Files (x86)\Java\jre1.8.0_66\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=51517, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAA==]

Plugins:
- turnrestrictions (31772)

Last errors/warnings:
- E: java.lang.IllegalArgumentException: setSelectedIndex: 1 out of bounds
- E: java.lang.IllegalArgumentException: setSelectedIndex: 1 out of bounds

java.lang.IllegalArgumentException: setSelectedIndex: 1 out of bounds
	at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
	at org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages$LoadGpxDataActionListener.actionPerformed(CorrelateGpxWithImages.java:270)
	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.plaf.basic.BasicButtonListener.mouseReleased(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)
	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.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.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.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 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)

Attachments (1)

12209v1.diff (6.2 KB ) - added by Bjoeni 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by wiktorn, 8 years ago

Description: modified (diff)
Summary: Ошибка при сопоставлении изображении с трекомError when correlating image with gpx track (was: Ошибка при сопоставлении изображении с треком)

comment:2 by Don-vip, 7 years ago

Description: modified (diff)
Keywords: gpx correlate image added
Summary: Error when correlating image with gpx track (was: Ошибка при сопоставлении изображении с треком)IAE at CorrelateGpxWithImages$LoadGpxDataActionListener.actionPerformed - when correlating image with gpx track

comment:3 by Don-vip, 4 years ago

Cc: Bjoeni added
Component: CoreCore image mapping

comment:4 by Bjoeni, 4 years ago

Have you tried reproducing it?
I couldn't reproduce it just now, but I'll have another look on the weekend. Otherwise it might just as well have been fixed since 9060.

comment:5 by Don-vip, 4 years ago

I didn't try. I saw you were the main contributor on this class recently so you would know more than me if it was still a problem.

comment:6 by Bjoeni, 4 years ago

Ok. Just asking, I'll have a look :)

comment:7 by Bjoeni, 4 years ago

Summary: IAE at CorrelateGpxWithImages$LoadGpxDataActionListener.actionPerformed - when correlating image with gpx track[Patch] IAE at CorrelateGpxWithImages$LoadGpxDataActionListener.actionPerformed - when correlating image with gpx track

I still couldn't reproduce it. I believe it must have been some weird concurrent modification while the dialog was opened twice that lead to the list having different entries than the ComboBox.

Either way it doesn't really make sense to have a List<GpxDataWrapper> and a JosmComboBox<GpxDataWrapper> and always modify both (to keep them in sync manually), so I got rid of the list and created a common MutableComboBoxModel<GpxDataWrapper>.

So however this exception occurred, this patch should fix it since there is only one collection now.
The class is still a bit messy though.

by Bjoeni, 4 years ago

Attachment: 12209v1.diff added

comment:8 by Don-vip, 4 years ago

Milestone: 19.11

comment:9 by Don-vip, 4 years ago

Resolution: fixed
Status: newclosed

In 15498/josm:

fix #12209 - CorrelateGpxWithImages refactor (patch by Bjoeni)

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.