Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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 6 years 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 by anonymous, 6 years ago

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

comment:2 by Klumbumbus, 6 years ago

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

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

Keywords: regression added
Milestone: 19.06

in reply to:  3 comment:6 by Klumbumbus, 6 years ago

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

Cc: taylor.smock added; GerdP removed

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

comment:8 by njtbusfan, 6 years ago

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

comment:9 by taylor.smock, 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.

comment:10 by Klumbumbus, 6 years ago

Maybe r15076 could be the reason too?

by taylor.smock, 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 taylor.smock, 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.

comment:12 by Don-vip, 6 years ago

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

Thanks!

comment:14 by Klumbumbus, 6 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.