Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21833 closed defect (fixed)

NPE: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()"

Reported by: jmarchon35@… Owned by: Upliner
Priority: normal Milestone:
Component: Plugin buildings_tools Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

What is the expected result?

What happens instead?

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

Revision:18360
Build-Date:2022-01-02 23:53:33

Identification: JOSM/1.5 (18360 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19044)
Memory Usage: 550 MB / 2020 MB (91 MB allocated, but free)
Java version: 17.0.1+12-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1800×1200 (scaling 1.25×1.25)
Maximum Screen Size: 1800×1200
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18360, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --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, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35893)
+ ImproveOsm (215)
+ ImproveWay (32)
+ buildings_tools (35893)
+ changessum (v0.1.1)
+ damn (0.5.0)
+ measurement (35893)
+ reverter (35893)

Last errors/warnings:
- 00002.590 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00002.605 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00017.024 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
- 01042.503 E: Failed to locate image 'actions/area'
- 01279.057 E: Failed to locate image 'actions/area'
- 01285.533 E: Failed to locate image 'actions/area'
- 01336.421 E: Failed to locate image 'actions/area'
- 02381.371 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()" because "en" is null



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (23) of main
java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()" because "en" is null
	at org.openstreetmap.josm.data.projection.AbstractProjection.eastNorth2latlon(AbstractProjection.java:143)
	at org.openstreetmap.josm.data.projection.AbstractProjection.eastNorth2latlon(AbstractProjection.java:130)
	at org.openstreetmap.josm.plugins.buildings_tools.BuildingsToolsPlugin.eastNorth2latlon(BuildingsToolsPlugin.java:25)
	at org.openstreetmap.josm.plugins.buildings_tools.Building.paint(Building.java:220)
	at org.openstreetmap.josm.plugins.buildings_tools.DrawBuildingAction.paint(DrawBuildingAction.java:312)
	at org.openstreetmap.josm.gui.MapView.drawTemporaryLayers(MapView.java:651)
	at org.openstreetmap.josm.gui.MapView.drawMapContent(MapView.java:588)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:491)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JSplitPane.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
	at java.desktop/javax.swing.JComponent.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedFPScales(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
	at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source)
	at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Attachments (0)

Change History (3)

comment:1 by skyper, 3 years ago

Component: CorePlugin buildings_tools
Owner: changed from team to Upliner
Summary: JOSM wanted me to submit this, so here it isNPE: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()"

comment:2 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

In 35908/osm:

building_tools: Add NPE check in EDT along with a defensive copy

This fixes #21833: NPE: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()".
This is caused by something either calling the reset method *or* one of the
methods for calculating the EastNorth returning null.

In any case, we fix the potential race condition by making a defensive copy of
the en array, and then checking the defensive copy for nulls in the EDT,
where appropriate.

comment:3 by taylor.smock, 3 years ago

In 35909/osm:

building_tools (dist): Add NPE check in EDT along with a defensive copy

See #21833: NPE: Cannot invoke "org.openstreetmap.josm.data.coor.EastNorth.east()".
This was caused by something either calling the reset method *or* one of the
methods for calculating the EastNorth returning null.

In any case, we fixed the potential race condition by making a defensive copy
of the en array, and then checking the defensive copy for nulls in the EDT,
where appropriate.

Modify Ticket

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