fix contextrestored webgl renderer call#1476
Merged
BryonLewis merged 6 commits intomasterfrom Apr 23, 2026
Merged
Conversation
0f54f80 to
bf54180
Compare
e3fd60a to
190b24d
Compare
190b24d to
37052c7
Compare
manthey
approved these changes
Apr 23, 2026
Contributor
manthey
left a comment
There was a problem hiding this comment.
Excellent. Thanks for working through this.
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.
Noticed a frequent issue in BatAI with this specific error:
d.renderWindow(...)._init is not a functionWith this stack trace:
The specific line is here: https://github.com/OpenGeoscience/geojs/blob/master/src/webgl/webglRenderer.js#L96
I'm guessing it can be happening with annotators and BatAI because of the rather large webGL context it can jump between in a SPA (very large images tiled together along with a decent amount of line annotations).
The problem is that it apppears that the
m_viewer.renderWindow()doesn't have a function called._init()See: https://github.com/OpenGeoscience/geojs/blob/master/src/vgl/renderWindow.js
Specifically, there seems to be a function called
_setupand not_initat: https://github.com/OpenGeoscience/geojs/blob/master/src/vgl/renderWindow.js#L131It looks like items outside of
/vgluse_init()frequently but items inside of that folder seem to use_setupmore often.20260423 Update:
WEBGL_lose_contextextension for WebGL: https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context