This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
TestApp crashes when trying to pan out of bounds - #3978
Merged
Merged
Conversation
Member
|
I queried @friedbunny about this crash and they don't have this on iOS. |
Contributor
|
I have seen this one on Linux desktop, but not exactly panning out of bounds. |
Contributor
|
I managed to reproduce this on Linux + GLFW test app by browsing and changing styles quickly on a Debug build. |
Member
Author
I still can see this happening while panning. For example, in the Main Activity, just keep panning east (no change in zoom needed). After 2-3 swipes the app will crash. |
Member
|
When looking for child tiles that cover a parent tile, we're computing the lower bound of the child tile in the set of tiles. Three things can happen: - all remaining tiles are sorted before the child tile we're looking for. in that case, there can not be a child tile. - the lower bound is the child tile; in this case, we want to continue checking the other children of the parent tile. - the lower bound isn't the child tile we're looking for, but there are still tiles sorted after the tile we were looking for. these could be four children of the child tile we're looking for, so we're recursively descending. what the current algorithm didn't take into account so far is that tiles with a higher w number (i.e. tiles that are outside the "main" tile pyramid of 0/0/0) were always sorted *after* the current w number. this meant that we thought there were still remaining children to be checked, so continued our recursive descent until eventually the number overflowed and we aborted our search. unfortunately, on Android this recursive descent and accompanying overflow caused a crash. this patch fixes this by making sure that before we're continuing to descent, we're sure that the w numbers match: all tiles with a different (= higher) w number essentially mean the same as "all remaining tiles are sorted before the child tile we're looking for" for the purpose of finding covering children
Member
Author
|
@kkaefer yay! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The TestApp's MainActivity has a worldview map. I'm observing the following crash when trying to pan out of bounds (this is is not limited to zoom 0):
/cc: @jfirebaugh @bleege @tobrun