mapbox / mapbox/mapbox-search-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
- 28
- Forks
- 28
- 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 reviewing DefaultLocationProvider.swift and reproducing the crash while using the SearchEngine feature under the reported Xcode and iOS versions. Trace the unowned references shown in the crash evidence and verify that the same usage no longer crashes after the lifecycle handling is corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100