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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.10.1, 5.11.0 Beta 2
    • 5.9.4
    • QPA
    • None
    • Android

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes