Qt 6.11 is out! See what's new in the release
blog
Qt5 and Qt6 Bluetooth crashes on segmentation fault.
-
Hello everyone.
When running with QBluetooth, and call "QLowEnergyService::discoverDetails", it random crash.
There are the trace of my application:Thread 41 received signal SIGSEGV, Segmentation fault. [Switching to Thread 58424.0xeffc] 0x00007ffdd6a13b6a in Qt5Bluetooth!?setMaxPendingConnections@QBluetoothServer@@QEAAXH@Z () from S:\X\dist\Qt5Bluetooth.dll (gdb) bt #0 0x00007ffdd6a13b6a in Qt5Bluetooth!?setMaxPendingConnections@QBluetoothServer@@QEAAXH@Z () from S:\X\dist\Qt5Bluetooth.dll #1 0x00007ffdd6a12620 in Qt5Bluetooth!?setMaxPendingConnections@QBluetoothServer@@QEAAXH@Z () from S:\X\dist\Qt5Bluetooth.dll #2 0x00007ff700eb6404 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?)Qt version:5.15.2
build with msvc -
-
I think i found solution, before call "QLowEnergyService::discoverDetails", if "QLowEnergyController" emit error signals, and the error is "RemoteHostClosedError", we cannot do it, it will caused crash. The truly method is giveup the conntion, and wait next connection.
-

