Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5271 closed defect (fixed)

"Index out of bounds" when loading images with GPS info in EXIF

Reported by: OliverW Owned by: team
Priority: trivial Component: Core
Version: tested Keywords: geoimage extractExif GeoImageLayer
Cc:

Description

JOSM issues the following error when importing images with GPS info:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(Unknown Source)
        at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.extractExif(G
eoImageLayer.java:537)
        at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.access$000(Ge
oImageLayer.java:70)
        at org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer$Loader.realRu
n(GeoImageLayer.java:152)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRun
nable.java:83)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.
java:129)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Expected behaviour: Check string length before accessing it.

Kind regards,
Oliver

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by anonymous

  • Version set to tested

comment:2 Changed 3 years ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

(In [3387]) fixed #5271 - Index out of bounds when loading images with GPS info in EXIF

comment:3 Changed 3 years ago by bastiK

The error is from an external library, probably the EXIF format of your image files is broken somehow. This is not a problem of JOSM unless this broken format is very common and/or there is an easy workaround for it.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.