Important: Please read the Qt Code of Conduct -

Crash on QBluetoothDeviceDiscoveryAgent start method on W7

  • Hello everybody !
    This is my first contribution to this Qt forum but I could't find any solution anywhere to my crash yet...
    I am working on a bluetooth transfert application which is working just fine on my computer but who crashes on my development partner computer.
    I am using windows 10 Pro, a 64 bits compilation, Qt 5.14.2 and a bluetooth integrated to my motherboard
    He has Window 7 Pro SP1, a 64 bits compilation, Qt 5.14.2 and a bluetooth dongle turned on.

    We have a crash when starting the QBluetoothDeviceDiscoveryAgent
    Here is the code :

    _deviceDiscoveryAgent = new QBluetoothDeviceDiscoveryAgent(this);
    connect(_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, this, &BluetoothManager::addDevice);
    connect(_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::finished, this, &BluetoothManager::devicesDiscovered);
    connect(_deviceDiscoveryAgent, Overload<QBluetoothDeviceDiscoveryAgent::Error>::of(&QBluetoothDeviceDiscoveryAgent::error), [=](QBluetoothDeviceDiscoveryAgent::Error error) {qDebug() << "QBluetoothDeviceDiscoveryAgent error" << error; });

    Here is the stack when the app crashes :

    No specific error raised.

    supportedDiscoveryMethods() returns in both plateforms :

    Any ideas of why?

  • @Charlotte05


    maybe a hardware error (invalid QBluetoothDevice or not found) ? Are you sure, that your app has access to the dongle (the bluetooth device) and the dongle is working correctly?

    Debug your code on your dev partners computer so see in which line exactly the crash occurs.

  • Hello,
    Thank you for your answer.

    I also have the code :

    QBluetoothLocalDevice *_localDevice = new QBluetoothLocalDevice();

    right after creating the BluetoothDeviceDiscoveryAgent.

    The dongle is working fine because it is used normaly by other apps.
    The stack code i posted before is already the debug result from my partner computer.

  • Did you find a solution / workaround for this issue?

    I am experiencing the same issue. I realized that it is somehow related to CPU stress, however, could not find a solution yet. Any hint would be appreciated, thanks.

Log in to reply