<div dir="ltr"><div><div><div>Hello, I have an application which is reaching a SIGSEGV when opengl backend is OpenGL2 (master branch). I have traced the error and it seems to be related to this kind of warning:<br><br>Warning: Kitware/vtk.gitlab/Common/ExecutionModel/vtkAlgorithm.cxx, line 1421<br>vtkOpenGLTexture (0x17e1620): Attempt to get connection index 0 for input port 0, which has 0 connections.<br><br></div>The warning appears with both OpenGL and OpenGL2 backends but with the OpenGL2 a SIGSEGV is reached.<br><br></div>The SIGSEGV is because the member vtkOpenGLTexture::TextureObject is NULL and it can be used in:<br><br></div><div><ul><li><span style="font-family:monospace,monospace">OpenGL2/vtkOpenGLPolyDataMapper</span><br></li></ul><div style="margin-left:40px"><span style="font-family:monospace,monospace">if (texture)<br>  {<br>  tNumComp =<br>   vtkOpenGLTexture::SafeDownCast(texture)-><br>      <span style="color:rgb(153,0,0)"><b>GetTextureObject()-></b></span>GetComponents();<br>  }</span><br></div><ul><li><span style="font-family:monospace,monospace">OpenGL2/vtkOpenGL2Texture.cxx</span><br></li></ul></div><div><div style="margin-left:40px"><span style="font-family:monospace,monospace">void vtkOpenGLTexture::CopyTexImage(int x, int y, int width, int height)<br>{<br>  this-><b><span style="color:rgb(153,0,0)">TextureObject-></span></b>CopyFromFrameBuffer(x, y, x, y, width, height);<br>}<br><br>void vtkOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren))<br>{<br>  this-><b><span style="color:rgb(153,0,0)">TextureObject-></span></b>Deactivate();<br>}</span><br></div></div><br><div><div><div>I see that within there are some pice of code which test for TextureObject and uses it if it is not NULL, but there are others which do not do the test for NULL. <br><br>In order to have a quick fix I have initialized  the member TextureObject to vtkTextureObject::New() instead of the value 0 (at the constructor vtkOpenGLTexture::vtkOpenGLTexture). That solved the SIGSEGV for my application but I'm not sure if this could be a the correct solution.<br><br></div><div>I can submit a merge request if the change make sense.<br><br><div style="margin-left:40px"><span style="font-family:monospace,monospace">this->TextureObject = vtkTextureObject::New();</span><br></div><br>best regards,<br><br>Jorge<br></div></div></div></div>