New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 646772 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 646737
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All , Mac
Pri: 1
Type: Bug-Regression

Blocked on:
issue 646737



Sign in to add a comment

Unity WebGL content not rendering correctly

Reported by jo...@unity3d.com, Sep 14 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.16 Safari/537.36

Example URL:
http://files.unity3d.com/jonas/AngryBots/

Steps to reproduce the problem:
Open http://files.unity3d.com/jonas/AngryBots/, and try to play the game.

What is the expected behavior?
The game renders correctly.

What went wrong?
Everything looks pink.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? Yes Chrome 53.

Does this work in other browsers? Yes 

Chrome version: 54.0.2840.16  Channel: beta
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 23.0 r0

This issue appears to be because Unity fails to load any of it's shaders in Chrome 54 (pink is the "error shader"), which can also be seen on the console. Possibly related to https://bugs.chromium.org/p/chromium/issues/detail?id=646737 , which also seems to fail in shader parsing.
 
Components: Blink>WebGL
Status: Untriaged (was: Unconfirmed)
I reproduced this failure with 54.0.2840.16 on 10.12 beta, but I did not reproduce it with 55.0.2853.0.

Over to Blink>WebGL for further triage.

Comment 2 by kbr@chromium.org, Sep 14 2016

Blockedon: 646737
Cc: geoffl...@chromium.org cwallez@chromium.org jmad...@chromium.org
Components: Internals>GPU>ANGLE
Labels: -Pri-2 -Type-Compat OS-All Pri-1 Type-Bug-Regression
ANGLE folks: could one of you please help triage this? It sounds like a change in the shader translator.

Comment 3 by kbr@chromium.org, Sep 14 2016

Labels: ReleaseBlock-Stable
Owner: kainino@chromium.org
Almost certainly the same as
https://bugs.chromium.org/p/chromium/issues/detail?id=646737

Comment 6 by kbr@chromium.org, Sep 14 2016

Status: Assigned (was: Untriaged)
I agree. Let's duplicate this into the other bug once that's confirmed.

They both start failing and start passing again on the same V8 rolls. Is that enough to confirm it's a duplicate?

Comment 8 by kbr@chromium.org, Sep 14 2016

Let's leave this one open until we've confirmed that the fix (i.e., cherry-pick or revert on the V8 tree) fixes both. This is a really serious regression. Separately, it would be ideal if we could construct a regression test for this and add it to the WebGL conformance suite. If you can manage to track down the shader sources for one of the failing shader compilations, maybe we can figure out the pattern that causes it to fail.

I'm looking at this once since I was able to more easily pull it onto my local disk and beautify the asm.js source.

I don't see anything suspicious happening in shader compilation/program linking - the compile and link statuses seem fine - but I also don't know what Unity-internal logic prints "WARNING: Shader Unsupported: '...' - Setting to default shader." So I don't know how I can figure out what Unity thinks is wrong.

Comment 10 by kbr@chromium.org, Sep 15 2016

Hmm. Did you instrument the calls to glGetShaderiv for GL_COMPILE_STATUS and/or glGetProgramiv for GL_LINK_STATUS, on the service side, when either returns false? I have to assume that Unity's checking the return codes from those. Or maybe they're checking GL_VALIDATE_STATUS or something else? A ProgramInfoLog that's non-null? That was a problem at one point, where Chrome was returning a string that contained only a bogus null terminator.

Jonas, can you help us understand exactly how Unity's checking for these shaders being unsupported?

Comment 11 by kainino@google.com, Sep 15 2016

I only looked at the JS side. I put breakpoints on the asm.js implementations for CompileShader and LinkProgram and checked the compile and link status from the console (although I could have easily enough done the same thing by editing the asm.js code). I checked these statuses for all 2 programs that link before the first error is printed and they all returned true. I did not try breakpointing at the ProgramInfoLog implementation yet.

Comment 12 by jo...@unity3d.com, Sep 15 2016

I actually don't think that this problem is related to shader handling in WebGL. Looking at https://bugs.chromium.org/p/chromium/issues/detail?id=646737#c13 (which I assume to be identical given the bisect), that one actually seems to fail in *our* shader parsing code, before anything gets passed to WebGL. In that case, the parser seems to hit a buffer overflow, in this one it just seems to fail. In either case, it seems that a change in V8 caused the flow of our code to break, and that seems to be the real problem here.
Cc: jo...@unity3d.com
Jonas, I agree. The V8 team has taken over in
https://bugs.chromium.org/p/chromium/issues/detail?id=646737
I'll let them handle this going forward.

Comment 14 by kbr@chromium.org, Sep 26 2016

Mergedinto: 646737
Status: Duplicate (was: Assigned)
In that case the thing to do is duplicate this into the other bug. I'll take care of that.

Sign in to add a comment