Skip to content

leaking an uninitialized object of type CBCentralManager #1715

@paorin

Description

@paorin

Mac OS 10.11
Python 3.11
bleak 0.22.3
pyobjc 10.3.2

When calling

await BleakScanner.discover(5.0, return_adv=True)

I get the following error

/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py:76: UninitializedDeallocWarning: leaking an uninitialized object of type CBCentralManager
  self.central_manager = CBCentralManager.alloc().initWithDelegate_queue_(
Traceback (most recent call last):

[...]

  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 76, in init
    self.central_manager = CBCentralManager.alloc().initWithDelegate_queue_(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: depythonifying 'pointer', got 'OS_dispatch_queue'

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd party issueThe issue is with the Bluetooth stack, the BLE device, or other 3rd party code not with Bleak itselfBackend: Core BluetoothIssues and PRs relating to the Core Bluetooth backend

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions