Opened 10 years ago

Closed 6 years ago

#2489 closed defect (wontfix)

Tidy function on roundabouts can create huge (~500-700 node) ways with multiple overlapping ways

Reported by: avar Owned by: richard@…
Priority: major Milestone:
Component: potlatch (flash editor) Version:
Keywords: Cc:

Description

Potlatch has a data corrupting bug since the Tidy function was introduced that is triggeder in some limited circumstances, see this E-Mail for details.

Here's an example of a corrupt way, copy attached to the bug for reference.

Here's an IRC discussion for reference where I originally brought this up.

 367772:23:37 < avar> RichardF: \o/ I broke it
 367773:23:38  * RichardF applauds
 367774:23:38 < RichardF> what'd you do?
 367778:23:38 < RichardF> zereb: yeah, I wish people wouldn't do that
 367780:23:38 < avar> create a square, then tidy points to make a circle, then reverse ways and tidy points again
 367781:23:38 < avar> you'll end up with a crapload of points which seem to duplicate the circle, but I'm not sure since it's impossible to see what's going on with your data in potlatch :)
 367783:23:39 < avar> can I move a whole way in it?
 367785:23:39 < RichardF> avar: hm, worksforme?
 367786:23:39 < RichardF> avar: move a whole way? sure, just click, hold and drag
 367793:23:44 < avar> RichardF: when I create a 4 node square and then make a circle, then reverse and make a circle again I get:
 367794:23:44 < avar> [I would have pasted an error message by now if flash didn't suck ass and copy-paste actually worked from it]
 367795:23:44 < avar> "Precondition failed: Way 38231 requires the nodes with id in (-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7), which either do not exist, or are not visible."
 367796:23:45 < avar> on api06
 367797:23:45 < avar> http://api06.dev.openstreetmap.org/browse/way/38231
 367798:23:46 < avar> that circle looks circular in my Potlatch view b.t.w. so it looks like the algorithm is broken, or the save went through partially and broke stuff
 367800:23:46 < RichardF> right, I'll have a look
 367801:23:47 < avar> and now it says I have unsaved changes but when I click save "nothing to upload"
 367802:23:47 < avar> oh now the rendering looks broken in potlatch when I open it again
 367805:23:49 < RichardF> avar: have you tried it on the live site or just api06?
 367807:23:50 < avar> tried it there too, it looks the same in the potlatch view on the main site but I'm not going to save crap to the main db :)
 367808:23:51 < RichardF> well, if I do (either on my dev machine or the main site): four-node way, T, reverse, T, save, it seems happy
 367809:23:51 < RichardF> are you doing a different sequence of things?
 367810:23:52 < avar> four-node area, then make circle, then reverse, then make circle
 367811:23:52 < RichardF> live or with save?
 367812:23:52 < avar> with save
 367813:23:53 < RichardF> have you got a password for api06 I can use?
 367814:23:53 < shaunmcdonald> RichardF: you create a new account!
 367815:23:53 < avar> I can't seem to save the "then reverse, then make circle" version on api06, it hangs on "Uploading ways" even though according to tcpflow there has been no TCP network traffic between my machine and openstreetmap.org since I did that
 367816:23:54 < avar> RichardF: avarab@gmail.com / XH4OPPJF
 367817:23:54 < avar> (sudo tcpflow -i wlan0 -c host openstreetmap.org)
 367819:23:55 < RichardF> hrm
 367820:23:55 < RichardF> still worksforme too
 367821:23:55 < RichardF> avar: are you saving at any point on the interim, or just at the end?
 367824:23:58 < avar> 1. open PL 2. edit with save 3. make 4 node area 5. T 6. reverse direction 7. T 8. save 9. http://api06.dev.openstreetmap.org/?way=38235
 367825:23:58 < avar> I saved after 5. earlier and couldn't save at 8 after that
 367827:00:00 < avar> save at 7 i mean
 367828:00:00 < RichardF> beyond weird, still worksforme
 367829:00:00 < RichardF> wonder if it's a Linux FP thing
 367830:00:01 < avar> Step 8 resulted in a circle that looks like it has 2x as many nodes as step 5 and it looks like it repeat itself so it goes round and round through each node 4x times
 367834:00:04 < avar> when you make a circle are two nodes on it much closer to each other than the other ones?
 367835:00:04 < avar> the nodes aren't evenly spaced when I do it
 367837:00:05 < RichardF> yeah, basically it preserves existing nodes but then adds a load to make a circle
 367847:00:30 -!- RichardF [~richard@systemed.plus.com] has quit [Quit: RichardF]

Attachments (1)

4794092.xml (171.2 KB) - added by avar 10 years ago.
http://www.openstreetmap.org/api/0.6/way/4794092/full

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by Richard

Priority: criticalmajor

t'aint critical until someone provides steps to reproduce ;)

comment:2 Changed 10 years ago by Richard

It seems to happen when you try to tidy a concave loop, e.g. the outline of a C.

I'm guessing this confuses lines 343/344 of way.as.

Trigonometry makes my head hurt so I'm not really in any hurry to fix this.

comment:3 Changed 6 years ago by iandees

Resolution: wontfix
Status: newclosed

Cleaning aging tickets.

Note: See TracTickets for help on using tickets.