Modify

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#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)

17810.patch (5.4 KB) - added by taylor.smock 14 months ago.
Fix the issue (create private class for return values from specific relation functions) and initial work on a test.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 14 months ago by anonymous

Summary: incompletely downloaded turn restrictions are brokenincompletely downloaded turn restrictions sometimes break when splitting the from way

comment:2 Changed 14 months ago by Klumbumbus

Priority: normalmajor

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.

comment:3 Changed 14 months ago by Don-vip

Cc: GerdP added
Keywords: split added

@Gerd, did you change the split code recently? I don't remember touching this code for years.

comment:4 Changed 14 months ago by Don-vip

Keywords: regression added
Milestone: 19.06

comment:6 in reply to:  3 Changed 14 months ago by Klumbumbus

Replying to Don-vip:

I don't remember touching this code for years.

I guess you have a bad memory then :P r15078

comment:7 Changed 14 months ago by Don-vip

Cc: taylor.smock added; GerdP removed

I don't remember patches quite well :) Taylor, can you please take a look?

comment:8 Changed 14 months ago by njtbusfan

There's also a problem with no_u_turn relations. Try splitting way 697039202.

comment:9 Changed 14 months ago by taylor.smock

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.

comment:10 Changed 14 months ago by Klumbumbus

Maybe r15076 could be the reason too?

Changed 14 months ago by taylor.smock

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 Changed 14 months ago by taylor.smock

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.

comment:12 Changed 14 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 15186/josm:

fix #17810 - incompletely downloaded turn restrictions sometimes break when splitting the from way (patch by taylor.smock, modified)

comment:13 Changed 14 months ago by Don-vip

Thanks!

comment:14 Changed 14 months ago by Klumbumbus

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