webgl context is not released when destroy viewer!
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Sandcastle example:
create two viewer instances in one page. and then destroy on of them and rebuild. After 16 times will throw developError ' DeveloperError: Expected width to be greater than 0, actual value was 0 '. Chrome allow create 16 webgl context.
fix: Modify the Context class destroy method, append `this._gl.getExtension('WEBGL_lose_context').loseContext()`. This error will disappear. I'm not sure this is the best way to fix this problem.
Browser: Chrome
Operating System: windows 11
Contributor guide
Research direction
Start with the Context class destroy method mentioned in the issue, then run the described Sandcastle reproduction in Chrome by creating and destroying two viewer instances repeatedly. Verify whether destroyed viewers release their WebGL contexts and whether rebuilding them avoids the reported width error after 16 iterations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100