Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#18798 closed defect (fixed)

[PATCH] Crash when adding `junction=roundabout` to a node — at Version 16

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

Description (last modified by simon04)

WORKAROUND FOR JOSM 15937: use Help/Action/TaggingPresetSearch to add junction=roundabout

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

Change History (18)

comment:1 by taylor.smock, 6 years ago

Description: modified (diff)

by taylor.smock, 6 years ago

Attachment: 18798.patch added

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

comment:2 by taylor.smock, 6 years ago

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

by taylor.smock, 6 years ago

Attachment: 18798.1.patch added

Add non-regression test (uses reflection)

comment:3 by taylor.smock, 6 years ago

Description: modified (diff)

comment:4 by Klumbumbus, 6 years ago

Milestone: 20.03

comment:5 by simon04, 6 years ago

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 by simon04, 6 years ago

In 15947/josm:

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

comment:7 by simon04, 6 years ago

In 15948/josm:

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

comment:8 by simon04, 6 years ago

Description: modified (diff)

comment:9 by taylor.smock, 6 years ago

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

comment:10 by simon04, 6 years ago

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

comment:11 by simon04, 6 years ago

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

comment:12 by skyper, 6 years ago

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

comment:13 by GerdP, 6 years ago

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

comment:14 by GerdP, 6 years ago

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

comment:15 by skyper, 6 years ago

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

comment:16 by simon04, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.