#23309 closed defect (fixed)
NPE: Cannot invoke "org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(org.openstreetmap.josm.data.coor.LatLon)" because "this.children[idx]" is null
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | 23.11 |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
unsure if reproducible, happened once, asked to report
- delete only data layed
- add more gpx track (~4MB)
- select small sparsely mapped area
- try download data
What is the expected result?
data downloaded
What happens instead?
crash window + asked to report bug
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 en) Windows 11 64-Bit OS Build number: Windows 10 Enterprise 2009 (22621) Memory Usage: 2448 MB / 4096 MB (1025 MB allocated, but free) Java version: 17.0.4+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.00×1.00) Maximum Screen Size: 1920×1080 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: [-Djava.net.useSystemProxies=true] Dataset consistency test: No problems found Plugins: + ImportImagePlugin (36176) + PicLayer (1.0.3) + RoadSigns (36126) + apache-commons (36176) + areaselector (2.6.2) + austriaaddresshelper (88) + auto_tools (81) + ejml (36176) + geotools (36176) + jackson (36176) + jaxb (36118) + jts (36004) + log4j (36176) + reltoolbox (36178) + utilsplugin2 (36178) Last errors/warnings: - 160303.769 W: java.net.SocketTimeoutException: Connect timed out - 160303.769 E: java.net.SocketTimeoutException: Connect timed out - 160303.770 W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Connect timed out - 200770.582 E: Connection to proxy '/10.255.46.226:3128' for URI 'https://api.openstreetmap.org/api/0.6/user/details' failed. Exception was: java.net.SocketTimeoutException: Connect timed out - 200785.588 W: java.net.SocketTimeoutException: Connect timed out - 200785.589 W: Already here java.net.SocketTimeoutException: Connect timed out - 200785.590 E: java.net.SocketTimeoutException: Connect timed out - 200785.590 W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Connect timed out - 438425.420 E: Error in primitive hover listener: java.lang.NullPointerException. Cause: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(org.openstreetmap.josm.data.coor.LatLon)" because "this.children[idx]" is null - 438425.429 E: Handled by bug report queue: java.lang.NullPointerException. Cause: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(org.openstreetmap.josm.data.coor.LatLon)" because "this.children[idx]" 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 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openstreetmap.josm.tools.Territories.getRegionalTaginfoUrls(Territories.java:242) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.setupTaginfoNationalActions(PropertiesDialog.java:408) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.updateUi(PropertiesDialog.java:726) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.updateUi(PropertiesDialog.java:705) at org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.primitiveHovered(PropertiesDialog.java:691) at org.openstreetmap.josm.gui.NavigatableComponent.lambda$firePrimitiveHovered$2(NavigatableComponent.java:193) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDT(GuiHelper.java:200) at org.openstreetmap.josm.gui.NavigatableComponent.firePrimitiveHovered(NavigatableComponent.java:190) at org.openstreetmap.josm.gui.NavigatableComponent.updateHoveredPrimitive(NavigatableComponent.java:204) at org.openstreetmap.josm.gui.NavigatableComponent.access$100(NavigatableComponent.java:80) at org.openstreetmap.josm.gui.NavigatableComponent$PrimitiveHoverMouseListener.mouseMoved(NavigatableComponent.java:1796) at java.desktop/java.awt.AWTEventMulticaster.mouseMoved(Unknown Source) at java.desktop/java.awt.AWTEventMulticaster.mouseMoved(Unknown Source) at java.desktop/java.awt.AWTEventMulticaster.mouseMoved(Unknown Source) at java.desktop/java.awt.Component.processMouseMotionEvent(Unknown Source) at java.desktop/javax.swing.JComponent.processMouseMotionEvent(Unknown Source) at java.desktop/java.awt.Component.processEvent(Unknown Source) at java.desktop/java.awt.Container.processEvent(Unknown Source) at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.Component.dispatchEvent(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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.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) Caused by: java.lang.NullPointerException: Cannot invoke "org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(org.openstreetmap.josm.data.coor.LatLon)" because "this.children[idx]" is null at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(GeoPropertyIndex.java:142) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(GeoPropertyIndex.java:142) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(GeoPropertyIndex.java:142) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(GeoPropertyIndex.java:142) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(GeoPropertyIndex.java:142) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:81) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:83) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:83) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:83) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:83) at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:83) at org.openstreetmap.josm.tools.GeoPropertyIndex.get(GeoPropertyIndex.java:49) at org.openstreetmap.josm.tools.Territories.lambda$getRegionalTaginfoUrls$4(Territories.java:237) at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.StreamSpliterators$DistinctSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(Unknown Source) at java.base/java.util.stream.AbstractTask.compute(Unknown Source) at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Attachments (1)
Change History (9)
by , 18 months ago
Attachment: | Screenshot 2023-11-19 025758.png added |
---|
comment:1 by , 18 months ago
comment:2 by , 18 months ago
Summary: | Bug during download → NPE: Cannot invoke "org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.getBounded(org.openstreetmap.josm.data.coor.LatLon)" because "this.children[idx]" is null |
---|
I don't know how this happened -- there is a null check right before the location where the exception occurred.
I wasn't able to reproduce.
follow-up: 5 comment:4 by , 18 months ago
comment:5 by , 18 months ago
Replying to gaben:
@taylor, which ticket should be the parent for the rest?
I typically go in the following order:
- Ticket with the most information (prefer oldest)
- Oldest ticket with a non-anonymous reporter
- Oldest ticket
This is definitely a duplicate with #23036 and probably with #22834.
Also I see a parallel stream in
getRegionalTaginfoUrls()
, maybe there is a race condition? It's just a wild guess, I haven't checked deeper than that.
That is a possibility
if (children == null) { @SuppressWarnings("unchecked") GPLevel<T>[] tmp = new GPLevel[4]; this.children = tmp; // If this happens after the null check but before the getBounded call, an npe could happen. } [...] if (children[idx] == null) { if (DEBUG) System.err.println(" - new with idx "+idx); children[idx] = new GPLevel<>(level + 1, testBBox, this, owner); } return children[idx].getBounded(ll);
comment:8 by , 18 months ago
Milestone: | → 23.11 |
---|
but data loaded despite error shown