Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.6.1
-
None
Description
Had press effect in Qt Quick Controls dialog that uses UniformAnimator. The dialog is destroyed after closed. The dialog was sometimes closed before the press effect had time to complete. This causes UniformAnimator to crash with the browser reporting "Uncaught RuntimeError: memory access out of bounds". AFAICS the issue only reproduces on the WebAssembly builds.
Update: Could also reproduce on low-end ARM Linux embedded device, though not on my Linux laptop.
Here is a simplified example:
Timer { interval: 100 repeat: true; running: true onTriggered: effect.createObject(parent) } Component { id: effect ShaderEffect { property real progress Component.onDestruction: console.log("Destroyed") UniformAnimator on progress { uniform: "progress" from: 0.0; to: 1.0 duration: 400 } Timer { interval: 100 running: true onTriggered: parent.destroy() } } }
The example is oversimplified, reproduces also in real-world scenarios with .qsb shaders and non-zero item dimensions defined.
The stack trace of the crash:
at memcmp (---.wasm:0x1dd93e8) at QQuickShaderEffectPrivate::findMappedShaderVariableId(:6931/QByteArray const&) const (http://localhost:6931/---.wasm) at QQuickShaderEffectPrivate::updateUniformValue(:6931/QByteArray const&, QVariant const&, QSGShaderEffectNode*) (http://localhost:6931/---.wasm) at QQuickShaderEffect::updateUniformValue(:6931/QByteArray const&, QVariant const&) (http://localhost:6931/---.wasm) at QQuickUniformAnimatorJob::updateCurrentTime(:6931/int) (http://localhost:6931/---.wasm) at QAbstractAnimationJob::setCurrentTime(:6931/int) (http://localhost:6931/---.wasm) at QParallelAnimationGroupJob::updateCurrentTime(:6931/int) (http://localhost:6931/---.wasm) at QAbstractAnimationJob::setCurrentTime(:6931/int) (http://localhost:6931/---.wasm) at QQmlAnimationTimer::updateAnimationsTime(:6931/long long) (http://localhost:6931/---.wasm) at QUnifiedTimer::updateAnimationTimers(:6931/) (http://localhost:6931/---.wasm)