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

"QApplication is not created on main thread" in same game example

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.9.4
    • Fix Version/s: 5.10.1, 5.11.0 Beta 2
    • Component/s: QPA
    • Labels:
      None
    • Platform/s:
      Android

      Description

      When running an unmodified version of same game on Android, you can get the "QApplication is not created on main thread" warning. This indicates that something has called QThread::currentThread() before initializing the Q*Application, causing the Android main thread to be registered instead of the Qt main thread. This may lead to crashes later on, specifically for event deliveries and signal/slot bindings, if I recall correctly.

      Reportedly it only happens in debug mode, so it is probably due to a global static QObject, which has some debug-specific calls that have proven to be the cause of this before.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              vestbo Tor Arne Vestbø
              Reporter:
              esabraha Eskil Abrahamsen Blomfeldt
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes