I *really* have to integrate valgrind in my debugging process! Thanks
for the reminder, Bill. I put a log file here :<br><a href="http://jerome.velut.free.fr/transfert/DrawText-valgrind-output2552">http://jerome.velut.free.fr/transfert/DrawText-valgrind-output2552</a> (Too big for the list, &#39;had to cancel the previous post...)<br>
<br>It has been obtained with your
command line, except that --num-callers has to be between 0 and 50
(claimed valgrind at first exec). I also add
--log-file=DrawText-valgring-output%p to catch the output.<br><div id=":1o6" class="ii gt">
<br>It ends on a segfault, that is not logged into the file, I think:<br>------------------------------------------------------------------------------------------<br>[dje@Djelaptop
build]$ valgrind  --trace-children=yes --quiet --tool=memcheck
--leak-check=yes --show-reachable=yes --num-callers=50 --verbose
--demangle=yes --log-file=DrawText-valgring-output%p ./DrawText<br>
Erreur de segmentation (core dumped)<br>------------------------------------------------------------------------------------------<br><br>I found back the gdb backtrace concerning vtk_freetype_FTC_CMapCache_Lookup, in a &quot;Invalid read of size 4&quot; section. I let you look into the log file, since I don&#39;t know much about that!</div>
<br><br><div class="gmail_quote">2009/12/9 Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Have you tried running the example with valgrind?<br>
<br>
valgrind  --trace-children=yes --quiet --tool=memcheck<br>
--leak-check=yes --show-reachable=yes --num-callers=100 --verbose<br>
--demangle=yes ./DrawText<br>
<div><div></div><div class="h5"><br>
On Wed, Dec 9, 2009 at 4:57 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt; wrote:<br>
&gt; I see. It is linking against the paraview version of VTK. That&#39;s what<br>
&gt; threw me. When I run David&#39;s example against VTK head, it runs fine.<br>
&gt;<br>
&gt; Maybe someone with a paraview vtk can try the example?<br>
&gt;<br>
&gt; Bill<br>
&gt;<br>
&gt; On Wed, Dec 9, 2009 at 4:52 PM, Jérôme &lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Bill,<br>
&gt;&gt;<br>
&gt;&gt; this is the one I posted previously. I hope it is helpful? I was checking<br>
&gt;&gt; the dashboard for failed tests, but I am simply lost in all these results...<br>
&gt;&gt;<br>
&gt;&gt; Thanks for your interest!<br>
&gt;&gt;<br>
&gt;&gt; Jerome<br>
&gt;&gt;<br>
&gt;&gt; 2009/12/9 Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; What traceback do you get with David&#39;s example?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Dec 9, 2009 at 4:29 PM, Jérôme &lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; Continuing my investigation. It seems I am alone with that problem.<br>
&gt;&gt;&gt; &gt; David Doria kindly put an example of a use-case of vtkTextActor on the<br>
&gt;&gt;&gt; &gt; wiki:<br>
&gt;&gt;&gt; &gt; <a href="http://www.cmake.org/Wiki/Display_text" target="_blank">http://www.cmake.org/Wiki/Display_text</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; I confirm my segfault with that code, only when linking to VTK built in<br>
&gt;&gt;&gt; &gt; release. It does not make difference if my code is complied Debug or<br>
&gt;&gt;&gt; &gt; Release.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Here is the gdb backtrace:<br>
&gt;&gt;&gt; &gt; (gdb) bt<br>
&gt;&gt;&gt; &gt; #0  0x005f7a72 in vtk_freetype_FTC_CMapCache_Lookup ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkfreetype.so.pv3.7<br>
&gt;&gt;&gt; &gt; #1  0x009830bc in vtkFreeTypeUtilities::GetGlyphIndex(unsigned long,<br>
&gt;&gt;&gt; &gt; char,<br>
&gt;&gt;&gt; &gt; unsigned int*) ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #2  0x00987b50 in vtkFreeTypeUtilities::GetBoundingBox(vtkTextProperty*,<br>
&gt;&gt;&gt; &gt; char const*, int*) ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #3  0x009883dd in vtkFreeTypeUtilities::PrepareImageData(vtkImageData*,<br>
&gt;&gt;&gt; &gt; vtkTextProperty*, char const*, int*, int*) ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #4  0x009888fe in vtkFreeTypeUtilities::RenderString(vtkTextProperty*,<br>
&gt;&gt;&gt; &gt; char<br>
&gt;&gt;&gt; &gt; const*, vtkImageData*) ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #5  0x00946e3e in vtkTextActor::RenderOpaqueGeometry(vtkViewport*) ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #6  0x008f87a6 in vtkRenderer::UpdateGeometry() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #7  0x009cf547 in vtkOpenGLRenderer::DeviceRender() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #8  0x008f91fb in vtkRenderer::Render() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #9  0x008f4b7b in vtkRendererCollection::Render() ()<br>
&gt;&gt;&gt; &gt; ---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #10 0x0090789f in vtkRenderWindow::DoStereoRender() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #11 0x00907c80 in vtkRenderWindow::DoFDRender() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #12 0x009090ab in vtkRenderWindow::DoAARender() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #13 0x00907dc5 in vtkRenderWindow::Render() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #14 0x00a0d184 in vtkXOpenGLRenderWindow::Render() ()<br>
&gt;&gt;&gt; &gt;    from<br>
&gt;&gt;&gt; &gt; /home/dje/Softwares/ParaView-3.7/Release/bin/libvtkRendering.so.pv3.7<br>
&gt;&gt;&gt; &gt; #15 0x08049c1b in main () at /home/dje/Codes/TestFilter/DrawText.cxx:50<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; For now, I am working with ParaView/VTK in Debug built. But I hope<br>
&gt;&gt;&gt; &gt; someone<br>
&gt;&gt;&gt; &gt; will explain me what is the trouble with my release builds.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Jerome<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; 2009/12/9 Jérôme &lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; I just compiled ParaView/VTK in Debug mode, the problem disappears...<br>
&gt;&gt;&gt; &gt;&gt; So I<br>
&gt;&gt;&gt; &gt;&gt; can be more precise about the reproducibility check:<br>
&gt;&gt;&gt; &gt;&gt;  Could you tell me if you have a segfault with really simple script in<br>
&gt;&gt;&gt; &gt;&gt; a<br>
&gt;&gt;&gt; &gt;&gt; linux (F12) release built?<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Thanks again,<br>
&gt;&gt;&gt; &gt;&gt; Jerome<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; 2009/12/8 Jérôme &lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Dear all,<br>
&gt;&gt;&gt; &gt;&gt;&gt; It seems that I misused the vtkTextActor for a while: a recent CVS<br>
&gt;&gt;&gt; &gt;&gt;&gt; checkout makes a simple vtkTextActor rendering crashing by seg fault.<br>
&gt;&gt;&gt; &gt;&gt;&gt; I<br>
&gt;&gt;&gt; &gt;&gt;&gt; noted this error inside a ParaView cxx plugin, but now I have isolated<br>
&gt;&gt;&gt; &gt;&gt;&gt; the<br>
&gt;&gt;&gt; &gt;&gt;&gt; cause: A vtkTextActor added to the renderer yields the crash.<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Please, find attach a python script that reproduces the bug (by me, at<br>
&gt;&gt;&gt; &gt;&gt;&gt; least... my settings may be guilty). Could you tell me if you have<br>
&gt;&gt;&gt; &gt;&gt;&gt; such an<br>
&gt;&gt;&gt; &gt;&gt;&gt; error, and if my way of using text actor is wrong?<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Thanks a lot!<br>
&gt;&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt;&gt; Jerome<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>