Qt 5.3.1 fails on Android



  • I just updated from 5.3 to 5.3.1 and now my UI doesn't show up. When the QML file is loaded I get the following errors on output:

    bq. D/Qt (10987): qtcpserverconnection.cpp:173 (void QTcpServerConnection::listen()): QML Debugger: Waiting for connection on port 52475...
    D/Qt (10987): fontdatabases/basic/qbasicfontdatabase.cpp:239 (static QStringList QBasicFontDatabase::addTTFile(const QByteArray&, const QByteArray&, QSupportedWritingSystems*)): FT_New_Face failed with index 0 : 90
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=40
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=81
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=10
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=37
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=45
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=56
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=58
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=59
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=61
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=65
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=72
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=84
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=94
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=510
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=774
    W/Qt (10987): ../gui/text/qfontengine_ft.cpp:894 (QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const): load glyph failed err=24 face=0x790886f8, glyph=227
    W/Adreno-ES20(10987): <process_gl_state_enables:511>: GL_INVALID_ENUM

    Any ideas?



  • Same problem here :(



  • The problem comes from using of QML's Screen or using of QScreen in the main.cpp.
    Have you used one of the above?



  • You can use this code:
    @
    #ifdef Q_OS_ANDROID
    QAndroidJniObject qtActivity = QAndroidJniObject::callStaticObjectMethod("org/qtproject/qt5/android/QtNative", "activity", "()Landroid/app/Activity;");
    QAndroidJniObject resources = qtActivity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
    QAndroidJniObject displayMetrics = resources.callObjectMethod("getDisplayMetrics", "()Landroid/util/DisplayMetrics;");
    QAndroidJniObject configuration = resources.callObjectMethod("getConfiguration", "()Landroid/content/res/Configuration;");

        int screenLayout = configuration.getField<int>("screenLayout");
        int screenLayoutSizeMask = QAndroidJniObject::getStaticField<int>("android.content.res.Configuration", "SCREENLAYOUT_SIZE_MASK");
    
        int screenLayoutSizeXLarge = QAndroidJniObject::getStaticField<int>("android.content.res.Configuration", "SCREENLAYOUT_SIZE_XLARGE");
        int screenLayoutSizeLarge = QAndroidJniObject::getStaticField<int>("android.content.res.Configuration", "SCREENLAYOUT_SIZE_LARGE");
        int screenLayoutSizeNormal = QAndroidJniObject::getStaticField<int>("android.content.res.Configuration", "SCREENLAYOUT_SIZE_NORMAL");
        int screenLayoutSizeSmall = QAndroidJniObject::getStaticField<int>("android.content.res.Configuration", "SCREENLAYOUT_SIZE_SMALL");
    
        int screenSize = screenLayout & screenLayoutSizeMask;
    
        screenSizeStr = "undefined";
        if (screenSize == screenLayoutSizeSmall)
            screenSizeStr = "small";
        else if (screenSize == screenLayoutSizeNormal)
            screenSizeStr = "normal";
        else if (screenSize == screenLayoutSizeLarge)
            screenSizeStr = "large";
        else if (screenSize == screenLayoutSizeXLarge)
            screenSizeStr = "xlarge";
    
        ddpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_DEFAULT");
        ldpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_LOW");
        mdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_MEDIUM");
        hdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_HIGH");
        xhdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_XHIGH");
        x_xhdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_400");
        xxhdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_XXHIGH");
        xxxhdpi = QAndroidJniObject::getStaticField<int>("android.util.DisplayMetrics", "DENSITY_XXXHIGH");
    
        densityDpi = displayMetrics.getField<int>("densityDpi");
        dp = 1.0f * densityDpi / mdpi;
    
        screenType = "ddpi";
        if (densityDpi == ldpi)
            screenType = "ldpi";
        else if (densityDpi == mdpi)
            screenType = "mdpi";
        else if (densityDpi == hdpi)
            screenType = "hdpi";
        else if (densityDpi == xhdpi)
            screenType = "xhdpi";
        else if (densityDpi == x_xhdpi)
            screenType = "x_xhdpi";
        else if (densityDpi == xxhdpi)
            screenType = "xxhdpi";
        else if (densityDpi == xxxhdpi)
            screenType = "xxxhdpi";
    #else
    

    @

    maybe this can be a good workaround ;-)


  • Moderators

    Before trying workarounds, I suggest checking out Qt 5.4 alpha version, or Qt 5.3.2 snapshot - a lot of issues have been fixed there (for example, screen orientation bug introduced in 5.3.1).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.