microsoft / WSA

Developer-related issues and feature requests for Windows Subsystem for Android
MIT License
1.46k stars 798 forks source link

[ERROR:shared_context_state.cc(78)] Skia shader compilation error #475

Open stleusc opened 7 months ago

stleusc commented 7 months ago

Steps to reproduce

I have a webview in an Android app and all I show in it is very simple custom html code. Event when only loading:

<html><pre>
Test
Test2
</pre></html>

The text does not show on occasion. I am fairly certain it started with the latest insider version (2310.40000.1.0) It is hard to reproduce since sometimes just restarting the app seems to fix the issue. Sometimes repeated triggering of the code that loads this html suddenly work and Skia does not crash.

There is a Chromium bug that seems to be related: https://bugs.chromium.org/p/chromium/issues/detail?id=1442633

Wondering if this made its way here?

✔️ Expected Behavior

no crash

❌ Actual Behavior

Skia crash with

 [ERROR:shared_context_state.cc(78)] Skia shader compilation error
 ------------------------
 // Vertex SKSL
 uniform float4 sk_RTAdjust;in float2 position;in float2 localCoord;out float2 vlocalCoord_S0;void main() {// Primitive Processor QuadPerEdgeAAGeometryProcessor
 vlocalCoord_S0 = localCoord;sk_Position = position.xy01;}
 // Fragment SKSL
 uniform sampler2D uTextureSampler_0_S0;
 in float2 vlocalCoord_S0;void main() {// Stage 0, QuadPerEdgeAAGeometryProcessor
 half4 outputColor_S0 = half4(1);float2 texCoord;texCoord = vlocalCoord_S0;outputColor_S0 = (blend_modulate(sample(uTextureSampler_0_S0, texCoord), half4(1)));const half4 outputCoverage_S0 = half4(1);{ // Xfer Processor: Porter Duff
 sk_FragColor = outputColor_S0 * outputCoverage_S0;}}
 // Vertex GLSL
 #version 300 es

 precision mediump float;
 precision mediump sampler2D;
 uniform highp vec4 sk_RTAdjust;
 in highp vec2 position;
 in highp vec2 localCoord;
 out highp vec2 vlocalCoord_S0;
 void main() {
     vlocalCoord_S0 = localCoord;
     gl_Position = vec4(position, 0.0, 1.0);
     gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
 }

 // Fragment GLSL
 #version 300 es

 precision mediump float;
 precision mediump sampler2D;
 out mediump vec4 sk_FragColor;
 uniform sampler2D uTextureSampler_0_S0;
 in highp vec2 vlocalCoord_S0;
 void main() {
     mediump vec4 outputColor_S0 = vec4(1.0);
     highp vec2 texCoord = vlocalCoord_S0;
     outputColor_S0 = texture(uTextureSampler_0_S0, texCoord, -0.5);
     {
         sk_FragColor = outputColor_S0;
     }
 }

 Errors:
 link failed but did not provide an info log

Other Software

No response

Please specify the version of Windows Subsystem for Android

2310.40000.1.0