Bug 200031 - WebGL context creation is broken when using video textures
Summary: WebGL context creation is broken when using video textures
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 12
Hardware: Macintosh macOS 10.14
: P2 Critical
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-07-23 06:20 PDT by Yehonatan Daniv
Modified: 2019-07-24 13:07 PDT (History)
7 users (show)

See Also:

bug reproduction (10.27 KB, text/html)
2019-07-23 06:20 PDT, Yehonatan Daniv
no flags Details
Crash log (156.32 KB, text/plain)
2019-07-23 06:27 PDT, Yehonatan Daniv
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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