Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK Crash : DefaultLocationProvider.swift - Attempted to read an unowned reference but object was already deallocated #222

Open
juansanzone opened this issue Apr 29, 2024 · 1 comment

Comments

@juansanzone
Copy link

Environment

  • Xcode version: Compiled with 15.0
  • iOS version: 17.4.1
  • Devices affected: iPhone 12
  • Maps SDK Version: Attached in the following screenshot 馃憞馃徎
image

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

image image image image
@juansanzone juansanzone changed the title SDK Crash : DefaultLocationProvider.swift - Attempted to read an unowned reference but object was already deallocated bug 馃 SDK Crash : DefaultLocationProvider.swift - Attempted to read an unowned reference but object was already deallocated Apr 29, 2024
@aokj4ck
Copy link
Contributor

aokj4ck commented Apr 29, 2024

Hi @juansanzone, when you instantiate a SearchEngine are you owning the reference to that or are you letting it expire within the lifetime of the usage? For example if you entering a function, creating a SearchEngine, invoking a search/suggest/retrieve function on it, and destroying the local reference to the SearchEngine then the search/suggest/retrieve operation will likely still be running after the function exits and that operation and associated objects (LocationProvider) will no longer have a SearchEngine to report results back to.

Please also try the newer 1.0.0-rc.9 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants