Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.3.0 Beta1
-
None
-
Qt 5.3.0 beta1 for Android on Windows 7 (qt-opensource-windows-x86-android-5.3.0-beta)
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)
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:
}
where:
ParticleSystem
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()
"
}
Turbulence