Bug 200031

Summary: WebGL context creation is broken when using video textures
Product: WebKit Reporter: Yehonatan Daniv <maggotfish>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Critical CC: dino, eric.carlson, jer.noble, justin_fan, maggotfish, mmaxfield, noam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.14   
Attachments:
Description Flags
bug reproduction
none
Crash log
none
Testcase - works for me none

Description Yehonatan Daniv 2019-07-23 06:20:28 PDT
Created attachment 374680 [details]
bug reproduction

When creating a webgl context and drawing form video texture a few weird things happen:

1. max active contexts limit is suddenly 8.
2. creating an additional context returns `null`.
3. creating *another* context crashes the tab, and causing a refresh.

Seems to be happening on Safari on all platforms.

I have created a reproduction of the bug in a simple webgl program that creates context, loads videosm and draws a frame, on every button click.

First 8 clicks work fine.
9th click returns `null` (instead of a new recycled context) and causes an error.
10th click crashes the tab, after trying to recycle the same context from before and printing: `WebGL: INVALID_OPERATION: loseContext: context already lost`.



Also attaching the error log.
Comment 1 Yehonatan Daniv 2019-07-23 06:27:17 PDT
Created attachment 374681 [details]
Crash log
Comment 2 Radar WebKit Bug Importer 2019-07-24 13:07:54 PDT
<rdar://problem/53509448>
Comment 3 Yehonatan Daniv 2021-05-24 05:40:34 PDT
Ping, it's almost 2 years now. Any chance someone can take a look?
Comment 4 Noam Rosenthal 2021-06-15 07:59:06 PDT
Created attachment 431439 [details]
Testcase - works for me

I tried to reproduce it with a refined test-case and things seem to work as expected, maybe something is missing in the test case?
Comment 5 Yehonatan Daniv 2021-06-15 23:39:09 PDT
Thanks Noam! Seems to be fixed in Safari 14.1.1