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

[REG 6.2 -> 6.5] QBasicTimer::stop: Failed. Possibly trying to stop from a different thread

    XMLWordPrintable

Details

    • All

    Description

      QDefaultAnimationTimer can stop its timer from the wrong thread after this change was made after Qt 6.2, but in or before Qt 6.5. Reverting the change removes the error.

      commit 4a93285b166ceceaea2e10c8fc6a254d2f7093b9
      Author:     Thiago Macieira <thiago.macieira@intel.com>
      AuthorDate: Wed Jul 11 10:00:43 2018 -0700
      Commit:     Thiago Macieira <thiago.macieira@intel.com>
      CommitDate: Thu Feb 3 19:58:36 2022 -0800
      
          QtCore: use C++11 thread_local instead of QThreadStorage
          
          It's more efficient than our QThreadStorage and definitely much better
          than the Q_GLOBAL_STATIC+QThreadStorage solution. We can do this because
          the last compiler not to have thread_local support was MSVC 2013, which
          is no longer supported since Qt 5.11.
          
          QThreadStorage also managed the lifetimes of pointers for us, so the
          equivalent thread_local requires std::unique_ptr.
          
          Change-Id: Id59bdd8f1a804b809e22fffd15405f1b394c48d8
          Reviewed-by: Marc Mutz <marc.mutz@qt.io>
      

      We suspect the error here is in a behavior difference between 'static thread_local std::unique_ptr' vs QThreadStorage.

      Unfortunately we haven't been able to isolate this issue. Ours is a test application that repeatedly, in sequence, creates and destroys fixtures with QGuiApplication, QQuickView, QML and all our application code, using the "offscreen" platform. We are happy to assist in debugging...

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            andrhans Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change