Modify

Opened 4 months ago

Closed 5 weeks ago

Last modified 2 weeks ago

#24517 closed defect (fixed)

[PATCH] NullPointerException when trying to correlate images without ExifGpsTime

Reported by: StephaneP Owned by: StephaneP
Priority: normal Milestone: 26.01
Component: Core Version:
Keywords: template_report correlation Cc:

Description

What steps will reproduce the problem?

  1. Load somes images with missing ExifGpsTime
  2. Try to correlate the images with a GNSS trace, using the GPS Clock

What happens instead?

It crashes :

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2025-08-31 14:19:57 +0200 (Sun, 31 Aug 2025)
Revision:19439
Build-Date:2025-09-02 01:30:58
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19439 fr) Windows 11 64-Bit
OS Build number: Windows 10 Pro 24H2 (26100)
Memory Usage: 1216 MB / 16384 MB (220 MB allocated, but free)
Java version: 20+36-2344, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1200x32bpp@59Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: fr_FR
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [--add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]

Plugins:
+ DirectUpload (36438)
+ FixAddresses (36438)
+ ImportImagePlugin (36438)
+ MakeParallel (v1.1.0)
+ Mapillary (1813)
+ OpeningHoursEditor (36438)
+ PicLayer (269)
+ PolygonCutOut (v0.7.3)
+ alignways (36438)
+ apache-commons (36438)
+ apache-http (36438)
+ areaselector (366)
+ austriaaddresshelper (100)
+ auto_tools (84)
+ cadastre-fr (36438)
+ centernode (v1.0.4)
+ changeset-viewer (1746100587)
+ comfort0 (36438)
+ continuosDownload (127)
+ contourmerge (v0.2.2)
+ editgpx (36438)
+ ejml (36438)
+ geotools (36438)
+ gridify (37)
+ highwaynamemodification (c6d820b)
+ imagery-xml-bounds (36438)
+ jackson (36438)
+ jaxb (36438)
+ jna (36438)
+ jts (36438)
+ log4j (36438)
+ lwjgl (36438)
+ lwjgl-windows (36438)
+ mbtiles (v2.6.1)
+ opendata (36440)
+ panoviewer (1.0.2)
+ photo_geotagging (36438)
+ photoadjust (36438)
+ reltoolbox (36438)
+ reverter (36447)
+ shrinkwrap (v1.1.3)
+ tageditor (36438)
+ terracer (36438)
+ todo (155)
+ turnlanes-tagging (1746100629)
+ turnrestrictions (36458)
+ undelete (36438)
+ utilsplugin2 (36438)

Tagging presets:
+ %UserProfile%\Documents\Gitlab_cartocité\gares-transilien\JOSM\Gares21-preset.xml
+ D:\style_josm\preset_test.xml
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml

Map paint styles:
- %UserProfile%\Documents\Gitlab_cartocité\gares-transilien\JOSM\railway-station.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
- C:\Users\Stephane\Documents\GitHub\MapCSS-JOSM-Bicycle\cycleway.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksPlus&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/BesideTheRoad_Speed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/HighwayAreas&zip=1
- D:\style_josm\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Direction&zip=1
+ %UserProfile%\Documents\Gitlab\josm-style-traffic-signs-orientation\traffic_sign_orientation.mapcss
- D:\style_josm\direction.mapcss
- https://gitlab.com/cartocite/josm-style-traffic-signs-orientation/-/raw/main/traffic_sign_orientation_style.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Potlatch2&zip=1
- %UserProfile%\Nextcloud\Partages\Projets\ACO - 24h du Mans\fixme.mapcss

Validator rules:
+ %UserProfile%\Documents\Gitlab_cartocité\gares-transilien\JOSM\railway-station.validator.mapcss

Last errors/warnings:
- 05994.412 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 05998.632 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 05999.981 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 05999.986 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 05999.991 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 06004.622 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 06004.711 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 06008.169 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 06015.829 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 37329.434 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "java.time.Instant.toEpochMilli()" because the return value of "org.openstreetmap.josm.data.gpx.GpxImageEntry.getTimeSourceInstant(org.openstreetmap.josm.data.gpx.TimeSource)" is null



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (49) of main
java.lang.NullPointerException: Cannot invoke "java.time.Instant.toEpochMilli()" because the return value of "org.openstreetmap.josm.data.gpx.GpxImageEntry.getTimeSourceInstant(org.openstreetmap.josm.data.gpx.TimeSource)" is null
	at org.openstreetmap.josm.data.gpx.GpxImageCorrelation.getLastIndexOfListBefore(GpxImageCorrelation.java:591)
	at org.openstreetmap.josm.data.gpx.GpxImageCorrelation.matchPoints(GpxImageCorrelation.java:380)
	at org.openstreetmap.josm.data.gpx.GpxImageCorrelation.matchGpxTrack(GpxImageCorrelation.java:148)
	at org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages$StatusBarUpdater.matchAndGetStatusText(CorrelateGpxWithImages.java:841)
	at org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages$StatusBarUpdater.matchAndUpdateStatusBar(CorrelateGpxWithImages.java:805)
	at org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages$StatusBarUpdater.itemStateChanged(CorrelateGpxWithImages.java:785)
	at java.desktop/javax.swing.AbstractButton.fireItemStateChanged(AbstractButton.java:2000)
	at java.desktop/javax.swing.AbstractButton$Handler.itemStateChanged(AbstractButton.java:2321)
	at java.desktop/javax.swing.DefaultButtonModel.fireItemStateChanged(DefaultButtonModel.java:460)
	at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:374)
	at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:392)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
	at java.desktop/java.awt.Component.processEvent(Component.java:6385)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4995)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Attachments (1)

24517.patch (7.5 KB ) - added by StephaneP 4 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 by StephaneP, 4 months ago

Owner: changed from team to StephaneP

by StephaneP, 4 months ago

Attachment: 24517.patch added

comment:2 by StephaneP, 4 months ago

Summary: NullPointerException when trying to correlate images without ExifGpsTime[PATCH] NullPointerException when trying to correlate images without ExifGpsTime

comment:3 by GerdP, 4 months ago

I think it would be better to add a new public method instead of changing the parameters for an existing one. The existing one could then simply call the new method.

comment:4 by stoecker, 4 months ago

Milestone: 25.10

comment:5 by stoecker, 5 weeks ago

Resolution: fixed
Status: newclosed

In 19455/josm:

fix #24517 - patch by StephaneP - NullPointerException when trying to correlate images without ExifGpsTime - modifies a function prototype which seems unused by any plugins

comment:6 by stoecker, 2 weeks ago

Milestone: 25.1026.01

Milestone renamed

Modify Ticket

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