You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Background Modes: Current location is enabled in Xcode, Mapbox’s com.mapbox.common.location.sharedRunLoop goes to 100% CPU as soon as it starts. This is causing significant battery drain and crashes when the app is in the background as the system shuts the app down due to high CPU usage.
Expected behavior
com.mapbox.common.location.sharedRunLoop doesn’t use so much CPU
Notes / preliminary analysis
No changes to Example app code @rnmapbox/maps/example
Occasionally the issue seems to be timing dependent, like it happens more consistently the earlier Mapbox is loaded. If that’s the case in your testing, update example/src/App.js’s render method to the standalone component above.
Additional links and references
No response
The text was updated successfully, but these errors were encountered:
ryansommers
changed the title
[Bug]: High CPU usage when Background Modes Location updates is turned on
[Bug]: High CPU usage and crash when Background Modes Location updates is turned on
Nov 23, 2024
Wanted to add: this same behavior happens when starting navigation with Mapbox Navigation but not using Mapbox Maps in any way, so I'm guessing it's some bit of shared location code both are using.
Mapbox Implementation
Mapbox
Mapbox Version
10.19.0
React Native Version
0.76.0
Platform
iOS
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
When Background Modes: Current location is enabled in Xcode, Mapbox’s com.mapbox.common.location.sharedRunLoop goes to 100% CPU as soon as it starts. This is causing significant battery drain and crashes when the app is in the background as the system shuts the app down due to high CPU usage.
Expected behavior
com.mapbox.common.location.sharedRunLoop doesn’t use so much CPU
Notes / preliminary analysis
No changes to Example app code @rnmapbox/maps/example
Occasionally the issue seems to be timing dependent, like it happens more consistently the earlier Mapbox is loaded. If that’s the case in your testing, update example/src/App.js’s render method to the standalone component above.
Additional links and references
No response
The text was updated successfully, but these errors were encountered: