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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[geolocator_apple] Crash if listen/cancel is executed in quick succession #1612

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mkurz-it
Copy link

@mkurz-it mkurz-it commented Nov 27, 2024

The onDidAuthorizationChanged is executed by iOS somewhen afer CLLocationManager is created in onListenWithArguments.

If the the subscription is canceled in the meantime _eventSink (onCancelWithArguments) is set to nil leading to accessing _eventSink when already nil (BAD_ACCESS crash).

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

…sion

The onDidAuthorizationChanged is executed by iOS somewhen afer CLLocationManager is created in onListenWithArguments.

If the the subscription is canceled in the meantime _eventSink (onCancelWithArguments) is set to nil leading to accessing _eventSink when already nil (BAD_ACCESS crash).
@mkurz-it mkurz-it force-pushed the bug/MRS-2850/mk/crash-event-sink-nil branch from fadb33e to 5692781 Compare November 27, 2024 12:40
@mkurz-it mkurz-it changed the title MRS-2850 Crash if listen/cancel is executed in quick succession [geolocator_apple] Crash if listen/cancel is executed in quick succession Nov 27, 2024
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

Successfully merging this pull request may close these issues.

2 participants