mapbox / mapbox/mapbox-maps-ios
EXC_BAD_ACCESS Crash in background when "Always" location permission enabled
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: 15.0.1
- iOS version: 16.7.10, 17.x, 18.1
- Maps SDK Version: 11.7.1
## Observed behavior and steps to reproduce
We are getting EXC_BAD_ACCESS crash, though it's not in sharedRunLoop and the stack trace doesn't have any detail.
It seems to only happen where we have Location permissions set to "Always" (set and used with a different LocationManager outside of MapBox) which is only a subset of our users. It happens sporadically, we haven't been able to nail down exact circumstances, other than when Location permissions are set to Always, and the app is backgrounded. The exception looks like:
com.mapbox.common.Unspecified Worker 1 (37): EXC_BAD_ACCESS (code=10, address=0x123ef4000)
The stack trace for the crashed thread is just:
`#0 0x00000001047b3f2c in ___lldb_unnamed_symbol2102 ()`
`#12 0x0000000224c500ec in _pthread_start () `
I made a comment on #2236 but because the crash type seemed similar, but since it's on a different thread, I'm adding a new ticket as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the EXC_BAD_ACCESS with Always location permission while the app is backgrounded, inspect the worker-thread crash, and compare the related report in #2236; done means the cause is identified and the background crash is prevented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100