Thanks a bunch, Dean!&nbsp; Changing &quot;double * fweights&quot; to &quot;double fweights[8]&quot; solved my problem!<br><br>Thanks again!<br>-Jake<br><br><div class="gmail_quote">On Jan 23, 2008 3:41 PM,  &lt;<a href="mailto:dean.inglis@camris.ca">
dean.inglis@camris.ca</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Jake,<br><br>could be segfaulting due to<br>double * fweights;
<br>which can be fixed with<br><br>double &nbsp;fweights[8];<br><br>see how vtkImageData calls FindCell at line 747...<br><br>Dean<br><div><div></div><div class="Wj3C7c"><br><br>/********************begin code**********************/
<br>...<br> &nbsp;//double p[3] is initialized<br>...<br> &nbsp;vtkEmptyCell * femptycell = vtkEmptyCell::New();<br> &nbsp;vtkCell * fcell = femptycell-&gt;NewInstance();<br> &nbsp;vtkIdType fcellID;<br> &nbsp;double ftol2;<br> &nbsp;int fsubId;<br> &nbsp;double fpcoords[3];
<br> &nbsp;double * fweights;<br><br> &nbsp;vtkIdType fFindCell = [instance of vtkImageData *]-&gt;FindCell(p, fcell,<br>fcellID, ftol2, fsubId, fpcoords, fweights);<br><br> &nbsp;std::cout &lt;&lt; &quot;cellID returned from FindCell() = &quot; &lt;&lt; fFindCell &lt;&lt;
<br>std::endl;<br>/********************end code**********************/<br><br>When I click on one of the orthogonal slices, my application successfully<br>prints out the cellId, for instance:<br><br>&quot;cellID returned from FindCell() = 42196578&quot;
<br><br>However, it then crashes with a Segmentation Fault. &nbsp;I have narrowed the<br>problem down to this chunk of code because when I replace it with similar<br>code to compute the cell ID (pasted below), it runs fine without any seg
<br>fault.<br></div></div></blockquote></div><br>