Hello,<div><br></div><div>For a long time I had an issue where my application would randomly crash while picking cells. Each time the stack dump was in the depths of the vtk code. What I tracked it down to was that when an actor is first clicked, vtk allocates an internal cell array to assist in mapping the click to cell index. This array is not automatically resized on future clicks. </div>
<div><br></div><div>Therefore when the actor is first clicked an array of N is allocated. If the array is then updated to contain N*2 cells, clicking cells N through 2N-1 will access outside the cell index array, resulting in the segfault.</div>
<div><br></div><div>As cell picking is a rare event in the application timing, the solution was to call polydata->DeleteCells() method on each update.</div><div><br></div><div>Posting in case someone else runs into the same problem. I am currently using vtk 5.10, so I do not know if a newer version addresses this issue.</div>
<div><br></div><div>-Bob</div><div><br></div>