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

Map stops updating after a second map is displayed #4119

Closed
millenbop opened this issue Feb 26, 2016 · 12 comments
Closed

Map stops updating after a second map is displayed #4119

millenbop opened this issue Feb 26, 2016 · 12 comments
Labels
bug iOS Mapbox Maps SDK for iOS
Milestone

Comments

@millenbop
Copy link

In the latest release for iOS, it seems like the maps only work when a single instance is used. If you put one map in one UIViewController, and another map in another UIViewController, and load/display them both using a UITabBarController, the maps don't update anymore or very very seldom. Just looking at a map at a time seems to work fine, but as soon as two instances are in memory it seems like they stop working properly.

Using version 3.1.2, static library.

@millenbop
Copy link
Author

Downgraded to 3.1.0 and seems like the bug is present there too.

@millenbop
Copy link
Author

3.0.1 works fine, integrated using cocoapods.

@millenbop
Copy link
Author

This bug still exists in ios-v3.2.0-pre.2

@jfirebaugh jfirebaugh added this to the ios-v3.2.0 milestone Mar 14, 2016
@1ec5
Copy link
Contributor

1ec5 commented Mar 17, 2016

Looks like #3448 didn’t completely address #3130 (a regression introduced in #2922). I think #2985 (comment) will be a much more robust fix. Let’s track the issue there.

@1ec5 1ec5 closed this as completed Mar 17, 2016
@1ec5 1ec5 reopened this Mar 28, 2016
@1ec5 1ec5 removed this from the ios-v3.2.0 milestone Mar 28, 2016
@1ec5
Copy link
Contributor

1ec5 commented Mar 28, 2016

After a second look at this issue, I’m not sure #2985 is related. I tried rigging iosapp (which uses the dynamic framework) to display two tabs, an MGLMapView in each. The maps appear to redraw at a normal rate. Is there anything unusual about your setup?

@picciano
Copy link

This has been a huge issue for us once a second map is displayed. Note that it only seems to happen when using a physical device...the iOS simulator seems unaffected.

@1ec5
Copy link
Contributor

1ec5 commented Mar 28, 2016

Hm, I’ve been testing on an iPhone 6 running iOS 9.3. I’ll keep looking into this.

@1ec5 1ec5 added this to the ios-v3.2.0 milestone Mar 28, 2016
@millenbop
Copy link
Author

For me it works now (tried with 3.2.0-beta.2) so it appears to have been fixed somewhere sometime. @picciano have you tried one of the latest beta versions?

@vkurchatkin
Copy link
Contributor

@millenbop works for us as well

@picciano
Copy link

I would have to agree. 3.2.0 beta 2 has resolved the issue.

We had been seeing CPU loads between 40 and 80% with peaks to 141%.
Now the same test show the CPU between 0 and 2% with peaks up to 5%.

Phone no longer get hot to the touch.

@1ec5
Copy link
Contributor

1ec5 commented Mar 29, 2016

Between 3.2.0-pre.2 and 3.2.0-beta.2, we mostly merged changes related to offline maps. I had been expecting #3448, which made it into ios-v3.1.0-pre.1, to fix the excessive CPU usage at the risk of potentially failing to update. But perhaps this was just another symptom of allowing CADisplayLink to run amok. Otherwise, maybe having multiple map views loaded is a red herring: #4368 fixed a regression related to exponential backoff when there’s clock skew from the server.

Closing for now. If you do see this issue again, please chime in. A sample project that reproduces the issue would help us narrow down the issue further.

@1ec5 1ec5 closed this as completed Mar 29, 2016
@millenbop
Copy link
Author

Thanks for fixing! One way or another :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

6 participants