Modify

Opened 17 months ago

Closed 6 months ago

Last modified 6 months ago

#23239 closed defect (fixed)

NPE in PhotoAdjustWorker#doMouseDragged

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone:
Component: Plugin photoadjust Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Use photoadjust
  2. Have a random crash
  3. Make a report.

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023)
Revision:18822
Build-Date:2023-08-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18822 fr) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19045)
Memory Usage: 3298 MB / 4068 MB (597 MB allocated, but free)
Java version: 17.0.7+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.nimbus.NimbusLookAndFeel
Screen: \Display0 3440×1440 (scaling 1.00×1.00)
Maximum Screen Size: 3440×1440
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: fr_FR
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=E:\Program Files\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]

Plugins:
+ FastDraw (36126)
+ OpeningHoursEditor (36126)
+ PicLayer (1.0.3)
+ alignways (36126)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36134)
+ cadastre-fr (36126)
+ conflation (0.6.11)
+ continuosDownload (102)
+ contourmerge (v0.2.0)
+ ejml (35924)
+ geotools (36068)
+ gridify (1606242219)
+ jackson (36034)
+ jaxb (36118)
+ jna (36126)
+ jts (36004)
+ measurement (36126)
+ opendata (36126)
+ photo_geotagging (36126)
+ photoadjust (36126)
+ reverter (36126)
+ scripting (v0.3.0)
+ shrinkwrap (v1.0.4)
+ tageditor (36126)
+ terracer (36126)
+ todo (133)
+ turnlanes-tagging (0.0.5)
+ undelete (36126)
+ utilsplugin2 (36134)
+ wikipedia (605)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Telecom&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/FR.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Surveillance&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Playground_Equipment&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/MastAndTower&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Light_sources&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/contact(socialnetworks_IMs)&zip=1
+ https://github.com/kendzi/Simple3dBuildingsPreset/releases/download/0.9_2018-05-08/s3db-preset.zip
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Power&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://gitlab.com/cartocite/josm-style-traffic-signs-orientation/-/raw/main/traffic_sign_orientation_style.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/FixmeAndNote&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/light_source&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR_OC.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1

Last errors/warnings:
- 21822.236 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 21822.238 W: Already here java.net.SocketTimeoutException: Read timed out
- 21822.357 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 21822.358 W: Already here java.net.SocketTimeoutException: Read timed out
- 21822.418 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 21822.419 W: Already here java.net.SocketTimeoutException: Read timed out
- 21822.589 W: java.net.SocketTimeoutException: Read timed out. Cause : java.net.SocketTimeoutException: Read timed out
- 21822.590 W: Already here java.net.SocketTimeoutException: Read timed out
- 23214.062 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.CachedLatLon.getEastNorth(org.openstreetmap.josm.data.projection.Projecting)" because the return value of "org.openstreetmap.josm.gui.layer.geoimage.ImageEntry.getPos()" is null
- 23214.069 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.CachedLatLon.getEastNorth(org.openstreetmap.josm.data.projection.Projecting)" because the return value of "org.openstreetmap.josm.gui.layer.geoimage.ImageEntry.getPos()" is null



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-1 (53) of JOSM
java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.CachedLatLon.getEastNorth(org.openstreetmap.josm.data.projection.Projecting)" because the return value of "org.openstreetmap.josm.gui.layer.geoimage.ImageEntry.getPos()" is null
	at org.openstreetmap.josm.plugins.photoadjust.PhotoAdjustWorker.doMouseDragged(PhotoAdjustWorker.java:167)
	at org.openstreetmap.josm.plugins.photoadjust.PhotoAdjustPlugin$2.mouseDragged(PhotoAdjustPlugin.java:68)
	at java.desktop/java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:328)
	at java.desktop/java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:327)
	at java.desktop/java.awt.Component.processMouseMotionEvent(Component.java:6674)
	at java.desktop/javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3407)
	at java.desktop/java.awt.Component.processEvent(Component.java:6395)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4592)
	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:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	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 (0)

Change History (12)

comment:1 by stoecker, 17 months ago

Component: CorePlugin photoadjust
Owner: changed from team to holgermappt

comment:2 by taylor.smock, 17 months ago

Summary: Plugin "photoadjust" decided to crashNPE in PhotoAdjustWorker#doMouseDragged

comment:3 by holgermappt, 17 months ago

Can you please describe what you did? I guess you loaded one or multiple photos. Do they have a geo location set, i.e. do they show up on the map? What mode is active, e.g. are you in edit mode (a) or is the photo adjust mode active? What layer is active? Do you have one or multiple photos selected? Do you just drag with the mouse or do you have additional keys pressed? Does the error happen for all of the photos or just one? Thanks.

According to the error message you are dragging a photo that has no position, but I don't see how one can do that.

comment:4 by skyper, 6 months ago

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

comment:5 by skyper, 6 months ago

Owner: changed from holgermappt to anonymous
Status: newneedinfo

comment:6 by anonymous, 6 months ago

Here's an example: https://drop.chapril.org/download/22d3e77f75f8b03a/#eybNeBk5n_BEss-6OzerXg

Warning: link valid for 5 days

comment:7 by taylor.smock, 6 months ago

@anonymous: Thank you. The important steps to reproduce were in your ticket.

comment:8 by taylor.smock, 6 months ago

Resolution: fixed
Status: needinfoclosed

In 36333/osm:

Fix #23239: NPE when attempting to set a position of an image without a position already set

This will occur when attempting to position images when the image has no exif
location information.

comment:9 by taylor.smock, 6 months ago

In 36334/osm:

See #23239: Bump JOSM revision for build

r19044 was the first version to require Java 11.

comment:10 by taylor.smock, 6 months ago

In 36335/osm:

See #23239 (dist): NPE when attempting to set a position of an image without a position already set

comment:11 by anonymous, 6 months ago

I confirm it's fixed! Oh my, it's such a pleasure to use… Thank you so much! ❤️

comment:12 by taylor.smock, 6 months ago

Ticket #21004 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 anonymous.
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.