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

Crash in CBDeviceListenerImpl.search #510

Open
2 of 10 tasks
vedantgurav opened this issue Nov 28, 2024 · 3 comments
Open
2 of 10 tasks

Crash in CBDeviceListenerImpl.search #510

vedantgurav opened this issue Nov 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@vedantgurav
Copy link

Platform on which you observed the bug:

  • Android
  • iOS
  • Other
  • Platform is not relevant for this bug

Device on which you observed the bug:

  • Polar OH1
  • Polar Verity Sense
  • Polar H10
  • Polar H9
  • Other (Polar 360)
  • Device is not relevant for this bug

Describe the bug
Encountered a crash in CBDeviceListenerImpl.search at the CBScanner.addClient call when using the searchForDevice SDK function.

public func search(_ uuids: [CBUUID]?, identifiers: [UUID]?, fetchKnownDevices: Bool) -> Observable<BleDeviceSession> {
var object: RxObserver<BleDeviceSession>!
return Observable.create{ observer in
object = RxObserver<BleDeviceSession>(obs: observer)
self.scanner.addClient(object)
var foundPeripherals = [CBPeripheral]()

Screenshots and logs
image
image

@vedantgurav vedantgurav added the bug Something isn't working label Nov 28, 2024
@rkangast
Copy link
Contributor

FLOW-60821

@pth-pe-gh
Copy link
Contributor

@vedantgurav - do you encounter this same crash using current iOS example app code? If not, is it possible for you to supply code sample that reproduces the crash?

@pth-pe-gh
Copy link
Contributor

Likely but not verified cause is thread unsafe accessing of Set object in CBScanner. Atomic access to the set will be added as guard against this possibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants