Modify ↓
#5271 closed defect (fixed)
"Index out of bounds" when loading images with GPS info in EXIF
| Reported by: | OliverW | Owned by: | team |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| 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 by , 15 years ago
| Version: | → tested |
|---|
comment:2 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 15 years ago
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.
Note:
See TracTickets
for help on using tickets.



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