Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#18798 closed defect (fixed)

NPE at GeoPropertyIndex$GPLevel.isInside - while adding a tag

Reported by: taylor.smock Owned by: team
Priority: blocker Milestone: 20.03
Component: Core Version:
Keywords: regression Cc: simon04

Description (last modified by skyper)

WORKAROUND FOR JOSM 15937:
Use Help/Action/TaggingPresetSearch to add junction=roundabout or highway=mini_roundabout

If you can't open the Add tag window anymore without getting the bug message use the following workaround:

  1. Enable Help/ExpertMode.
  2. Go to the advanced preferences Help/Preferences/Advanced, search for properties.remember-recently-added-tags and set it to false.
  3. Restart JOSM. Set it back to true.

First present in r15889.

Steps to reproduce:
1) Open a new layer
2) Add a node
3) Select the node
4) Open the add tag dialog
5) Enter junction into the key field
6) Start typing roundabout into the value field (it will crash on r)

Unless someone is already working on it, I'll try to get a patch attached as soon as possible.

EDIT: Relevant mapcss rule (from default MapCSS file):

node:righthandtraffic[junction=roundabout] {
  icon-image: String<presets/vehicle/restriction/roundabout_right.svg>;
  icon_z17: String<presets/vehicle/restriction/roundabout_right.svg>;
}
Caused by: org.openstreetmap.josm.tools.JosmRuntimeException: java.lang.reflect.InvocationTargetException
	at org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory$PseudoClassCondition.applies(ConditionFactory.java:847)
	at org.openstreetmap.josm.gui.mappaint.mapcss.Selector$AbstractSelector.matches(Selector.java:570)
	at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.apply(MapCSSStyleSource.java:704)
	at org.openstreetmap.josm.gui.mappaint.ElemStyles.generateStyles(ElemStyles.java:384)
	at org.openstreetmap.josm.tools.ImageProvider.getTaggedPadded(ImageProvider.java:1586)
	at org.openstreetmap.josm.tools.ImageProvider.getPadded(ImageProvider.java:1546)
	at org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper$AbstractTagsDialog.findIcon(TagEditHelper.java:701)
	... 2 more
Caused by: java.lang.reflect.InvocationTargetException
	at org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory$PseudoClassCondition.applies(ConditionFactory.java:845)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.isInside(GeoPropertyIndex.java:159)
	at org.openstreetmap.josm.tools.GeoPropertyIndex$GPLevel.get(GeoPropertyIndex.java:93)
	at org.openstreetmap.josm.tools.GeoPropertyIndex.get(GeoPropertyIndex.java:49)
	at org.openstreetmap.josm.tools.RightAndLefthandTraffic.isRightHandTraffic(RightAndLefthandTraffic.java:39)
	at org.openstreetmap.josm.gui.mappaint.mapcss.Functions.is_right_hand_traffic(Functions.java:1069)
	at org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory$PseudoClasses.righthandtraffic(ConditionFactory.java:724)
	... 9 more

Attachments (2)

18798.patch (1.4 KB) - added by taylor.smock 4 years ago.
Initial patch (fixes the issue, no non-regression tests)
18798.1.patch (4.6 KB) - added by taylor.smock 4 years ago.
Add non-regression test (uses reflection)

Download all attachments as: .zip

Change History (44)

comment:1 Changed 4 years ago by taylor.smock

Description: modified (diff)

Changed 4 years ago by taylor.smock

Attachment: 18798.patch added

Initial patch (fixes the issue, no non-regression tests)

comment:2 Changed 4 years ago by taylor.smock

Summary: Crash when adding `junction=roundabout` to a node[PATCH] Crash when adding `junction=roundabout` to a node

Changed 4 years ago by taylor.smock

Attachment: 18798.1.patch added

Add non-regression test (uses reflection)

comment:3 Changed 4 years ago by taylor.smock

Description: modified (diff)

comment:4 Changed 4 years ago by Klumbumbus

Milestone: 20.03

comment:5 Changed 4 years ago by simon04

Resolution: fixed
Status: newclosed

In 15946/josm:

fix #18798, see #14088 - Crash when adding junction=roundabout to a node (patch by taylor.smock)

comment:6 Changed 4 years ago by simon04

In 15947/josm:

see #18798, see #14088 - TagEditHelperTest: share code

comment:7 Changed 4 years ago by simon04

In 15948/josm:

see #18798, see #14088 - Add robustness for TagEditHelper.AbstractTagsDialog.findIcon

comment:8 Changed 4 years ago by simon04

Description: modified (diff)

comment:9 Changed 4 years ago by taylor.smock

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

comment:10 Changed 4 years ago by simon04

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

comment:11 Changed 4 years ago by simon04

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

comment:12 Changed 4 years ago by skyper

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

comment:13 Changed 4 years ago by GerdP

Seems to happen quite often. Do we need a hotfix for this as well?

comment:14 Changed 4 years ago by GerdP

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

comment:15 Changed 4 years ago by skyper

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

comment:16 Changed 4 years ago by simon04

Description: modified (diff)

comment:17 in reply to:  13 Changed 4 years ago by Klumbumbus

Replying to GerdP:

Do we need a hotfix for this as well?

Would make sense in general, but not right now as JOSM is rather less stable atm (#18772, #18802, #18845).
Maybe once JOSM is back to stable release a new stable mid march?

comment:18 Changed 4 years ago by skyper

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

comment:19 Changed 4 years ago by skyper

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

comment:20 Changed 4 years ago by Klumbumbus

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

comment:21 Changed 4 years ago by skyper

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

comment:22 Changed 4 years ago by Klumbumbus

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

comment:23 Changed 4 years ago by Klumbumbus

Description: modified (diff)

comment:24 Changed 4 years ago by Klumbumbus

Priority: normalblocker

The bug is pretty bad once you have that tag in the Add tag window by default because you can't open it anymore at all. Added a workaround above.

comment:25 Changed 4 years ago by Don-vip

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

comment:26 Changed 4 years ago by Don-vip

I guess we should start to stabilize JOSM in order to release a new tested asap.

comment:27 Changed 4 years ago by Klumbumbus

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

comment:28 Changed 4 years ago by simon04

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

comment:29 Changed 4 years ago by Don-vip

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

comment:30 Changed 4 years ago by Don-vip

Summary: [PATCH] Crash when adding `junction=roundabout` to a nodeNPE at GeoPropertyIndex$GPLevel.isInside - while adding a tag

comment:31 Changed 4 years ago by Don-vip

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

comment:32 Changed 4 years ago by GerdP

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

comment:33 Changed 4 years ago by GerdP

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

comment:34 Changed 4 years ago by skyper

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

comment:35 Changed 4 years ago by skyper

Description: modified (diff)

comment:36 Changed 4 years ago by GerdP

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

comment:37 Changed 4 years ago by Klumbumbus

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

comment:38 Changed 3 years ago by Don-vip

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

comment:39 Changed 3 years ago by simon04

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

comment:40 Changed 3 years ago by Don-vip

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

comment:41 Changed 3 years ago by Don-vip

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

comment:42 Changed 3 years ago by Don-vip

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

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.