diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-06-10 13:53:24 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-06-10 15:18:07 +0000 |
commit | d332ce0f202c3a7065901a7f6d7fdd99438e7670 (patch) | |
tree | f8eba4e0b7e494cdcaae73d4d1d5027b3df6a718 | |
parent | a8b89f2a153f9958aef683e3f1f1e05e2c393189 (diff) |
Android: Fix crashing QBluetoothDeviceDiscoveryAgent on Androids <v18v5.5.0-rc1v5.5.0
The new BTLE aware device discovery crashes due to a wrong internal
activity state. The device discovery emits finished() signal when
the SDP discovery finishes. It does not continue with BTLE scans
oin Android releases 4.1.x or earlier.
The signal emission causes the classes dtor to run.
In turn the dtor calls stop() because the activity flag
still indicates a running device scan which emits error(), which calls
the classes dtor and the entire loop continues until a stack overflow
is caused.
Task-number: QTBUG-46588
Change-Id: If7e4af6773c6063cee11f59e0b0db477fea0c003
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp index a6aaaf03..f977c471 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp @@ -201,6 +201,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::processSdpDiscoveryFinished() // start LE scan if supported if (QtAndroidPrivate::androidSdkVersion() < 18) { qCDebug(QT_BT_ANDROID) << "Skipping Bluetooth Low Energy device scan"; + m_active = NoScanActive; emit q->finished(); } else { startLowEnergyScan(); |