<div dir="ltr">Hello, after investigating the pipeline (the SEGFAULT pushed me to do it) I found how to remove the warning. The pipeline which is creating the texture is internal to vtkImagePlaneWidget. I could remove the Warning by disabling the TextureVisibility until a valid ImageData is set to the vtkImagePlaneWidget.<br><br>But my concern is related to the SEGFAULT, and I wonder if vtk need to check for the NULL value that I mentioned in this thread.<br><br>best regards,<br><br>Jorge<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-25 17:59 GMT+01:00 Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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></div></div>_______________________________________________<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><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><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>
</font></span></div>
</blockquote></div><br></div>