Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] fix infinite loop in mbgl::resample - #4508

Merged
ansis merged 1 commit into
masterfrom
fix-infinite-loop-resample
Mar 29, 2016
Merged

ansis merged 1 commit into
masterfrom
fix-infinite-loop-resample

Conversation

@ansis

@ansis ansis commented Mar 29, 2016

Copy link
Copy Markdown
Contributor

fix #4416

👀 @jfirebaugh

@jfirebaugh

Copy link
Copy Markdown
Contributor

Can you write a rendering or unit test for this?

@mb12

mb12 commented Mar 29, 2016

Copy link
Copy Markdown

@ansis Is a similar change needed at other places, like this one in line bucket.

Also, is it possible to explain why the issue occurs at zoom > 21 for sources with maxzoom=15?

ansis added a commit to mapbox/mapbox-gl-test-suite that referenced this pull request Mar 29, 2016
@ansis
ansis force-pushed the fix-infinite-loop-resample branch from a22984b to a8c6d2e Compare March 29, 2016 18:15
@ansis

ansis commented Mar 29, 2016

Copy link
Copy Markdown
Contributor Author

render test added: a8c6d2e, mapbox/mapbox-gl-test-suite@45066f6

@ansis Is a similar change needed at other places, like this one in line bucket.

not in that spot since overscaling is a float

Also, is it possible to explain why the issue occurs at zoom > 21 for sources with maxzoom=15?

The standard size of a tile is 512 and util::EXTENT is 8192. At zoom levels > maxzoom tiles are overscaled so the tile size gets bigger. At 21 it is big enough that the extent / tilesize produces 0 with divided as integers.

@ansis

ansis commented Mar 29, 2016

Copy link
Copy Markdown
Contributor Author

@ansis Is a similar change needed at other places, like this one in line bucket.

not in that spot since overscaling is a float

It looks like that changed recently. 15bc11a. I'll fix this spot and review other cases. Thanks for catching this @mb12

  • review all division with util::EXTENT

@ansis
ansis force-pushed the fix-infinite-loop-resample branch from a8c6d2e to 0539f7b Compare March 29, 2016 18:38
@ansis

ansis commented Mar 29, 2016

Copy link
Copy Markdown
Contributor Author

Is fixed. It was the only other broken case. There are some other cases that are ok now but could turn into bugs later. #3768 will fix most of that.

@ansis
ansis merged commit 0539f7b into master Mar 29, 2016
@ansis
ansis deleted the fix-infinite-loop-resample branch March 29, 2016 20:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite loop in mbgl::resample at zoom > 21

3 participants