Helium314 / SCEE

OpenStreetMap surveyor app for experienced OSM contributors
GNU General Public License v3.0
150 stars 11 forks source link

app suggests the same quest again and again #446

Closed ildar closed 1 year ago

ildar commented 1 year ago

How to Reproduce unknown. This bug raises time to time. The app just proposes the same quest again and again.

  1. "Bin" question, see https://www.openstreetmap.org/node/4107228563/history
  2. button_operated question: https://www.openstreetmap.org/node/6908055620/history

Does it happen in normal StreetComplete? Not sure, hard to reproduce.

Versions affected 53.32 (F-Droid)

Helium314 commented 1 year ago

I think there is a similar issue somewhere in the StreetComplete repository...

Otherwise, this may be caused by badly modified element selection. Did you modify element selection for these quests?

mnalis commented 1 year ago

I think there is a similar issue somewhere in the StreetComplete repository...

This one?

Otherwise, this may be caused by badly modified element selection. Did you modify element selection for these quests?

BTW, would it perhaps make sense to add (modified) or something to the changeset description if the quest selection has been modified from the default? e.g. Specify whether public transport stops have bins (modified) ?

Helium314 commented 1 year ago

BTW, would it perhaps make sense to add (modified) or something to the changeset description if the quest selection has been modified from the default? e.g. Specify whether public transport stops have bins (modified) ?

I remember I had looked into this a while ago and decided not to do it. Probably it required more work than I was willing to invest... not sure.

ildar commented 1 year ago

thanks guys. Yes, looks very similar and smells like races (though don't know where exactly).

Helium314 commented 1 year ago

When you encounter this issue next time, could you get the log? It's in settings -> Log reader -> save full log This may contain useful information on what is going wrong.

ildar commented 1 year ago

ok

ildar commented 1 year ago

I haven't seen this recently. I have a strong feeling this is a server-related issue. Or maybe network. So maybe it's worth checking the code that runs in case of server unusual responses and network issues.

mcliquid commented 1 year ago

@Helium314 I had the issue today twice in a row and saved the log file immediately for both times. It was the same quest (smoothness) for the same highway. Is it safe to attach the log file here or better send it via mail?

Helium314 commented 1 year ago

The log contains which elements you edited, and when you did the uploads. It also reveals whenever you put the app to background, possibly how much memory your device has, and indirectly some of your settings, such as auto-upload or whether you use dynamically created quests. If you don't want to see any of this in public, better send via email.

Helium314 commented 1 year ago

A rough summary what happens in the log:

  1. solve a surface quest (line 10384)
  2. cycleway, maxspeed and smoothness quests are created
  3. quests are added to visible quests, and (answered) surface quest is removed
  4. quest form is closed
  5. updated / deleted quests are written to database (SCEE does that in background, SC doesn't)
  6. (unrelated) a download for new quests starts
  7. smoothness quest is opened
  8. quests from download are created
  9. smoothness quest solved
  10. cycleway and maxspeed quests are created (for the element in 9.)
  11. quests created as part of download are written to database, 1 quest is removed There is no information which quest is removed. It could be unrelated because that element has changed compared to the old state of the database, but it might also be the smoothness quest.
  12. add cycleway and maxspeed to visible quests, remove smoothness
  13. quest form closed
  14. add 913 quests from download to visible quests, and remove the one mentioned in 11.
  15. write the new cycleway and maxspeed quest to database, and remove the smoothness quest
  16. open smoothness quest (that should not exist any more, as it was removed from visible quests in 12.)
  17. close and open smoothness quest
  18. solve smoothness
  19. create cycleway and maxspeed quests
  20. add cycleway and maxspeed to visible quests, remove nothing (!)
  21. smoothness quest shows again because it was not removed

So my preliminary conclusion is that the quests from download are created for the old state (must be, because at that point the smoothness quest wasn't solved). The removed quest from 11. is likely unrelated. The smoothness quest is removed in 12., but likely gets added again in 14. After solving the smoothness quest for the second time, it isn't removed in 20. because it's not in the database any more.

A simple solution would be to still try and remove the solved quest even if it's not in the database, but this needs a bit more work than one would think. Still this wouldn't solve the first occurrence of the solved smoothness quest showing up again for the first time.

mcliquid commented 1 year ago

As far as I can remember, there was only the surface quest first, than the smoothness quest. No maxspeed or cycleway quest on this highway. I've set surface and smoothness quest to the top 1 and 2 quests in the settings, there should not be any other quest in between of them. Maybe this is a problem here?

Helium314 commented 1 year ago

I've set surface and smoothness quest to the top 1 and 2 quests in the settings, there should not be any other quest in between of them

So you would only see the other quests if you hide the smoothness quest. But the other quests should not matter here, at least if my understanding of the problem is correct.

Helium314 commented 1 year ago

I'll close this, as it indeed seems to be the same issue as in StreetComplete (where it's hopefully fixes soon).