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

leaking an uninitialized object of type CBCentralManager #1715

Open
paorin opened this issue Jan 22, 2025 · 1 comment
Open

leaking an uninitialized object of type CBCentralManager #1715

paorin opened this issue Jan 22, 2025 · 1 comment
Labels
3rd party issue The issue is with the Bluetooth stack, the BLE device, or other 3rd party code not with Bleak itself Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend

Comments

@paorin
Copy link

paorin commented Jan 22, 2025

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'
@dlech
Copy link
Collaborator

dlech commented Jan 23, 2025

Mac OS 10.11

Hmm... this could be the issue. I'm not able to test Bleak on older versions of macOS.

Looks like similar reports here: ronaldoussoren/pyobjc#220

@dlech dlech added 3rd party issue The issue is with the Bluetooth stack, the BLE device, or other 3rd party code not with Bleak itself Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party issue The issue is with the Bluetooth stack, the BLE device, or other 3rd party code not with Bleak itself Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend
Projects
None yet
Development

No branches or pull requests

2 participants