#18495 closed defect (fixed)
NPE at JoinAreasAction.joinOrientedWays
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 19.12 |
Component: | Core | Version: | latest |
Keywords: | template_report regression | Cc: | GerdP |
Description
What steps will reproduce the problem?
- Try to merge an relation object with an non relation object
What is the expected result?
What happens instead?
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: 2019-12-31 14:25:24 +0100 (Tue, 31 Dec 2019) Build-Date:2019-12-31 13:27:22 Revision:15625 Relative:URL: ^/trunk Identification: JOSM/1.5 (15625 de) Windows 10 64-Bit OS Build number: Windows 10 Home 1909 (18363) Memory Usage: 360 MB / 989 MB (60 MB allocated, but free) Java version: 1.8.0_231-b11, Oracle Corporation, Java HotSpot(TM) Client VM Screen: \Display0 1920x1080 Maximum Screen Size: 1920x1080 Dataset consistency test: No problems found Plugins: + Mapillary (1.5.20) + apache-commons (35092) + apache-http (35092) + buildings_tools (35248) + jna (35092) + log4j (35092) + print (35248) + routing (35248) + terracer (35248) + utilsplugin2 (35248) + wikipedia (1.1.3) Last errors/warnings: - W: Cannot lock cache directory. Will not use disk cache - W: No configuration settings found. Using hardcoded default values for all pools. - W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use: JVM_Bind - W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use: JVM_Bind - 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-0 (15) of main java.lang.NullPointerException at org.openstreetmap.josm.actions.JoinAreasAction.joinOrientedWays(JoinAreasAction.java:1349) at org.openstreetmap.josm.actions.JoinAreasAction.joinWays(JoinAreasAction.java:1312) at org.openstreetmap.josm.actions.JoinAreasAction.joinPolygon(JoinAreasAction.java:1283) at org.openstreetmap.josm.actions.JoinAreasAction.joinAreas(JoinAreasAction.java:676) at org.openstreetmap.josm.actions.JoinAreasAction.join(JoinAreasAction.java:540) at org.openstreetmap.josm.actions.JoinAreasAction.actionPerformed(JoinAreasAction.java:475) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.KeyboardManager.fireBinding(Unknown Source) at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(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 (2)
Change History (18)
comment:1 by , 5 years ago
Summary: | Try to merge an relation with an non relation object → NPE at JoinAreasAction.joinOrientedWays |
---|
comment:2 by , 5 years ago
Cc: | added |
---|---|
Milestone: | → 20.01 |
comment:3 by , 5 years ago
Yes, the code in JoinAreasAction.joinOrientedWays()
doesn't handle the case that CombineWayAction.combineWaysWorker()
can return null. No idea why this did not show up before.
Anyway, the change in #18083 is probably too agressive. I see no problem when a way is combined to another way if only some nodes are outside the download area. I'll open a new ticket for that.
follow-up: 16 comment:5 by , 5 years ago
@anonymous: If you can reproduce the problem please save the data to a file and attach it to this ticket.
by , 5 years ago
Attachment: | sample-18495.osm added |
---|
comment:6 by , 5 years ago
OK, found an example. Load attached file and try to join the two buildings (way 110514326 and way 82770881)
A popup asks for confirmation because nodes are outside of the download area. When you click the Yes button the error occurs.
by , 5 years ago
Attachment: | 18495.patch added |
---|
follow-up: 10 comment:8 by , 5 years ago
The attached patch reverts the changes made in r15617. I've implemented a new parameter for
CombineWayAction.combineWaysWorker()
which is set to false by default. If set to true, a check is performed to find old nodes outside the download area which were used for combining.
For JoinAreas the test is not performed and thus it is less likely to get a null from this method.
This is more or less a dirty hack, but it should fix this ticket and also work good enough for #18501.
Got a flu since Christmas and cannot concentrate well, so please review.
Another option would be to just revert r15617 or to invest more time into null handling in JoinAreasAction
.
comment:10 by , 5 years ago
comment:11 by , 5 years ago
Will we need a stable release hotfix for the NPE or is it rather seldom? (Just asking because if we make a hotfix then I wait with my next commits.)
comment:14 by , 5 years ago
Keywords: | regression added |
---|
comment:15 by , 5 years ago
Milestone: | 20.01 → 19.12 |
---|
comment:16 by , 5 years ago
Replying to GerdP:
@anonymous: If you can reproduce the problem please save the data to a file and attach it to this ticket.
I saw the message too late, but the new release is working fine
regression of #18385 + #18367 + #18083 ?