Webgl followups#201
Merged
Merged
Conversation
Chrome 102+ deprecates apple-mobile-web-app-capable and emits a console warning on every page load asking for the unprefixed mobile-web-app-capable to be included. Keep the Apple-prefixed tag for iOS Home Screen and add the standard one alongside it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
LocalGraphView blew up the route-level Error Boundary with
TypeError: Cannot read properties of null (reading 'blendFunc')
at new Sigma (...)
whenever Sigma's constructor called gl.blendFunc(...) on a null WebGL
context. The root cause is the browser's per-tab WebGL context cap
(~16 on Chrome, ~8 on Safari): sigma.kill() detaches the canvas but the
underlying GL context lingers until GC, so rapid re-centers of the local
graph (combined with the always-mounted main SigmaCanvas) eventually
exhaust the pool. The next `new Sigma` then receives a canvas whose
getContext returns null and crashes on the first GL state call.
Two changes:
1. Introduce a releaseSigma() helper that calls sigma.kill() and then
explicitly invokes WEBGL_lose_context.loseContext() on every canvas
inside the container. That frees the GL slot immediately rather than
waiting on GC. Use it from both the in-effect "previous sigma" cleanup
and the effect's return cleanup.
2. Wrap `new Sigma(...)` in try/catch. If the context can't be acquired
we surface a friendly error state instead of letting the crash hit
the Error Boundary and blank the whole page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
No description provided.