Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The solution of a quest hides an unrelated (nearby) quest #4371

Closed
deevroman opened this issue Sep 11, 2022 · 16 comments
Closed

The solution of a quest hides an unrelated (nearby) quest #4371

deevroman opened this issue Sep 11, 2022 · 16 comments
Assignees
Labels

Comments

@deevroman
Copy link

deevroman commented Sep 11, 2022

How to Reproduce

Screen_Recording_20220911-180643_StreetComplete.mp4

Expected Behavior

Versions affected

47.0 alpha1

Samsung A52 Android 12. Samsung J1 Android 5.1.1

@deevroman deevroman added the bug label Sep 11, 2022
@dbdean
Copy link
Contributor

dbdean commented Sep 13, 2022

I've experienced this with any quest on a way that also has quests on nodes. You need to rescan for quests to get them to re-appear. (Sorry for not reporting this earlier!)

@cyclingcat
Copy link

I've experienced this with any quest on a way that also has quests on nodes. You need to rescan for quests to get them to re-appear. (Sorry for not reporting this earlier!)

The same here, for many months now. This bug definitely hasn't been introduced with the overlays feature, it has been present for a much longer time. I have tried to reproduce it several times but haven't succeeded so far - it happens often, but not always and I haven't found a pattern behind it yet.

The cycling cat

@westnordost
Copy link
Member

Well, I can't reproduce this, but it would help to see the log when this happens.

Alternatively, try exiting the app (tab out, remove from recents) and restart. Is the quest still gone?

When you solve a quest on a way, actually what should happen is that only for that way, it is re-checked which should be displayed (now). That a quest referring to a different element vanishes, is peculiar.

@Helium314
Copy link
Collaborator

I think the missing quest is not necessarily connected to quests on ways. It's only noticeable there because when the road changes is a re-scan for quests happening.
I also had other quests missing, though that is very hard to notice. E.g once I found a shop without name in nearby highlighted elements but no "name" quest. On re-scan the "name" quest suddenly showed up... and this was not near the edge of the downloaded area, where such things may happen.

@westnordost westnordost changed the title The solution of the parking overlay hides the quest about pedestrian crossings The solution of a quest hides an unrelated quests Sep 16, 2022
@westnordost westnordost changed the title The solution of a quest hides an unrelated quests The solution of a quest for a way hides an unrelated quest for a node of that way Sep 16, 2022
@westnordost westnordost added the feedback required more info is needed, issue will be likely closed if it is not provided label Sep 16, 2022
@westnordost westnordost changed the title The solution of a quest for a way hides an unrelated quest for a node of that way The solution of a quest hides an unrelated (nearby) quest Sep 16, 2022
@deevroman
Copy link
Author

deevroman commented Sep 16, 2022

Please note that the other quest disappears only after sending the changes.

FILE.2022-09-17.02.06.24.mp4

logcat_09-17-2022_01-56-18.txt

https://openstreetmap.org/way/1095254741

p.s. SC is lagging due to recording on an old device (Samsung J1, Android 5.1.1) But the bug is also playing on my main Samsung A52 Android 12 device

@westnordost
Copy link
Member

Some good information right there, i.e. that it only occurs after upload. The log however is not helpful, there should be logs by the QuestController.

@deevroman
Copy link
Author

how can I get them?

@westnordost
Copy link
Member

They should be at the same place. Maybe you cut if off too early?

@westnordost
Copy link
Member

Actually, there are no StreetComplete logs at all in that file. Maybe LogCat Reader only captures the system logs or something? I don't know about that app.

@deevroman
Copy link
Author

okay, I built an application from this repository and this is what came out in the console

AndroidStudio.log

@westnordost
Copy link
Member

I/Upload: Starting upload
D/OsmQuestController: AddMaxHeight requires surrounding map data to determine applicability to WAY#1095254741
I/MapDataController: Fetched 39 elements and geometries in 161ms
I/OsmQuestController: Created 0 quests for 1 updated elements in 0.7s
I/OsmQuestController: Persisted 0 new and removed 0 already resolved quests in 0.0s
I/ChangesetManager: Created changeset #126311433
D/ElementEditsUploader: Uploaded a UpdateElementTagsAction
D/OsmQuestController: AddMaxHeight requires surrounding map data to determine applicability to WAY#1095254741
I/MapDataController: Fetched 39 elements and geometries in 45ms
I/OsmQuestController: Created 0 quests for 5 updated elements in 0.1s
I/OsmQuestController: Persisted 0 new and removed 3 already resolved quests in 0.0s
I/Upload: Finished upload

@westnordost
Copy link
Member

Hmm, two things are suspect.

  1. why does the OsmQuestController create and persist quests apparently before the ElementEditsUploader finished uploading (even before creating the changeset)
  2. Why are the 4 updated elements? Apparently only of one element, the tags were changed. Why are there now 5 elements that have been updated?

@deevroman
Copy link
Author

deevroman commented Sep 17, 2022

Maybe it's because I canceled edits on this site.


Is it possible to switch StreetComplete to the osm sandbox? It is not very convenient to test on real objects

@westnordost
Copy link
Member

Is it possible to switch StreetComplete to the osm sandbox? It is not very convenient to test on real objects

Only if you compile it yourself. Change OSM_API_URL in OsmApiModule

@westnordost westnordost removed the feedback required more info is needed, issue will be likely closed if it is not provided label Sep 18, 2022
@westnordost westnordost self-assigned this Sep 18, 2022
@westnordost
Copy link
Member

I found:

  1. why does the OsmQuestController create and persist quests apparently before the ElementEditsUploader finished uploading (even before creating the changeset)

This is actually normal, the quest solution is applied locally. When auto-upload is on, it will be uploaded immediately afterwards.

  1. Why are the 4 updated elements? Apparently only of one element, the tags were changed. Why are there now 5 elements that have been updated?

I also found the reason why this is happening. Will provide a fix...

@westnordost
Copy link
Member

The explanation as provided in the commit message:

on upload, only broadcast the actually updated element (fixes #4371)

when the OSM API returns the updated element, the uploader fetches other elements from the local db that are necessary to construct the (new) geometry of the updated element (i.e. nodes of a way, member ways+nodes of a relation). Now, these elements have not actually been updated, they are just used to create the geometry. Hence, only the elements returned from the API must be broadcast as having been updated.

The issue identified in #4371 came to pass because that hasn't been the case but at the same time, no geometry for those additional elements was provided and so all the quests referring to elements with apparently missing geometry were removed.

This must have been a long-standing bug, well over a year old. Thank you for reporting it and providing the hints that made me find it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants