# SurfaceLic crash on 2D .vtu in ParaView 5.8.0 and 5.8.1

**URL:** https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275
**Category:** ParaView Support
**Created:** [September 4, 2020, 11:37pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275 "2020-09-04T23:37:37Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bujack](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c89c15/32.png) [@bujack](https://discourse.paraview.org/u/bujack)
#### Post date: [September 4, 2020, 11:37pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/1 "2020-09-04T23:37:37Z")

</div>

The same data resampled to .vit works fine.  
On ParaView 5.6.0 and 5.7.0, it renders correctly, but prints this error message:

ERROR: In /Users/kitware/dashboards/buildbot-slave/a64f5607/build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 462  
vtkShaderProgram (0x600003ca6760): 1: #version 150  
2: #ifdef GL\_ES  
3: #ifdef GL\_FRAGMENT\_PRECISION\_HIGH  
4: precision highp float;  
5: precision highp sampler2D;  
6: precision highp sampler3D;  
7: #else  
8: precision mediump float;  
9: precision mediump sampler2D;  
10: precision mediump sampler3D;  
11: #endif  
12: #define texelFetchBuffer texelFetch  
13: #define texture1D texture  
14: #define texture2D texture  
15: #define texture3D texture  
16: #else // GL\_ES  
17: #define highp  
18: #define mediump  
19: #define lowp  
20: #if **VERSION** == 150  
21: #define texelFetchBuffer texelFetch  
22: #define texture1D texture  
23: #define texture2D texture  
24: #define texture3D texture  
25: #endif  
26: #endif // GL\_ES  
27: #define varying in  
28:  
29:  
30: /_=========================================================================  
31:  
32: Program: Visualization Toolkit  
33: Module: vtkPolyDataFS.glsl  
34:  
35: Copyright © Ken Martin, Will Schroeder, Bill Lorensen  
36: All rights reserved.  
37: See Copyright.txt or [http://www.kitware.com/Copyright.htm](http://www.kitware.com/Copyright.htm) for details.  
38:  
39: This software is distributed WITHOUT ANY WARRANTY; without even  
40: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR  
41: PURPOSE. See the above copyright notice for more information.  
42:  
43: =========================================================================_/  
44: // Template for the polydata mappers fragment shader  
45:  
46: uniform int PrimitiveIDOffset;  
47:  
48:  
49:  
50: // VC position of this fragment  
51: //VTK::PositionVC::Dec  
52:  
53: // Camera prop  
54: uniform int cameraParallel;  
55:  
56:  
57: // optional color passed in from the vertex shader, vertexColor  
58: uniform bool OverridesColor;  
59: uniform float ambientIntensity; // the material ambient  
60: uniform float diffuseIntensity; // the material diffuse  
61: uniform float opacityUniform; // the fragment opacity  
62: uniform vec3 ambientColorUniform; // ambient color  
63: uniform vec3 diffuseColorUniform; // diffuse color  
64: in vec4 vertexColorVSOutput;  
65:  
66:  
67: // optional surface normal declaration  
68: //VTK::Normal::Dec  
69:  
70: // extra lighting parameters  
71: uniform vec3 lightColor0;  
72: uniform vec3 lightDirectionVC0; // normalized  
73: uniform vec3 lightColor1;  
74: uniform vec3 lightDirectionVC1; // normalized  
75: uniform vec3 lightColor2;  
76: uniform vec3 lightDirectionVC2; // normalized  
77: uniform vec3 lightColor3;  
78: uniform vec3 lightDirectionVC3; // normalized  
79: uniform vec3 lightColor4;  
80: uniform vec3 lightDirectionVC4; // normalized  
81:  
82:  
83: // Texture maps  
84: //VTK::TMap::Dec  
85:  
86: // Texture coordinates  
87: uniform int uMaskOnSurface;  
88: uniform mat3 normalMatrix;  
89: in vec3 tcoordVCVSOutput;  
90:  
91: // picking support  
92: //VTK::Picking::Dec  
93:  
94: // Depth Peeling Support  
95: //VTK::DepthPeeling::Dec  
96:  
97: // clipping plane vars  
98: //VTK::Clip::Dec  
99:  
100: // the output of this shader  
101: out vec4 fragOutput0;  
102: out vec4 fragOutput1;  
103: out vec4 fragOutput2;  
104:  
105:  
106: // Apple Bug  
107: //VTK::PrimID::Dec  
108:  
109: // handle coincident offsets  
110: uniform float cCValue;  
111:  
112: // Value raster  
113: //VTK::ValuePass::Dec  
114:  
115: void main()  
116: {  
117: // VC position of this fragment. This should not branch/return/discard.  
118: //VTK::PositionVC::Impl  
119:  
120: // Place any calls that require uniform flow (e.g. dFdx) here.  
121: //VTK::UniformFlow::Impl  
122:  
123: // Set gl\_FragDepth here (gl\_FragCoord.z by default)  
124: gl\_FragDepth = gl\_FragCoord.z + cCValue;  
125:  
126:  
127: // Early depth peeling abort:  
128: //VTK::DepthPeeling::PreColor  
129:  
130: // Apple Bug  
131: //VTK::PrimID::Impl  
132:  
133: //VTK::Clip::Impl  
134:  
135: //VTK::ValuePass::Impl  
136:  
137: vec3 ambientColor = ambientIntensity \* vertexColorVSOutput.rgb;  
138: vec3 diffuseColor = diffuseIntensity \* vertexColorVSOutput.rgb;  
139: float opacity = opacityUniform \* vertexColorVSOutput.a;  
140: if (OverridesColor) {  
141: ambientColor = ambientColorUniform \* ambientIntensity;  
142: diffuseColor = diffuseColorUniform \* diffuseIntensity; }  
143:  
144:  
145: // Generate the normal if we are not passed in one  
146: //VTK::Normal::Impl  
147:  
148: fragOutput0 = vec4(ambientColor + diffuseColor, opacity);  
149: //VTK::Light::Impl  
150:  
151:  
152: vec3 tcoordLIC = normalMatrix \* tcoordVCVSOutput;  
153: vec3 normN = normalize(normalVCVSOutput);  
154: float k = dot(tcoordLIC, normN);  
155: tcoordLIC = (tcoordLIC - k\*normN);  
156: fragOutput1 = vec4(tcoordLIC.x, tcoordLIC.y, 0.0 , gl\_FragCoord.z);  
157: if (uMaskOnSurface == 0)  
158: {  
159: fragOutput2 = vec4(tcoordVCVSOutput, gl\_FragCoord.z);  
160: }  
161: else  
162: {  
163: fragOutput2 = vec4(tcoordLIC.x, tcoordLIC.y, 0.0 , gl\_FragCoord.z);  
164: }  
165:  
166:  
167: if (fragOutput0.a \<= 0.0)  
168: {  
169: discard;  
170: }  
171:  
172: //VTK::DepthPeeling::Impl  
173:  
174: //VTK::Picking::Impl  
175:  
176: // handle coincident offsets  
177: //VTK::Coincident::Impl  
178: }

ERROR: In /Users/kitware/dashboards/buildbot-slave/a64f5607/build/superbuild/paraview/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 463  
vtkShaderProgram (0x600003ca6760): ERROR: 0:153: Use of undeclared identifier ‘normalVCVSOutput’  
ERROR: 0:154: Use of undeclared identifier ‘normN’  
ERROR: 0:155: Use of undeclared identifier ‘k’  
ERROR: 0:155: Use of undeclared identifier ‘normN’

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 7, 2020, 9:33am UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/2 "2020-09-07T09:33:01Z")

</div>

Hi Roxana,

Can you share the failing data ?

---

<div class="post-metadata">

### Author: ![bujack](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c89c15/32.png) [@bujack](https://discourse.paraview.org/u/bujack)
#### Post date: [September 7, 2020, 4:17pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/3 "2020-09-07T16:17:29Z")

</div>

Yes, I can. What is the best way do that?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 8, 2020, 7:55am UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/4 "2020-09-08T07:55:21Z")

