Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-31600

Infinite loop / crash when a QML module imports itself

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 14.0.1
    • Quick / QML Support
    • Linux/X11

    Description

      When experimenting with qt_add_qml_module I (accidentally) came up with this CMakeFile:

      qt_add_qml_module(MCGui
          URI MC.Gui
          VERSION 1.0
          NO_PLUGIN
          ENABLE_TYPE_COMPILER
          IMPORTS
          MC.Gui
          QtQuick
          QtQuick.Controls
          QtQuick.Controls.Basic
          QML_FILES
          Some.qml
          Files.qml
      )
      

      Note that MC.Gui imports MC.Gui (itself.)

      It made my Qt Creator crash because of an infinite loop. It does not crash when removing the offending line.

      Please find the backtrace attached. It seems that QmlJS::LinkPrivate::importLibrary is calling itself recursively without protection against infinite loop.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            abrooke Aurélien Brooke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes