NEW 263737
WebGL app crashes browser tab, displays artefacts, corrupts frame buffer of some external apps
https://bugs.webkit.org/show_bug.cgi?id=263737
Summary WebGL app crashes browser tab, displays artefacts, corrupts frame buffer of s...
Daniel Balog
Reported 2023-10-26 11:54:41 PDT
We are having some issues right now when we make a small modification to our WebGL fragment shader, the Safari browser tab will show block-shaped artefacts, and eventually turn into a black screen. Sometimes, paired with this, the screen will flicker and turn purple. Sometimes other applications will also be affected, causing their menu-bars to be corrupted and display as a pink color. The issue can be reproduced by opening the following app (and waiting for a few seconds for it to fully load) in Safari: * https://demo.luciad.com/SafariCrash/Crash/ In contrast, the following link will not when opened in Safari: * https://demo.luciad.com/SafariCrash/NoCrash/ The only difference between these two is that the first one has an additional negation "!" on line 795 of its fragment shader: ``` bool expVisibility = (!(obbContains(uPbf32cb21330d4f488e56b7f1b5399495, uP91661124b56445b6b535bff5f660cb8f, uP4fdbc5901e004423b93c543048182783, uP0674c263053247f9ac1f3f43621040f5, uP74ed0da32f0c46988ce6ca6a8c027e9d, uPc514f32b4ca5440da27ac9ae36036e12, uP73dcaa87566f49b5accc76532bec9829, uP60c71bd490b74b12ad7954e503ddabc4, uP6755c4c3f08c423a9509af88ad2682a7, uPf81428ee1f354e4a95e6e180e2e37b54, vPosition))); if (!expVisibility) { discard; } ``` If this exclamation mark is removed, the crash does not occur.
Attachments
Kimmo Kinnunen
Comment 1 2023-10-30 02:23:28 PDT
Thank you for the report. I could not immediately reproduce the problem with my setup, MBP with M1, Sonoma prerelease. I opened the url and zoomed in and out of the planet. I saw mostly gray terrain texture, mostly blurry and some black blob sometimes. Also the license text. Could you specify: - hardware (mbp, imac, CPU type) - operating system version - browser version if not default of the operating system - repro steps if not just opening the url. If there is a crash, you can access it typically with "Console" application crash list. Attaching the crash report would be helpful.
Kimmo Kinnunen
Comment 2 2023-10-30 02:26:48 PDT
I see the version numbers being listed as macOS 13. Minor number would be useful, too. Additionally you could try with the Safari Technology Preview or Safari Beta, and see if the problem has been fixed in newer versions: https://developer.apple.com/safari/resources/
Radar WebKit Bug Importer
Comment 3 2023-11-02 11:55:14 PDT
Daniel Balog
Comment 4 2023-11-22 23:56:27 PST
So I just upgraded to the latest MacOS minor version, and the situation is a bit better. I not get a WebGL Context Lost, which seems to be limited to Safari, and doesn't leak to external applications as it did before. Specs: MacOS 13.6.2 Safari 17.1 MacBook Pro M1 Max Steps to reproduce: * Open link on MacOS 13.6.2 -> http://demo.luciad.com/SafariCrash/Crash/ * Do not interact with view, let it fully load (This can take a half a minute as it runs on an EU server) * WebGL Context will be lost + potentially you will see some blocky artefacts on the screen This issue can not be reproduced on MacOS 14. It seems to be fixed there. The issue can be reproduced with the latest Safari Technology Preview on MacOS 13.6.2
Note You need to log in before you can comment on or make changes to this bug.