<div dir="ltr">Are you sure that the pipeline that creates the texture is not broken as said in the warning? Looks like whatever filter / pipeline you are using is not producing the data as it should. And it seems to me that we could be check for null texture object in other methods. If no one else look at it, I will push a fix. <div><br></div><div>- Aashish</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 6:00 AM, Jorge Perez <span dir="ltr"><<a href="mailto:josp.jorge@gmail.com" target="_blank">josp.jorge@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader <br>| Kitware Inc. <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>