<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Courier New,courier,monaco,monospace,sans-serif;font-size:10pt"><div style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 10pt;"><span style="font-family: arial,helvetica,sans-serif;">Ok, look like a bug. Look at the code of the file vtkSeedRepresentation.cxx:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">/----------------------------------------------------------------------</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">void vtkSeedRepresentation::RemoveHandle( int n )</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">{</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // Remove nth handle</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; if (n == this-&gt;ActiveHandle)</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; this-&gt;RemoveActiveHandle();</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; return;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; if (static_cast&lt;int&gt;(this-&gt;Handles-&gt;size()) &lt;= n )</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; return;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; vtkHandleListIterator iter = this-&gt;Handles-&gt;begin();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; vtkstd::advance( iter, n );</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br></span></span><span style="font-family: arial,helvetica,sans-serif;
 font-weight: bold;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; 
this-&gt;Handles-&gt;erase( iter );</span></span><span style="font-family: arial,helvetica,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-weight: bold;">&nbsp; </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-weight: bold;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-weight: bold;">&nbsp; ( *iter )-&gt;Delete();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">}</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;">//----------------------------------------------------------------------</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">void vtkSeedRepresentation::RemoveActiveHandle()</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">{</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; if ( this-&gt;Handles-&gt;size() &lt; 1 )</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family:
 Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; return;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; if ( this-&gt;ActiveHandle &gt;= 0 &amp;&amp; this-&gt;ActiveHandle &lt; static_cast&lt;int&gt;(this-&gt;Handles-&gt;size()) )</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; {</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; vtkHandleListIterator iter = this-&gt;Handles-&gt;begin();</span><br
 style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; vtkstd::advance( iter, this-&gt;ActiveHandle );</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; </span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">this-&gt;Handles-&gt;erase( iter );</span></span><br style="font-weight: bold;"></span><span style="font-family: arial,helvetica,sans-serif; font-weight: bold;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;
 ( *iter )-&gt;Delete();</span></span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; this-&gt;ActiveHandle = -1;</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; }</span><br></span><br><span style="font-family: arial,helvetica,sans-serif;"><br>Basically the error are in the following lines:<br><br></span><span style="font-family: arial,helvetica,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-weight: bold;">this-&gt;Handles-&gt;erase( iter );</span></span><br style="font-weight: bold;">&nbsp;</span><span style="font-family: arial,helvetica,sans-serif; font-weight: bold;"><span style="font-family:
 Courier New,courier,monaco,monospace,sans-serif;">( *iter )-&gt;Delete();</span></span><br><br><span style="font-family: arial,helvetica,sans-serif;">You have to FIRST delete the object and THEN remove the handle! That is you have to swap the two lines:<br><br></span><span style="font-family: arial,helvetica,sans-serif;">&nbsp;</span><span style="font-family: arial,helvetica,sans-serif; font-weight: bold;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">(
 
*iter )-&gt;Delete();</span></span><br>

<span style="font-family: arial,helvetica,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-weight: bold;">this-&gt;Handles-&gt;erase( iter );</span></span><br style="font-weight: bold;"></span><br><span style="font-family: arial,helvetica,sans-serif;">Now the example no longer crash (and my application too!).<br><br>My two cents!<br><br>- AGPX</span><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Da:</span></b> AGPX &lt;agpxnet@yahoo.it&gt;<br><b><span style="font-weight: bold;">A:</span></b> vtk vtk &lt;vtkusers@vtk.org&gt;<br><b><span style="font-weight: bold;">Inviato:</span></b> Ven 5 marzo 2010, 12:19:45<br><b><span style="font-weight: bold;">Oggetto:</span></b> vtkSeedWidget bug?<br></font><br><div style="font-family: arial,helvetica,sans-serif; font-size:
 10pt;"><div>Hi,<br><br>I have compiled the latest version of VTK (from CVS) and the WidgetsCxxTests.exe (debug mode) crashs when you run Test15 (vtkSeedWidget). The error reported is: "list iterator not dereferencable" and the debugger show the line:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">( *iter )-&gt;Delete();</span><br><br>inside the <span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">vtkSeedRepresentation::RemoveHandle</span> method. Basically the <span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">DeleteSeed</span> seems doesn't work. I tested it on Microsoft Windows XP Pro with Visual Studio 2008 SP1. Any idea on how to fix? Thanks.<br><br>- AGPX<br></div>
</div><br>



      </div></div>
</div><br>



      </body></html>