Qt
  1. Qt
  2. QTBUG-59026

Qt Quick Materials Controls crash on Android

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: P1: Critical P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.8.1, 5.9.0 Beta
    • Component/s: QtQuick: Controls 2
    • Labels:
      None
    • Environment:

      Android build, Qt Quick Controls Material 2

    • Commits:
      e91c9feab8a0cf4cff71cc68ab0f001b1531504f

      Description

      When using a RadioButton with the Material style, deploying on Android, I get the following runtime error:

      W libtestRadio.so: (null):0 ((null)): QQmlApplicationEngine failed to load component
      W libtestRadio.so: (null):0 ((null)): qrc:/main.qml:24 Type RadioButton unavailable
      W libtestRadio.so: file:///data/user/0/org.qtproject.example.testRadio/qt-reserved-files/qml/QtQuick/Controls.2/Material/qmldir:-1 plugin cannot be loaded for module ".data.user.0.org.qtproject.example.testRadio.qt-reserved-files.qml.QtQuick.Controls.2.Material": Module namespace 'QtQuick.Controls.Material' does not match import URI '.data.user.0.org.qtproject.example.testRadio.qt-reserved-files.qml.QtQuick.Controls.2.Material'

      I think this is related to ticket QTBUG-57618, where it is fixed, as some imports were missing.

      Don't know whether it can be checked that this is also valid for some other controls, not mentioned here or in the related ticked?

        Issue Links

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

          Activity

          Hide
          J-P Nurmi added a comment -

          Ok, I have a funny workaround... Just call QLocale::system() in main() before loading QML.

          Show
          J-P Nurmi added a comment - Ok, I have a funny workaround... Just call QLocale::system() in main() before loading QML.
          Hide
          Bartel Eerdekens added a comment - - edited

          As discussed on IRC, this workaround does not work for me (Samsung Galaxy Tab A, Android 6.0.1), as well using a minimal example...

          qDebug() << "Output " << QLocale() << QLocale::system();
          QLocale::system();
          qDebug() << "Output " << QLocale() << QLocale::system();
          

          outputs:

          D libtestRadio.so: (null):0 ((null)): Output  QLocale(English, Latin, UnitedKingdom) QLocale(English, Latin, UnitedKingdom)
          D libtestRadio.so: (null):0 ((null)): Output  QLocale(English, Latin, UnitedKingdom) QLocale(English, Latin, UnitedKingdom)
          
          Show
          Bartel Eerdekens added a comment - - edited As discussed on IRC, this workaround does not work for me (Samsung Galaxy Tab A, Android 6.0.1), as well using a minimal example... qDebug() << "Output " << QLocale() << QLocale::system(); QLocale::system(); qDebug() << "Output " << QLocale() << QLocale::system(); outputs: D libtestRadio.so: ( null ):0 (( null )): Output QLocale(English, Latin, UnitedKingdom) QLocale(English, Latin, UnitedKingdom) D libtestRadio.so: ( null ):0 (( null )): Output QLocale(English, Latin, UnitedKingdom) QLocale(English, Latin, UnitedKingdom)
          Hide
          J-P Nurmi added a comment -

          Sorry, I celebrated too early. It only fixed the earlier minimal test case, not the Gallery example case...

          Show
          J-P Nurmi added a comment - Sorry, I celebrated too early. It only fixed the earlier minimal test case, not the Gallery example case...
          Hide
          Ekkehard added a comment -

          FWIW: just blogged HowTo patch Qt 5.8 to fix this bug: https://appbus.wordpress.com/2017/02/28/patch-qt-5-8-0-for-qtbug-59026/
          thx J-P Nurmi

          Show
          Ekkehard added a comment - FWIW: just blogged HowTo patch Qt 5.8 to fix this bug: https://appbus.wordpress.com/2017/02/28/patch-qt-5-8-0-for-qtbug-59026/ thx J-P Nurmi
          Hide
          Thomas Senyk added a comment -

          Thx Nurmi for the fix!
          Thx Ekkehard for the blog post!
          Now we can all live happy with 5.8.0 and be more happy as soon as 5.9.0 is out

          Show
          Thomas Senyk added a comment - Thx Nurmi for the fix! Thx Ekkehard for the blog post! Now we can all live happy with 5.8.0 and be more happy as soon as 5.9.0 is out

            People

            • Assignee:
              J-P Nurmi
              Reporter:
              Bartel Eerdekens
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes