I can commit this, but before I do, can anyone tell me if this case is reproducible in a current test (I don&#39;t see it failing on the dashboard so it probably doesn&#39;t have any testing coverage) or willing to provide a simple test the reproduces this.<br>
<br><div class="gmail_quote">On Fri, Mar 26, 2010 at 8:58 AM, AGPX <span dir="ltr">&lt;<a href="mailto:agpxnet@yahoo.it">agpxnet@yahoo.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt"><div>Hi,<br><br>just now, at the following link:<br><br><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Widgets/vtkSeedWidget.cxx?view=markup" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Widgets/vtkSeedWidget.cxx?view=markup</a><br>
</div><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt"><br>that bug isn&#39;t fixed.<br><div class="hm"><br><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:13px">
<div class="hm"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight:bold">Da:</span></b> John Drescher &lt;<a href="mailto:drescherjm@gmail.com" target="_blank">drescherjm@gmail.com</a>&gt;<br><b><span style="font-weight:bold">A:</span></b> AGPX &lt;<a href="mailto:agpxnet@yahoo.it" target="_blank">agpxnet@yahoo.it</a>&gt;<br>
<b><span style="font-weight:bold">Cc:</span></b> vtk vtk &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;<br><b><span style="font-weight:bold">Inviato:</span></b> Ven 26 marzo 2010, 13:53:50<br>
<b><span style="font-weight:bold">Oggetto:</span></b> Re: [vtkusers] New crash bug! This time in vtkSeedWidget!<br></font></div><div><div></div><div class="h5"><br>On Fri, Mar 26, 2010 at 8:42 AM, AGPX &lt;<a href="mailto:agpxnet@yahoo.it" target="_blank">agpxnet@yahoo.it</a>&gt; wrote:<br>
&gt; Hi guys&#39;n&#39;gals,<br>&gt;<br>&gt; The method DeleteSeed of the class vtkSeedWidget crash:<br>&gt;<br>&gt; void vtkSeedWidget::DeleteSeed(int i)<br>&gt; {<br>&gt;   if( this-&gt;Seeds-&gt;size() &lt;= static_cast&lt; size_t &gt;(i) )<br>
&gt;     {<br>&gt;     return;<br>&gt;     }<br>&gt;<br>&gt;   vtkSeedRepresentation *rep =<br>&gt;       static_cast&lt;vtkSeedRepresentation*&gt;(this-&gt;WidgetRep);<br>&gt;   if (rep)<br>&gt;     {<br>&gt;     rep-&gt;RemoveHandle( i );<br>
&gt;    
 }<br>&gt;<br>&gt;   vtkSeedListIterator iter = this-&gt;Seeds-&gt;begin();<br>&gt;   vtkstd::advance(iter,i);<br>&gt;   (*iter)-&gt;SetEnabled(0);<br>&gt;   (*iter)-&gt;RemoveObservers(vtkCommand::StartInteractionEvent);<br>
&gt;   (*iter)-&gt;RemoveObservers(vtkCommand::InteractionEvent);<br>&gt;   (*iter)-&gt;RemoveObservers(vtkCommand::EndInteractionEvent);<br>&gt;   vtkHandleWidget * w = (*iter);<br>&gt;   this-&gt;Seeds-&gt;erase( iter );<br>
&gt;   w-&gt;Delete();<br>&gt; }<br>&gt;<br>&gt; The problem is in the last two lines. You have to FIRST delete the object,<br>&gt; then erase the relative iterator. That is you have to swap the last two<br>&gt; lines:<br>
&gt;<br>&gt;   w-&gt;Delete();<br>&gt;   this-&gt;Seeds-&gt;erase( iter );<br>&gt;<br>&gt; Please fix it! Thanks.<br>&gt;<br>&gt; - AGPX<br>&gt;<br>This is fixed in cvs.<br><br>John<br></div></div></div></div>
</div><br>



      </div><br>_______________________________________________<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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>