Skip to content

Make silent render failures loud, off the hot path - #339

Merged
bdero merged 6 commits into
masterfrom
bdero/silent-failures
Aug 18, 2026
Merged

Make silent render failures loud, off the hot path#339
bdero merged 6 commits into
masterfrom
bdero/silent-failures

Conversation

@bdero

@bdero bdero commented Aug 18, 2026

Copy link
Copy Markdown
Owner

A batch of silent-failure fixes from the same measurement work behind #338. Each turns a mistake that produced wrong or missing output with no diagnostic into something that says what went wrong, keeping the fix off the release hot paths.

The highest-leverage one is a "nothing was drawn" diagnostic. Four separate mistakes all produce an identical blank frame and only one previously said anything, so a debug-only diagnostic on the zero-draw path now names the cause it can distinguish. Alongside it, degenerate cameras assert (including a field of view passed in degrees, the classic cross-engine slip), the web backend throws on a bind to a shader slot that does not exist instead of silently sampling the wrong texture, skinned uploads and custom attributes reject a buffer that does not match the vertex count, a mesh recomputes bounds when its geometry is replaced, and an animation clip that binds none of its channels asserts.

Every per-frame check is inside assert or a one-shot latched print, so release builds pay nothing on the render loop. The throwing checks are upload-time, once per resource.

Also documents why a native build ships an unused GLES shader bundle: the redundant hook invocation is byte-identical to a web build, which needs that bundle, so it cannot be skipped at this layer. A test locks the finding and will flip if a future Flutter names the platform on that input. The real fix belongs upstream.

Rides the unreleased 0.22.0.

@bdero bdero added rendering Behavior when preparing or drawing geometry to the screen. bug Something isn't working. labels Aug 18, 2026
@argos-ci

argos-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
android_gles (Inspect) ✅ No changes detected - Aug 18, 2026, 4:39 PM
android_vulkan (Inspect) ✅ No changes detected - Aug 18, 2026, 4:38 PM
linux (Inspect) ✅ No changes detected - Aug 18, 2026, 4:39 PM
web (Inspect) ✅ No changes detected - Aug 18, 2026, 4:35 PM
windows (Inspect) ✅ No changes detected - Aug 18, 2026, 4:36 PM

bdero added 6 commits August 18, 2026 09:27
Four mistakes all produce an identical blank frame and only one said
anything. A debug diagnostic on the zero-draw path names the cause it can
distinguish, and degenerate cameras assert with the fix, including the
degrees-for-radians field of view every other engine invites. All inside
assert, so release pays nothing.
A skinned upload and setCustomAttribute took any length and rendered
garbage. Both check the byte count now. A mesh also recomputes bounds when
its primitive geometry is replaced, instead of over-culling until a manual
dirty call.
The web shim swallowed a bind to a uniform or texture name the shader does
not declare, so a typo sampled whatever was bound last, wrong on web only.
It throws now, from the same reflection native reads.
A clip bound to the wrong node plays while nothing moves. Binding zero of
a non-empty clip's channels now asserts in debug, naming the wanted nodes
so a name mismatch is visible. Partial binds stay silent.
The redundant hook invocation is byte-identical to a web build, which
needs that bundle, so it cannot be skipped at this layer. Document the
constraint and lock it with a test that flips if the invoker ever names
the platform.
@bdero
bdero force-pushed the bdero/silent-failures branch from ba49988 to 4e2fd0b Compare August 18, 2026 16:28
@bdero
bdero merged commit 2baee17 into master Aug 18, 2026
19 checks passed
@bdero
bdero deleted the bdero/silent-failures branch August 18, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. rendering Behavior when preparing or drawing geometry to the screen.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant