<div>Hi all,</div>
<div>I have the following bug which I hope that someone can help me to solve it...</div>
<div>I'm using a loop that contains</div>
<div> </div>
<div><font size="2">vtkBMPReader* bmpreader = vtkBMPReader::New();</font></div>
<div><font size="2"><font size="2">bmpreader->SetFileName(FileName);</font></font></div>
<div><font size="2"><font size="2"><font size="2">vtkImageShrink3D* shrink3D = vtkImageShrink3D::New();</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">shrink3D->SetInputConnection(bmpreader->GetOutputPort());</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">shrink3D->SetAveraging(1);</font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2">shrink3D->Update(); // Error</font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">vtkImageMapToColors* map = vtkImageMapToColors::New();</font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">map->SetInputConnection(shrink3D->GetOutputPort());</font></font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">map->Update(); // Error</font></font></font></font></font></font></font></div>
<div>....................</div>
<div><font size="2">map->Delete();</font></div>
<div><font size="2">bmpreader->Delete();</font></div>
<div><font size="2">shrink3D->Delete();</font></div>
<p>After repeating the loop for many times, I'm getting the following error exactly at the Updat() lines</p><font size="1">
<p><font size="2">First-chance exception at 0x01cc4c0c in Program.exe: 0xC0000005: Access violation writing location 0x00000000.</font></p>
<p><font size="2">A first chance exception of type 'System.AccessViolationException' occurred in Program.exe</font> </p>
<p><font size="2">Waiting for your advice..</font></p>
<p><font size="2">BS</font></p></font>