# Paraview 5.8.1 crashes when disabling the Light kit

**URL:** https://discourse.paraview.org/t/paraview-5-8-1-crashes-when-disabling-the-light-kit/5522
**Category:** ParaView Support
**Created:** [October 7, 2020, 6:45pm UTC](https://discourse.paraview.org/t/paraview-5-8-1-crashes-when-disabling-the-light-kit/5522 "2020-10-07T18:45:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Naeeme.dmo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/naeeme.dmo/32/4961_2.png) [@Naeeme.dmo](https://discourse.paraview.org/u/Naeeme.dmo)
#### Post date: [October 7, 2020, 6:45pm UTC](https://discourse.paraview.org/t/paraview-5-8-1-crashes-when-disabling-the-light-kit/5522/1 "2020-10-07T18:45:15Z")

</div>

After using the styling attributes “Line width” and “Render Lines as Tubes”, disabling Light kit will make paraview to crash… I have tried the same in Paraview Versions 5.5.0 and 5.6.0 and It works fine, but for paraview 5.8.x it crashes with the following error:

```auto
( 88.577s) [paraview] vtkShaderProgram.cxx:468 ERR| vtkShaderProgram (0x61f4670): 1: #version 150
2: #ifdef GL_ES
3: #ifdef GL_FRAGMENT_PRECISION_HIGH
4: precision highp float;
5: #else
6: precision mediump float;
7: #endif
8: #else // GL_ES
9: #define highp
10: #define mediump
11: #define lowp
12: #endif // GL_ES
13: 
14: 
15: /*=========================================================================
16: 
17: Program: Visualization Toolkit
18: Module: vtkPolyDataWideLineGS.glsl
19: 
20: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
21: All rights reserved.
22: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
23: 
24: This software is distributed WITHOUT ANY WARRANTY; without even
25: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
26: PURPOSE. See the above copyright notice for more information.
27: 
28: =========================================================================*/
29: // Template for the polydata mappers geometry shader
30: 
31: // VC position of this fragment
32: //VTK::PositionVC::Dec
33: 
34: // primitiveID
35: //VTK::PrimID::Dec
36: 
37: // optional color passed in from the vertex shader, vertexColor
38: //VTK::Color::Dec
39: 
40: // optional surface normal declaration
41: out vec3 tubeBasis1;
42: out vec3 tubeBasis2;
43: 
44: 
45: // extra lighting parameters
46: //VTK::Light::Dec
47: 
48: // Texture coordinates
49: //VTK::TCoord::Dec
50: 
51: // picking support
52: //VTK::Picking::Dec
53: 
54: // Depth Peeling Support
55: //VTK::DepthPeeling::Dec
56: 
57: // clipping plane vars
58: //VTK::Clip::Dec
59: 
60: // the output of this shader
61: //VTK::Output::Dec
62: 
63: uniform vec2 lineWidthNVC;
64: 
65: layout(lines) in;
66: layout(triangle_strip, max_vertices = 4) out;
67: 
68: void main()
69: {
70: // compute the lines direction
71: vec2 normal = normalize(
72: gl_in[1].gl_Position.xy/gl_in[1].gl_Position.w -
73: gl_in[0].gl_Position.xy/gl_in[0].gl_Position.w);
74: 
75: // rotate 90 degrees
76: normal = vec2(-1.0*normal.y,normal.x);
77: 
78: vec3 lineDir = normalize(vertexVCVSOutput[1].xyz - vertexVCVSOutput[0].xyz);
79: tubeBasis2 = normalize(cross(lineDir, vec3(normal, 0.0)));
80: tubeBasis2 = tubeBasis2*sign(tubeBasis2.z);
81: 
82: 
83: for (int j = 0; j < 4; j++)
84: {
85: int i = j/2;
86: 
87: gl_PrimitiveID = gl_PrimitiveIDIn;
88: 
89: //VTK::Clip::Impl
90: 
91: //VTK::Color::Impl
92: 
93: tubeBasis1 = 2.0*vec3(normal*((j+1)%2 - 0.5), 0.0);
94: 
95: 
96: //VTK::Light::Impl
97: 
98: //VTK::TCoord::Impl
99: 
100: //VTK::DepthPeeling::Impl
101: 
102: //VTK::Picking::Impl
103: 
104: // VC position of this fragment
105: //VTK::PositionVC::Impl
106: 
107: gl_Position = vec4(
108: gl_in[i].gl_Position.xy + (lineWidthNVC*normal)*((j+1)%2 - 0.5)*gl_in[i].gl_Position.w,
109: gl_in[i].gl_Position.z,
110: gl_in[i].gl_Position.w);
111: EmitVertex();
112: }
113: EndPrimitive();
114: }

( 88.581s) [paraview] vtkShaderProgram.cxx:469 ERR| vtkShaderProgram (0x61f4670): 0(78) : error C1503: undefined variable "vertexVCVSOutput"
0(78) : error C1503: undefined variable "vertexVCVSOutput"

```

**Steps to reproduce:**

- open paraview gui
- go to Sources -\> Alphabetical -\> Line -\> Apply
- In Styling properties:
  - select Render Lines as Tubes
  - change Line width to 1.5

- go to View - \> Light Inspector
- disable Light kit

---

<div class="post-metadata">

### Author: ![LfxPaul](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lfxpaul/32/3703_2.png) [@LfxPaul](https://discourse.paraview.org/u/LfxPaul)
#### Post date: [October 9, 2020, 3:05pm UTC](https://discourse.paraview.org/t/paraview-5-8-1-crashes-when-disabling-the-light-kit/5522/2 "2020-10-09T15:05:47Z")

</div>

Hi Naeeme,

Thanks for reporting this crash 🙂 It was indeed a little bug and I fixed it here : [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/7318](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7318)

---

<div class="post-metadata">

### Author: ![Naeeme.dmo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/naeeme.dmo/32/4961_2.png) [@Naeeme.dmo](https://discourse.paraview.org/u/Naeeme.dmo)
#### Post date: [October 11, 2020, 4:46pm UTC](https://discourse.paraview.org/t/paraview-5-8-1-crashes-when-disabling-the-light-kit/5522/3 "2020-10-11T16:46:40Z")

</div>

Hi Paul,

you are very welcome. Thank you for fixing the bug. I hope it gets merged to the master soon 🙂
