Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.5
-
None
-
-
13
-
5a5abc2d73 (qt/qtconnectivity/dev) 5a5abc2d73 (qt/tqtc-qtconnectivity/dev) f6e3885854 (qt/qtconnectivity/6.3) bc2703443f (qt/qtconnectivity/6.4) aef6acbb99 (qt/tqtc-qtconnectivity/6.2) f6e3885854 (qt/tqtc-qtconnectivity/6.3)
-
Foundation Sprint 64
Description
When calling a series of QLowEnergyService::writeCharacteristic() on Windows, the application eventually crashes. By experimentation some 35 writes is adequate for this.
The issue in general seems to be that there are awaits during which the mainthread events are being processed. This allows the application to write more and consequently creating one layer deeper event processing, and at some point things stop working. The crash I see happens during this await:
https://code.qt.io/cgit/qt/qtconnectivity.git/tree/src/bluetooth/qlowenergycontroller_winrt.cpp#n784
Most BT LE applications don't probably do this kind of rapid writing, or possibly wait for the characteristicWritten() signal before writing more. However it is worth checking is there a better way to handle this.