Fix missing/white photo in forms on some android 9 devices#4594
Merged
Conversation
Coverage Report for CI Build 29210253804Coverage increased (+0.1%) to 59.115%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions3 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes this issue found in regression testing
Bug description by claude
Root cause: not a masking/shader bug — the mask/MultiEffect shader
itself renders correctly. The actual trigger is Android tearing
down and recreating the EGL surface across an app pause/resume (makeCurrent(): no EGLSurface,
DequeueBuffer: dequeueBuffer failed, eglSwapBuffers failed: 300d = EGL_BAD_SURFACE). The
photo's source gets (re)assigned right in that unstable window — before Qt::ApplicationActive
is even reported — so the layer's first real render for that photo lands on a dead surface and
produces a corrupted/blank (white) texture that nothing subsequently invalidates.
I checked upstream: QTBUG-118231 (hello Trimble :) )covers this exact symptom family (matches your log lines
closely) but was fixed in 6.8+, and you're on 6.10.3 — so the general surface-recreation fix is
already in your Qt build. What's left is the residual case Qt's fix doesn't cover: a layered
item's texture specifically going stale/corrupt for that one bad frame, with nothing telling it
to redraw afterward. I didn't find that specific case already filed.
Fix watches Qt.application.stateChanged, and
once the app reports ApplicationActive again, disables and re-enables both layers (root and
maskRect) via Qt.callLater to force the scene graph to regenerate their offscreen textures
against the now-stable surface.