#17810 closed defect (fixed)
[PATCH] incompletely downloaded turn restrictions sometimes break when splitting the from way
Reported by: | njtbusfan | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | 19.06 |
Component: | Core | Version: | tested |
Keywords: | turn restriction split regression | Cc: | taylor.smock |
Description
It's best to give an example.
ctrl-shift O to download way 696971687 (including referrers). Split it in the middle and note what happens to the no_left_turn relation. In former JOSM versions, it would correctly keep the way next to the via node, but now it doesn't always do it properly.
Attachments (1)
Change History (15)
comment:1 by , 6 years ago
Summary: | incompletely downloaded turn restrictions are broken → incompletely downloaded turn restrictions sometimes break when splitting the from way |
---|
comment:2 by , 6 years ago
Priority: | normal → major |
---|
follow-up: 6 comment:3 by , 6 years ago
Cc: | added |
---|---|
Keywords: | split added |
@Gerd, did you change the split code recently? I don't remember touching this code for years.
comment:4 by , 6 years ago
Keywords: | regression added |
---|---|
Milestone: | → 19.06 |
comment:5 by , 6 years ago
comment:6 by , 6 years ago
comment:7 by , 6 years ago
Cc: | added; removed |
---|
I don't remember patches quite well :) Taylor, can you please take a look?
comment:8 by , 6 years ago
There's also a problem with no_u_turn relations. Try splitting way 697039202.
comment:9 by , 6 years ago
I'll double check the code.
All I did was move the restriction handling code to its own function, and added checks for different types of relations that should be treated like a relation. It shouldn't have broken anything, but apparently it did.
It may take me a few days to get around to looking at it due to other constraints.
by , 6 years ago
Attachment: | 17810.patch added |
---|
Fix the issue (create private class for return values from specific relation functions) and initial work on a test.
comment:11 by , 6 years ago
Summary: | incompletely downloaded turn restrictions sometimes break when splitting the from way → [PATCH] incompletely downloaded turn restrictions sometimes break when splitting the from way |
---|
It turns out that I misunderstood the "pointers" in Java and assumed that an variable set to null passed to a function would retain the value assigned to it in the function. This was something that I had been worried about, but in my testing it wasn't actually triggering (probably due to not testing a short section).
Actual steps to reproduce:
1) Split way nearer the "via" node/way
I've added a test to ensure that it doesn't get broken again and fixed the problem by creating a private class with the data that needs to be returned. This does change the function definition, unfortunately.
This even happens when the turn restriction is downloaded completely. It happens when the western part of way 696971687 is chosen to keep the object id.