Figma's editor doesn't load anymore (0x0 webgl contexts start lost)
Categories
(Core :: Graphics: CanvasWebGL, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox72 | --- | unaffected |
firefox73 | --- | unaffected |
firefox74 | --- | fixed |
People
(Reporter: Harald, Assigned: jgilbert)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(1 file)
STR:
Open https://www.figma.com/file/CPUxAmWW5KMlZ293yn8pNp/Network%3A-Resource-Blocking
AR: Error and redirect to index page
exception thrown: TypeError: can't access property "match", glslVersion is null,_glGetString@https://static.figma.com/fullscreen/f2c6480893491800ae5e40f9813c8dad266e1e2f/compiled_wasm.js.br:2:280940
…
ER: Preview opens.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Not really sure what's going on, but I can repro it. Redirect-on-error makes it hard to try things, though!
Reporter | ||
Comment 2•4 years ago
|
||
Just for sake of completeness, mozregression linked to https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5cbf5bb11c585d69321b420f67ffb62544141427&tochange=e1b0906509efa6433978b9f980ec639b7eafbc6d
Assignee | ||
Comment 3•4 years ago
|
||
Here's the function:
function _glGetString(name_) {
if (GL.stringCache[name_]) return GL.stringCache[name_];
var ret;
switch (name_) {
case 7939:
var exts = GLctx.getSupportedExtensions() || [];
exts = exts.concat(exts.map(function(e) {
return "GL_" + e
}));
ret = stringToNewUTF8(exts.join(" "));
break;
case 7936:
case 7937:
case 37445:
case 37446:
var s = GLctx.getParameter(name_);
if (!s) {
GL.recordError(1280)
}
ret = stringToNewUTF8(s);
break;
case 7938:
var glVersion = GLctx.getParameter(GLctx.VERSION); {
glVersion = "OpenGL ES 2.0 (" + glVersion + ")"
}
ret = stringToNewUTF8(glVersion);
break;
case 35724:
var glslVersion = GLctx.getParameter(GLctx.SHADING_LANGUAGE_VERSION);
var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;
var ver_num = glslVersion.match(ver_re);
if (ver_num !== null) {
if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + "0";
glslVersion = "OpenGL ES GLSL ES " + ver_num[1] + " (" + glslVersion + ")"
}
ret = stringToNewUTF8(glslVersion);
break;
default:
GL.recordError(1280);
return 0
}
GL.stringCache[name_] = ret;
return ret
}
getParameter(GLctx.SHADING_LANGUAGE_VERSION) should only return null on context-loss. Context-loss code definitely changed, but the behavior as-tested hasn't, so this is somewhat surprising.
Assignee | ||
Comment 4•4 years ago
|
||
Catching this in the Firefox Debugger it looks like it's context-lost, but again, nothing is showing up in the log about it.
Assignee | ||
Comment 5•4 years ago
|
||
Got it.
Assignee | ||
Comment 6•4 years ago
|
||
There's a bug when creating a 0x0 context, where part of context creation logic sees that we're already at 0x0, and assumes this is a no-op resize request, not a context-creation request.
I'm working on adding a test.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Also, always resize, not just on change. (As per spec)
Assignee | ||
Comment 8•4 years ago
|
||
Adding spec text and a test:
https://github.com/KhronosGroup/WebGL/pull/3005
Assignee | ||
Comment 9•4 years ago
|
||
This does fix the Figma loading for me locally.
Comment 10•4 years ago
|
||
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c23ef124914 0x0 canvas yields 1x1 webgl context. r=lsalzman
Comment 11•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Description
•