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

QML Turbulance when re-enabled crashes on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.3.0 Beta1
    • QPA
    • None
    • Qt 5.3.0 beta1 for Android on Windows 7 (qt-opensource-windows-x86-android-5.3.0-beta)
    • Android

    Description

      The QML Turbulence Element causes Android apps to crash when the enabled property is set then disabled and set again after a burst release of particules. The crash occurs in:

      QQuickTurbulenceAffector::initializeGrid()

      when the imageInAnim() is called followed by the imageOutAnim() everything is as expected but should a subsequent imageInAnim() be called the crash is always seen. The same code runs OK on Windows.

      The QML code is as in the CustomParticule "blow out" example but below lives inside a flickable.

      Item {
      id: effectBox
      width: parent.width
      height: parent.height
      anchors.centerIn: parent
      function visible(val)

      { image.visible = val; }

      function imageInAnim()

      { visible(false); noiseIn.visible = true; endEffectTimer.restart(); }

      function imageOutAnim()

      { visible(false); noiseIn.visible = false; turbulence.enabled = true; endEffectTimer.restart(); pixelEmitter.burst(2048); }

      Timer {
      id: endEffectTimer
      interval: 2000
      repeat: false
      running: false
      onTriggered:

      { turbulence.enabled = false; noiseIn.visible = false; effectBox.visible(true); }

      }

      where:
      ParticleSystem

      { id: imageSystem }

      Emitter

      { id: pixelEmitter system: imageSystem width: Math.max(parent.width, flickable.width); height: Math.max(parent.height, flickable.height); anchors.centerIn: parent size: 4 lifeSpan: animates * 2 emitRate: 2048 enabled: false }

      CustomParticle {
      id: blowOut
      system: imageSystem
      property real maxWidth: effectBox.width
      property real maxHeight: effectBox.height
      vertexShader:"
      uniform highp float maxWidth;
      uniform highp float maxHeight;

      varying highp vec2 fTex2;

      void main()

      { defaultMain(); fTex2 = vec2(qt_ParticlePos.x / maxWidth, qt_ParticlePos.y / maxHeight); }

      "
      property variant pictureTexture: pictureSource
      fragmentShader: "
      uniform lowp float qt_Opacity;
      uniform sampler2D pictureTexture;
      varying highp vec2 fTex2;
      void main()

      { gl_FragColor = texture2D(pictureTexture, fTex2) * qt_Opacity; }

      "
      }
      Turbulence

      { //only fill visible rect id: turbulence system: imageSystem anchors.fill: parent strength: 240 enabled: false }

      Attachments

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

        Activity

          People

            rampe Rami Potinkara
            davered David Robinson
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes