mapbox / mapbox/mapbox-maps-ios
SDK Crash : DefaultLocationProvider.swift - Attempted to read an unowned reference but object was already deallocated
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: Compiled with 15.0
- iOS version: 17.4.1
- Devices affected: iPhone 12
- Maps SDK Version: Attached in the following screenshot 👇🏻
## Observed behavior and steps to reproduce
- Just play with the SDK using the `SearchEngine` feature. The crash has only occurred for 1 user so far. It hasn't happened frequently enough to be significant... _(For now)_
## Expected behavior
No crash. Should use `weak` or handle the `unowned` references in a proper way.
## Additional links and references
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
Start by reading DefaultLocationProvider.swift and tracing how the SearchEngine feature creates and uses its references. Use the reported Xcode, iOS, device, and SDK context to investigate the intermittent deallocation crash. Done means the affected lifecycle no longer produces the unowned-reference crash and the relevant behavior is covered by an appropriate check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100