<div dir="ltr">Hi Shawn,<div><br></div><div>I have created the issue in Mantis [1]. I have tried debugging it, I also guessed the issue was linked to this->Parser->useList, but I did not have time to investigate more than that yet...</div><div><br></div><div>Thanks</div><div>Arnaud</div><div><br></div><div>[1] <a href="http://www.vtk.org/Bug/view.php?id=15427">http://www.vtk.org/Bug/view.php?id=15427</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 10:15 PM, Shawn Waldon <span dir="ltr"><<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@kitware.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>Sorry it took so long to get to this. I fixed a similar bug in vtkVRMLImporter a while back. I can confirm that this is a bug and is reproducible on my machine, but I'm not sure when I'll have time to look at it in more detail. Please file a bug on the VTK bug tracker[1]. If you want to debug it yourself, I can tell you that the issue is in the vtkVRMLImporter destructor where it deletes this->Parser->useList. Look into what the value of useList is and how/where it is being set.<br><br></div><div>HTH,<br></div><div>Shawn<br></div><div><br>[1]: <a href="http://www.vtk.org/Bug/my_view_page.php" target="_blank">http://www.vtk.org/Bug/my_view_page.php</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 7, 2015 at 7:39 AM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@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 style="word-wrap:break-word">Hi all,<div><br></div><div>We have slightly modified the following wiki example:</div><div><br></div><div><span style="white-space:pre-wrap"> </span><a href="http://www.itk.org/Wiki/VTK/Examples/Cxx/IO/VRML" target="_blank">http://www.itk.org/Wiki/VTK/Examples/Cxx/IO/VRML</a></div><div><br></div><div><br></div><div>As follows:</div><div><br></div><div><span style="white-space:pre-wrap"> </span></div><div><div dir="ltr" style="direction:ltr;font-family:monospace,Courier;padding:1em;border:1px solid rgb(221,221,221);line-height:1.1em;font-size:12.6999998092651px;background-color:rgb(249,249,249)"><div style="line-height:normal;font-family:monospace"><pre style="font-size:1em;font-family:monospace,monospace;padding:0px;border:0px none white;line-height:1.2em;margin-top:0px;margin-bottom:0px;vertical-align:top;background-image:none"><span style="color:rgb(51,153,0);font-size:1em;line-height:1.2em">#include <vtkRenderer.h></span></pre><pre style="font-size:1em;font-family:monospace,monospace;padding:0px;border:0px none white;line-height:1.2em;margin-top:0px;margin-bottom:0px;vertical-align:top;background-image:none"><span style="color:rgb(51,153,0)">#include <vtkRenderWindow.h></span>
<span style="color:rgb(51,153,0)">#include <vtkRenderWindowInteractor.h></span>
<span style="color:rgb(51,153,0)">#include <vtkVRMLImporter.h></span>
<span style="color:rgb(51,153,0)">#include <vtkDataSet.h></span>
<span style="color:rgb(51,153,0)">#include <vtkPolyData.h></span>
<span style="color:rgb(51,153,0)">#include <vtkSmartPointer.h></span>
<span style="color:rgb(0,0,255)">int</span> main <span style="color:rgb(0,128,0)">(</span> <span style="color:rgb(0,0,255)">int</span> argc, <span style="color:rgb(0,0,255)">char</span> <span style="color:rgb(0,0,64)">*</span>argv<span style="color:rgb(0,128,0)">[</span><span style="color:rgb(0,128,0)">]</span><span style="color:rgb(0,128,0)">)</span>
<span style="color:rgb(0,128,0)">{</span>
<span style="color:rgb(0,0,255)">if</span><span style="color:rgb(0,128,0)">(</span>argc <span style="color:rgb(0,0,64)">!</span><span style="color:rgb(0,0,128)">=</span> <span style="color:rgb(0,0,221)">2</span><span style="color:rgb(0,128,0)">)</span>
<span style="color:rgb(0,128,0)">{</span>
std<span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,0,221)">cout</span> <span style="color:rgb(0,0,128)"><<</span> <span style="color:rgb(255,0,0)">"Required arguments: Filename"</span> <span style="color:rgb(0,0,128)"><<</span> std<span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">endl</span><span style="color:rgb(0,128,128)">;</span>
<span style="color:rgb(0,0,255)">return</span> <span style="color:rgb(0,0,255)">EXIT_FAILURE</span><span style="color:rgb(0,128,128)">;</span>
<span style="color:rgb(0,128,0)">}</span>
std<span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">string</span> filename <span style="color:rgb(0,0,128)">=</span> argv<span style="color:rgb(0,128,0)">[</span><span style="color:rgb(0,0,221)">1</span><span style="color:rgb(0,128,0)">]</span><span style="color:rgb(0,128,128)">;</span>
std<span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,0,221)">cout</span> <span style="color:rgb(0,0,128)"><<</span> <span style="color:rgb(255,0,0)">"Reading "</span> <span style="color:rgb(0,0,128)"><<</span> filename <span style="color:rgb(0,0,128)"><<</span> std<span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">endl</span><span style="color:rgb(0,128,128)">;</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderer<span style="color:rgb(0,0,128)">></span> renderer <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderer<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindow<span style="color:rgb(0,0,128)">></span> renderWindow <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindow<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindow<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>AddRenderer<span style="color:rgb(0,128,0)">(</span>renderer<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindowInteractor<span style="color:rgb(0,0,128)">></span> renderWindowInteractor <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindowInteractor<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindowInteractor<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetRenderWindow<span style="color:rgb(0,128,0)">(</span>renderWindow<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
<span style="color:rgb(102,102,102)">// VRML Import</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkVRMLImporter<span style="color:rgb(0,0,128)">></span> importer <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkVRMLImporter<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetFileName <span style="color:rgb(0,128,0)">(</span> filename.<span style="color:rgb(0,119,136)">c_str</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span> <span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetRenderWindow<span style="color:rgb(0,128,0)">(</span>renderWindow<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Update<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindow<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Render<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindowInteractor<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Start<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span></pre><pre style="font-size:1em;font-family:monospace,monospace;padding:0px;border:0px none white;line-height:1.2em;margin-top:0px;margin-bottom:0px;vertical-align:top;background-image:none"><br></pre><pre style="font-size:1em;font-family:monospace,monospace;padding:0px;border:0px none white;line-height:1.2em;margin-top:0px;margin-bottom:0px;vertical-align:top;background-image:none"> <span style="font-size:1em;line-height:1.2em">vtkSmartPointer</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,0,128)"><</span><span style="font-size:1em;line-height:1.2em">vtkRenderer</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,0,128)">></span><span style="font-size:1em;line-height:1.2em"> renderer2 </span><span style="font-size:1em;line-height:1.2em;color:rgb(0,0,128)">=</span><span style="font-size:1em;line-height:1.2em"> vtkSmartPointer</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,0,128)"><</span><span style="font-size:1em;line-height:1.2em">vtkRenderer</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,0,128)">></span><span style="font-size:1em;line-height:1.2em;color:rgb(0,128,128)">::</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,119,136)">New</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,128,0)">(</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,128,0)">)</span><span style="font-size:1em;line-height:1.2em;color:rgb(0,128,128)">;</span><pre style="font-size:1em;font-family:monospace,monospace;padding:0px;border:0px none white;line-height:1.2em;margin-top:0px;margin-bottom:0px;vertical-align:top;background-image:none"> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindow<span style="color:rgb(0,0,128)">></span> renderWindow2 <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindow<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindow2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>AddRenderer<span style="color:rgb(0,128,0)">(</span>renderer2<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindowInteractor<span style="color:rgb(0,0,128)">></span> renderWindowInteractor2 <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkRenderWindowInteractor<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindowInteractor2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetRenderWindow<span style="color:rgb(0,128,0)">(</span>renderWindow2<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
<span style="color:rgb(102,102,102)">// VRML Import</span>
vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkVRMLImporter<span style="color:rgb(0,0,128)">></span> importer2 <span style="color:rgb(0,0,128)">=</span> vtkSmartPointer<span style="color:rgb(0,0,128)"><</span>vtkVRMLImporter<span style="color:rgb(0,0,128)">></span><span style="color:rgb(0,128,128)">::</span><span style="color:rgb(0,119,136)">New</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetFileName <span style="color:rgb(0,128,0)">(</span> filename.<span style="color:rgb(0,119,136)">c_str</span><span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span> <span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>SetRenderWindow<span style="color:rgb(0,128,0)">(</span>renderWindow2<span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
importer2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Update<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindow2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Render<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span>
renderWindowInteractor2<span style="color:rgb(0,0,64)">-</span><span style="color:rgb(0,0,128)">></span>Start<span style="color:rgb(0,128,0)">(</span><span style="color:rgb(0,128,0)">)</span><span style="color:rgb(0,128,128)">;</span></pre><div><br></div>
<span style="color:rgb(0,0,255)">return</span> <span style="color:rgb(0,0,255)">EXIT_SUCCESS</span><span style="color:rgb(0,128,128)">;</span>
<span style="color:rgb(0,128,0)">}</span></pre><div><span style="color:rgb(0,128,0)"><br></span></div><div><span style="color:rgb(0,128,0)"><br></span></div></div></div></div><div><br></div><div><br></div><div>As you can see the modification is quite simple, we have just created 2 instances of every objects…</div><div><br></div><div>This naive example crashes when exiting (trying to delete the second importer, i.e. importer2).</div><div><br></div><div>Any idea what could go wrong? and how to fix this bug?</div><div><br></div><div>Thanks in advance,</div><div>Best regards</div><span><font color="#888888"><div><br></div><div>Arnaud</div></font></span></div><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" 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" 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" 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" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>