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

QThread's event loop is restarted when processEvents is called on its dispatcher

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.15.0, 5.15.1, 5.15.2, 5.15.3, 6.0, 6.1, 6.2.5, 6.3.1
    • None
    • Windows 10
    • Windows

    Description

      On Qt 5.12.11 (MSVC 2017), this bug doesn't exist, so there's clearly a code regression after this version, between it and the 5.15.0 (MSVC 2019) according to my tests.

      Otherwise, on the Qt 5.12.11 (MSVC 2017) version, this other bug that I reported doesn't also exist : QTBUG-101874

      I talked about this bug here : https://forum.qt.io/topic/138099/infinite-wait-when-stopping-qthread-event-loop-and-then-calling-wait you will notice that the participants are in disbelief despite my efforts but the bug is there and I'm 100% sure.

      Here's how reproduce this bug :

      1. Clone this github repository : https://github.com/embeddedmz/QTableViewAdjustPolicyNotWorkingProperly
      2. Open the CMakeLists.txt with Qt Creator, build, run the program.
      3. Click on "Start", then on "Stop"
      4. On Qt 5.12.11 the UI will return responsive after 10 seconds but on version >= 5.15.0 the UI will never return responsive.

       

      Description of the bug : when quit() is called on the QThread object it stops the this last's event loop but then this last gets restarted when processEvents is called on the QThread's dispatcher. Result : when the main thread calls wait(), it will wait undefinitely.

      Attachments

        For Gerrit Dashboard: QTBUG-105207
        # Subject Branch Project Status CR V

        Activity

          People

            thiago Thiago Macieira
            embeddedmz Amine Mzoughi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change