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
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
#8194 and #8125 introduced a mechanism to pause and resume mbgl file source activity. #8125 specifically modified MGLOfflineStorage to pause the file source in response to UIApplicationDidEnterBackgroundNotification and resume in response to UIApplicationWillEnterForegroundNotification.
Based on a crash reported captured from an internal testing application (see below), it appears that the resume method is called twice in some cases which leads to a crash.
Noting that it does not look like it is unheard of for observers of life cycle notifications to be tricked by the system https://openradar.appspot.com/14075101.
I think our mbgl implementation is correct to enforce symmetry in the calls to pause and resume. Along with some extra logging, I'm going to try adding a boolean in MGLOfflineStorage to keep the state of pause and resume and guard against invalid calls to mbgl. This will hopefully allow me to confirm that this type of solution stops the crash and, unfortunately, it is the only solution I can think of at the moment.
Noting that it does not look like it is unheard of for observers of life cycle notifications to be tricked by the system https://openradar.appspot.com/14075101.
This reminds me of how we had to work around the fact that iOS 9.0 (and above?) would send redundant reachability notifications on launch: #1911. In #1958, we similarly worked around the issue by keeping track of the old and new reachability states.
Platform: iOS
Mapbox SDK version: v3.5.0-beta.2, v3.5.0-beta.3, v3.5.0-rc.1
#8194 and #8125 introduced a mechanism to pause and resume mbgl file source activity. #8125 specifically modified
MGLOfflineStorage
to pause the file source in response toUIApplicationDidEnterBackgroundNotification
and resume in response toUIApplicationWillEnterForegroundNotification
.Based on a crash reported captured from an internal testing application (see below), it appears that the resume method is called twice in some cases which leads to a crash.
cc @mapbox/ios
The text was updated successfully, but these errors were encountered: