You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
]0;🐍BLE:Off | main.py | 8.2.0\]0;🐍BLE:Off | main.py | 8.2.0\
devices:[['092', 'fcc27e0b28b8']]
BLE addr: <Address f2:7e:49:15:b9:09>
Scanning ...
adv: <Address fc:c2:7e:0b:28:b8>
Address found !
loop 1
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 89312
Allocated memory: 48880
]0;👂LE:Off | main.py | 8.2.0\loop 2
]0;👂LE:Ok | main.py | 8.2.0\ -> OK
Free memory: 90576
Allocated memory: 47616
]0;🐍BLE:Off | main.py | 8.2.0\loop 3
]0;👂LE:Ok | main.py | 8.2.0\ -> OK
Free memory: 90000
Allocated memory: 48192
]0;👂LE:Off | main.py | 8.2.0\loop 4
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 89424
Allocated memory: 48768
]0;🐍BLE:Off | main.py | 8.2.0\loop 5
##
loops 5 to 154
##
]0;👂LE:Off | main.py | 8.2.0\loop 155
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 2448
Allocated memory: 135744
]0;👂LE:Off | main.py | 8.2.0\loop 156
]0;👂LE:Ok | main.py | 8.2.0\ -> OK
Free memory: 1872
Allocated memory: 136320
]0;👂LE:Off | main.py | 8.2.0\loop 157
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 1296
Allocated memory: 136896
]0;🐍BLE:Off | main.py | 8.2.0\loop 158
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 720
Allocated memory: 137472
]0;👂LE:Off | main.py | 8.2.0\loop 159
]0;🐍BLE:Ok | main.py | 8.2.0\ -> OK
Free memory: 960
Allocated memory: 137232
]0;🐍BLE:Off | main.py | 8.2.0\loop 160
]0;🐍BLE:Ok | main.py | 8.2.0\Traceback (most recent call last):
File "main.py", line 48, in <module>
File "adafruit_ble/__init__.py", line 108, in __getitem__
File "adafruit_ble/services/nordic.py", line 63, in __init__
File "adafruit_ble/characteristics/__init__.py", line 222, in __get__
File "adafruit_ble/characteristics/stream.py", line 81, in bind
MemoryError: memory allocation failed, allocating 64 bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 59, in <module>
MemoryError: memory allocation failed, allocating 64 bytes
]0;🐍BLE:Ok | 59@main.py MemoryError | 8.2.0\
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Description
Hi guys,
I created this issue based on this forum entry.
Basically I got in memory allocation trouble after repeated BLE reconnection and subsequent UARTService activation.
Additional information
No response
The text was updated successfully, but these errors were encountered:
It took a while to track this down, but it appears that the reason for the leak is that CharacteristicBuffer.deinit() is not being called when the CharacteristicBuffer used for one direction of the UARTService is no longer in use. I have a fix for this in the adafruit_ble library.
It's possible we may be able to detect in _bleio when to call deinit(), but I am not at all sure. If we could, we might not need that exposed routine.
I'll discuss this with @tannewt, and maybe move the issue to the library.
CircuitPython version
Code/REPL
Behavior
Description
Hi guys,
I created this issue based on this forum entry.
Basically I got in memory allocation trouble after repeated BLE reconnection and subsequent UARTService activation.
Additional information
No response
The text was updated successfully, but these errors were encountered: