Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Crash on QBluetoothDeviceDiscoveryAgent start method on W7
Forum Updated to NodeBB v4.3 + New Features

Crash on QBluetoothDeviceDiscoveryAgent start method on W7

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 440 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Charlotte05
    wrote on last edited by
    #1

    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);
    _deviceDiscoveryAgent->setInquiryType(QBluetoothDeviceDiscoveryAgent::GeneralUnlimitedInquiry);
    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; });
    _deviceDiscoveryAgent->start();
    

    Here is the stack when the app crashes :
    afgokcfncjhflhae.png

    No specific error raised.

    supportedDiscoveryMethods() returns in both plateforms :
    QFlagsQBluetoothDeviceDiscoveryAgent::DiscoveryMethod(ClassicMethod|LowEnergyMethod)

    Any ideas of why?

    Pl45m4P 1 Reply Last reply
    0
    • C Charlotte05

      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);
      _deviceDiscoveryAgent->setInquiryType(QBluetoothDeviceDiscoveryAgent::GeneralUnlimitedInquiry);
      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; });
      _deviceDiscoveryAgent->start();
      

      Here is the stack when the app crashes :
      afgokcfncjhflhae.png

      No specific error raised.

      supportedDiscoveryMethods() returns in both plateforms :
      QFlagsQBluetoothDeviceDiscoveryAgent::DiscoveryMethod(ClassicMethod|LowEnergyMethod)

      Any ideas of why?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Charlotte05

      Hi,

      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.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Charlotte05
        wrote on last edited by
        #3

        Hello,
        Thank you for your answer.

        I also have the code :

        QBluetoothLocalDevice *_localDevice = new QBluetoothLocalDevice();
        _localDevice->setHostMode(QBluetoothLocalDevice::HostConnectable);
        _localDevice->powerOn();
        

        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.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Axorn
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved