Skip to content

Fix missing/white photo in forms on some android 9 devices#4594

Merged
Withalion merged 1 commit into
masterfrom
fix/android-9-missing-photo
Jul 13, 2026
Merged

Fix missing/white photo in forms on some android 9 devices#4594
Withalion merged 1 commit into
masterfrom
fix/android-9-missing-photo

Conversation

@Withalion

Copy link
Copy Markdown
Collaborator

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.

@Withalion
Withalion requested a review from tomasMizera July 12, 2026 21:52
@Withalion Withalion self-assigned this Jul 12, 2026
@github-actions

Copy link
Copy Markdown

Coverage Report for CI Build 29210253804

Coverage increased (+0.1%) to 59.115%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 3 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
mm/core/merginapi.cpp 3 75.3%

Coverage Stats

Coverage Status
Relevant Lines: 15639
Covered Lines: 9245
Line Coverage: 59.12%
Coverage Strength: 97.4 hits per line

💛 - Coveralls

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 70151 dmg Expires: 10/10/2026 #7015
linux Build 📬 Mergin Maps 70411 x86_64 Expires: 10/10/2026 #7041
win64 Build 📬 Mergin Maps 62151 win64 Expires: 10/10/2026 #6215
Android Build 📬 Mergin Maps 832551 APK [arm64-v8a] Expires: 10/10/2026 #8325
📬 Mergin Maps 832551 APK [arm64-v8a] Google Play Store #8325
Android Build 📬 Mergin Maps 832511 APK [armeabi-v7a] Expires: 10/10/2026 #8325
📬 Mergin Maps 832511 APK [armeabi-v7a] Google Play Store #8325
iOS Build 📬 Build number: 26.07.926711 #9267

@tomasMizera tomasMizera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯

@Withalion
Withalion merged commit 7ad87e0 into master Jul 13, 2026
13 checks passed
@Withalion
Withalion deleted the fix/android-9-missing-photo branch July 13, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants