[vtkusers] vtkImagePlaneWidget, segmentation fault

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Wed Oct 8 11:42:34 EDT 2003


> Thanks Mathieu. The arrays are named so the problem must lie elsewhere.
> 
> Here is a more detailed description of what I do. This is still a somwehat
> stripped down version of the complete program but should really contain
> everything you want ot know.
> 
> If someone still wants more details I would be happy to send the complete
> source tree along with the data...
> 
> Again, the behaviour is the following: if my first user interaction with
> the vtkPlaneImageWidget is to try to translate it (by moving the mouse
> while holding the middle button) then the program crashes with a
> segmentation fault.
> 
> ddd says:
> Program received signal SIGSEGV, Segmentation fault.
> 0x4031943a in vtable for vtkTimeStamp () from
> /scratch/VTK/bin/libvtkCommon.so
> at some point in the past, it also said that the problem was in
> vtkFieldData::SetArray( int i )
> 
> If instead I first rotate the plane slightly then everything goes fine and
> I can later translate it as much as I want.
> 
> If the vtkImageData is built with only one vtkFloatArray, i.e. if I
> comment out:
> 
> // pd->AddArray( fractionalAnisotropy );
> 
> Then everything is also fine (the program never crashes).
> 
> Details about the build environement are at the bottom of this message.
> 
> I will be gratefull for any help or idea !
> 

Eric,

	Next time, could you please include a *real* code with real #include or 
a simple python script. This allows us to quickly reproduce the bug.

	So find attached to this email a code I wrote based on your notes. I 
can reproduce a seg fault, only if I comment:

//  pd->SetActiveScalars( "trace" );

	Otherwise I can do whatever I want: rotation, translation...

Two suggestions:
	- Test this file, and report if it crash with you
	- Make sure it doesn't come from your data (I generated my own)

HTH
mathieu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Eric.cxx
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031008/4f7e5482/attachment.asc>


More information about the vtkusers mailing list