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

Setting the height of a PreserveAspectCrop image to < 1 causes an assertion failure in QSGDefaultImageNode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.1
    • 5.2.0 RC1
    • None
    • Ubuntu 14.04
    • ef4cf6585a61a00e33091277217b6346a1e6e7fd

    Description

      When a QQuickImage has it's height set to less than 1 and it's fillMode is set to PreserveAspectCrop, it causes an assertion in QSGDefaultImageNode and aborts.

      ASSERT: "!m_targetRect.isEmpty()" in file scenegraph/qsgdefaultimagenode.cpp, line 336
      Aborted (core dumped)

      Test Code:

      import QtQuick 2.0
      
      Item {
          width: 300
          height: 100
      
      
          Rectangle {
              id: menu
      
              implicitHeight: 40
              color: "red"
              width: parent.width
      
              Timer {
                  running: true
                  interval: 500
                  onTriggered: menu.height=0.5
              }
      
              Image {
                  id: iconHelper
                  fillMode: Image.PreserveAspectCrop
                  source: "battery-000-charging.svg"
      
                  width: 40
                  height: parent.height
                  anchors {
                      left: parent.left
                      verticalCenter: parent.verticalCenter
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            dednick Nick Dedekind
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes