- 
    Bug 
- 
    Resolution: Done
- 
    P1: Critical 
- 
    5.9.4
- 
    None
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.
- is duplicated by
- 
                    QTBUG-66077 [Qt 5.11 Alpha snapshot] "WARNING: QApplication was not created in the main() thread." from mapviewer example on Windows -           
- Closed
 
-         
- relates to
- 
                    QTBUG-66238 5.9.3 -> 5.9.4 regression: fa2a653 causes startup hang on Android -         
- Closed
 
-         
- resulted from
- 
                    QTBUG-65820 QStandardPaths::AppDataLocation is worong ("/") in Android Debug builds with Qt 5.9.4 snapshot -         
- Closed
 
-         
| For Gerrit Dashboard: QTBUG-65863 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 218705,3 | Android: Defer initialization of logging rules until qApp construction | 5.10.1 | qt/qtbase | Status: MERGED | +2 | 0 | 
| 219332,2 | Android: Defer initialization of logging rules until qApp construction | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |