Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.4
-
None
-
-
8
-
7c7d860ca5 (qt/qtconnectivity/dev) 980312ee7e (qt/qtconnectivity/6.3) cbd5f6c09a (qt/qtconnectivity/6.4) 980312ee7e (qt/tqtc-qtconnectivity/6.3) cbd5f6c09a (qt/tqtc-qtconnectivity/6.4) 7c7d860ca5 (qt/tqtc-qtconnectivity/dev)
-
Team A Foundation Sprint 60
Description
Starting a QBluetoothServiceDiscoveryAgent(FullDiscovery) sometimes hangs forever.
Detailed analysis is still pending but at this point I venture a guess of what is happening:
First everything goes as usual:
- First the device discovery is done
- Then the service discovery kicks in
- All devices are discovered for their services
However, if the device for whatever reason fails discover any services on any of the devices *), the internal "sdpCache" will not get any entries. Then, on the last device's service discovery, the code calls (via timer) this function:
But since the sdpCache is empty, the function immediately returns and the discovery won't get finished. I guess the sdpCache.isEmpty() is interpreted as "service scan has been stopped already", but in this corner-case it doesn't hold true.
*) A way to reproduce is to unpair first all devices that are in vicinity (and possibly also clear device's bluetooth caches)