Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.4.0
-
None
Description
In an application using Qt 6.4.0, we do a scan for devices (which works successfully) and then attempt to connect to a specific device via a call to QLowEnergyController::connectToDevice().
Almost immediately thereafter, the application crashes inside the onReceive() method of QtBluetoothBroadcastReceiver.java, because the qtContext is null.
Is this a bug in QtBluetooth? Or, are we doing something wrong? What is supposed to call setContext()?
From a brief inspection of the code, it seems like maybe the constructor in androidbroadcastreceiver.cpp might be the correct place, but it does not do so (or perhaps the value is invalid at that point).
Any hints about what we need to do to ensure that the context object is valid, would be appreciated.