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

Failed assertion in qv4ssa.cpp when loading QML file

    XMLWordPrintable

    Details

    • Commits:
      48c45418cce7a377eb9117b2f120d5d5aaf3530a

      Description

      The following QML code causes a crash (failed assertion) in the QML engine:

      import QtQuick 2.1
      Rectangle {
          function foo()
          {
              for(var i = 0; i < 1; i++)
              {
                  if(i >= 0)
                      break
      
                  return
              }
      
          }
      }
      

      The output I receive:

      ASSERT: "semi[y] == p" in file compiler\qv4ssa.cpp, line 281
      Debug Error!

      Program: C:\Qt\Qt5.2.0Beta\5.2.0-beta1\msvc2012\bin\Qt5Cored.dll
      Module: 5.2.0
      File: global\qglobal.cpp
      Line: 2050

      ASSERT: "semi[y] == p" in file compiler\qv4ssa.cpp, line 281


      The bug can be triggered either by using QQmlApplicationEngine::load or Qt.createComponent.

      The code above is actually a senseless, simplified example but this is a blocker for my project. (it seems to be about "conditional break before return")

      This bug may be the same issue as QTBUG-34256.

        Attachments

        1. crash.qml
          0.2 kB
        2. main.cpp
          0.2 kB

          Issue Links

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

            Activity

              People

              Assignee:
              erikv Erik Verbruggen
              Reporter:
              mwu Michał Urbańczyk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes