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

Fix infinite loop zooming in past z23 - #9360

Merged
1ec5 merged 1 commit into
release-ios-v3.6.0-android-v5.1.0from
1ec5-micro-phone-9359
Jun 24, 2017
Merged

1ec5 merged 1 commit into
release-ios-v3.6.0-android-v5.1.0from
1ec5-micro-phone-9359

Conversation

@1ec5

@1ec5 1ec5 commented Jun 23, 2017 •

Copy link
Copy Markdown
Contributor

At zoom levels where the minimum 1 meter or 4 feet would be wider than the scale bar’s maximum width, the local variable holding the preferred row was left undefined. A loop that later iterated based on this row would effectively iterate infinitely until memory pressure forces the system to quit the application. This change ensures that the preferred row is always set to a real value, avoiding the infinite loop.

As you can see from this screenshot of z25.5 in Svalbard, we could probably hide the scale bar at such ridiculously high zoom levels:

svalbard

Here’s the Versailles Orangerie, one of the most intricately mapped places in OpenStreetMap, as seen in Mapbox Streets:

versailles

Fixes #9359.

/cc @frederoni

At zoom levels where the minimum 1 meter or 4 feet would be wider than the scale bar’s maximum width, the local variable holding the preferred row was left undefined. A loop that later iterated based on this row would effectively iterate infinitely until memory pressure forces the system to quit the application.
@1ec5 1ec5 added crash iOS Mapbox Maps SDK for iOS labels Jun 23, 2017
@1ec5 1ec5 added this to the ios-v3.6.0 milestone Jun 23, 2017
@1ec5 1ec5 self-assigned this Jun 23, 2017
@1ec5
1ec5 requested a review from frederoni June 23, 2017 23:18
@1ec5
1ec5 merged commit 9b0b74d into release-ios-v3.6.0-android-v5.1.0 Jun 24, 2017
@1ec5
1ec5 deleted the 1ec5-micro-phone-9359 branch June 24, 2017 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

crash iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants