-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Force webgl context removal in Context.prototype.destroy #12693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Force webgl context removal in Context.prototype.destroy #12693
Conversation
Thank you for the pull request, @ethanchristensen01! ✅ We can confirm we have a CLA on file for you. |
As mentioned in the issue, it looks like this change ~"serves its purpose", and I don't see too much potential for any "negative side-effects" (What could be a "negative side effect" of destroying something, except for that thing being destroyed...?) When trying it out with the sandcastles in the issue, I wondered whether this can be sensibly covered with unit tests. Could it, at least in theory, be possible to do some EDIT: The failing test is only linting. |
Running prettier on my machine changes hundreds of files. On the file modified here, it removes all trailing commas among other things. Is there some configuration for prettier that isn't currently kept in the repo? |
I just ran it locally on this branch. There are some changes that I cannot explain (and they already have been merged into main via 194f9f3 - no idea where these changes are coming from - maybe @jjhembd knows?). But apart from that, the changes should really be about newlines in the file that was modified here: |
Ah, that explains why I couldn't see any changes. I'll fix that in about 16 hours probably. |
@javagl the commit 194f9f3 was just aligning #12558 with I think the actual source is the |
Description
Try to force webgl context loss in Context.prototype.destroy so resources can be cleared when the CesiumWidget/Viewer are destroyed.
Issue number and link
#11533 (#11533)
Testing plan
With this sandcastle below, click "test button" to open a dialog with a cesium viewer inside, and click the "x" button to close it and destroy the viewer. Repeat this process 16 times.
Before, this would have crashed Cesium (specifically on Chrome, I think).
https://sandcastle.cesium.com/#c=nVYLb9s2EP4rhLfBMmrTstMMheMEQ9MNGNChxTJsA+ICpSRKIkKTGkn50SD/fUe9TCpygs0wYOl49913T3ojNiKWQhsUU83K7a0UhjBBFbpGouR8I1D1GdRZdkqtGqcG7RjdU7WYNg/L02kLIkyFf78IcThFlzj80mqkpYgNkwIxwcxt5S1gyQQ9tgpnmABaIuNyC9A4o+ZnTu3j++OviTU/GZ/4Wep0j2of+M9KFvRQ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