</div>

Either directly in discourse if the data is small, or through a file sharing website like wetransfer or google drive if it is big.

---

<div class="post-metadata">

### Author: ![bujack](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c89c15/32.png) [@bujack](https://discourse.paraview.org/u/bujack)
#### Post date: [September 8, 2020, 2:22pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/5 "2020-09-08T14:22:23Z")

</div>

[vel\_mesh20point.vtk](https://discourse.paraview.org/uploads/short-url/wfdUz4KDd26DNRZ3mEvjowhqtBZ.vtk) (239.9 KB)

Here it is 🙂

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 8, 2020, 2:26pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/6 "2020-09-08T14:26:23Z")

</div>

I’m quite sure it has been fixed in master already. Can you try it ?

---

<div class="post-metadata">

### Author: ![bujack](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c89c15/32.png) [@bujack](https://discourse.paraview.org/u/bujack)
#### Post date: [September 8, 2020, 2:32pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/7 "2020-09-08T14:32:45Z")

</div>

I see. I currently only have the binary version. So it will take a moment.

---

<div class="post-metadata">

### Author: ![bujack](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c89c15/32.png) [@bujack](https://discourse.paraview.org/u/bujack)
#### Post date: [September 8, 2020, 10:31pm UTC](https://discourse.paraview.org/t/surfacelic-crash-on-2d-vtu-in-paraview-5-8-0-and-5-8-1/5275/8 "2020-09-08T22:31:44Z")

</div>

Yes, I can confirm the crash does not occur in paraview 5.8.1 checked out today from master.
