Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105556

BT LE repeated characteristic recurses into event loops until it crashes on Windows

    XMLWordPrintable

Details

    • Windows
    • 13
    • 5a5abc2d73 (qt/qtconnectivity/dev) 5a5abc2d73 (qt/tqtc-qtconnectivity/dev) f6e3885854 (qt/qtconnectivity/6.3) bc2703443f (qt/qtconnectivity/6.4) aef6acbb99 (qt/tqtc-qtconnectivity/6.2) f6e3885854 (qt/tqtc-qtconnectivity/6.3)
    • Foundation Sprint 64

    Description

      When calling a series of QLowEnergyService::writeCharacteristic() on Windows, the application eventually crashes. By experimentation some 35 writes is adequate for this.

      The issue in general seems to be that there are awaits during which the mainthread events are being processed. This allows the application to write more and consequently creating one layer deeper event processing, and at some point things stop working. The crash I see happens during this await:
      https://code.qt.io/cgit/qt/qtconnectivity.git/tree/src/bluetooth/qlowenergycontroller_winrt.cpp#n784

      Most BT LE applications don't probably do this kind of rapid writing, or possibly wait for the characteristicWritten() signal before writing more. However it is worth checking is there a better way to handle this.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ivan.solovev Ivan Solovev
            vuokko Juha Vuolle
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: