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

qml compiler generates invalid code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • 6.6.0 Beta3
    • QML: Compiler
    • None
    • macOS

    Description

      For the attached example the qml compiler generates code that crashes at runtime. Looks a little bit like QTBUG-114815.

      Workaround (and much better API) is to to give the property foo the proper flags type Foos.

      However assigning enum values to int is perfectly legal and should not crash.

      Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      0   QtQml                         	       0x10603be3f QQmlPrivate::AOTCompiledContext::getEnumLookup(unsigned int, void*) const + 47 (qqml.cpp:1946)
      1   appinvalid_enum_property_code 	       0x105afc8d6 QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::$_0::operator()(QQmlPrivate::AOTCompiledContext const*, void*, void**) const::'lambda'(QQmlPrivate::AOTCompiledContext const*, void**)::operator()(QQmlPrivate::AOTCompiledContext const*, void**) const + 38 (appinvalid_enum_property_code_Main_qml.cpp:206)
      2   appinvalid_enum_property_code 	       0x105afc88c void QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::wrapCall<QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::$_0::operator()(QQmlPrivate::AOTCompiledContext const*, void*, void**) const::'lambda'(QQmlPrivate::AOTCompiledContext const*, void**)>(QQmlPrivate::AOTCompiledContext const*, void*, void**, QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::$_0::operator()(QQmlPrivate::AOTCompiledContext const*, void*, void**) const::'lambda'(QQmlPrivate::AOTCompiledContext const*, void**)&&) + 60 (appinvalid_enum_property_code_Main_qml.cpp:190)
      3   appinvalid_enum_property_code 	       0x105afc83d QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::$_0::operator()(QQmlPrivate::AOTCompiledContext const*, void*, void**) const + 45 (appinvalid_enum_property_code_Main_qml.cpp:200)
      4   appinvalid_enum_property_code 	       0x105afc7b5 QmlCacheGeneratedCode::_qt_qml_invalid_enum_property_code_Main_qml::$_0::__invoke(QQmlPrivate::AOTCompiledContext const*, void*, void**) + 37 (appinvalid_enum_property_code_Main_qml.cpp:199)
      

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            njeisecke Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes