Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20311 closed defect (fixed)

NPE at josm.actions.DownloadAlongAction.actionPerformed()

Reported by: gaben Owned by: team
Priority: major Milestone: 21.02
Component: Core Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Open JOSM
  2. Click on File | Download along (Ctrl+Alt+F1 for me)

What is the expected result?

This menu option could be greyed out because nothing loaded just yet.

What happens instead?

NPE

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-12-27 20:15:27 +0100 (Sun, 27 Dec 2020)
Build-Date:2020-12-28 02:30:52
Revision:17426
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17426 hu) Windows 10 64-Bit
OS Build number: Windows 10 Pro for Workstations 2009 (19042)
Memory Usage: 1006 MB / 1820 MB (834 MB allocated, but free)
Java version: 1.8.0_271-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1200 (scaling 1,00×1,00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→32×32, 32×32→32×32
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\31\583aa85f-30a40c63, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Djnlpx.splashport=54089, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm-latest.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe]

Plugins:
+ OpeningHoursEditor (35640)
+ PicLayer (2a9aa7a)
+ apache-commons (35524)
+ buildings_tools (35669)
+ continuosDownload (91)
+ ejml (35458)
+ geotools (35458)
+ gridify (1606242219)
+ jaxb (35543)
+ jts (35458)
+ log4j (35458)
+ opendata (35640)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ reverter (35640)
+ tageditor (35640)
+ turnlanes-tagging (288)
+ utilsplugin2 (35674)
+ wikipedia (1.1.4)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1

Last errors/warnings:
- 00030,775 E: Handled by bug report queue: java.lang.NullPointerException
- 00033,088 E: Handled by bug report queue: java.lang.NullPointerException



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (61) of javawsApplicationThreadGroup
java.lang.NullPointerException
	at org.openstreetmap.josm.actions.DownloadAlongWayAction.createTask(DownloadAlongWayAction.java:45)
	at org.openstreetmap.josm.actions.DownloadAlongAction.actionPerformed(DownloadAlongAction.java:307)
	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.AbstractButton.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.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 (0)

Change History (15)

comment:1 by GerdP, 3 years ago

Resolution: fixed
Status: newclosed

In 17431/josm:

fix #20311: NPE at josm.actions.DownloadAlongAction.actionPerformed()

  • call updateEnabledState() in constructor

comment:2 by GerdP, 3 years ago

Milestone: 21.01

comment:3 by gaben, 3 years ago

Hmm, can someone confirm the fix? Now it seems the menu item is always disabled :/

comment:4 by GerdP, 3 years ago

Resolution: fixed
Status: closedreopened

Oops, you are right.

comment:5 by GerdP, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 17446/josm:

fix #20311: NPE at josm.actions.DownloadAlongAction.actionPerformed()

  • have to install the adapters so that a change in the selection is actually recognized
  • reverts r17431 which assumed that the adapters are installed

comment:6 by gaben, 3 years ago

Fix confirmed, thanks! :)

Last edited 3 years ago by gaben (previous) (diff)

comment:7 by Don-vip, 3 years ago

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

comment:8 by Don-vip, 3 years ago

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

comment:9 by GerdP, 3 years ago

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

comment:10 by stoecker, 3 years ago

Milestone: 21.0121.02

Milestone renamed

comment:11 by GerdP, 3 years ago

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

comment:12 by GerdP, 3 years ago

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

comment:13 by Don-vip, 3 years ago

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

comment:14 by Don-vip, 3 years ago

Priority: normalmajor

comment:15 by GerdP, 3 years ago

Ticket #20595 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 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.