[vtkusers] vtkImagePlaneWidget, segmentation fault

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Thu Oct 9 04:40:31 EDT 2003


Dean, Eric,

> Using a vtkImageCast vtkImageActor pipeline also worked fine with this
> data. I am wonderig if there is something going on with the vtkImageReslice
> that is internal to vtkImagePlaneWidget.

As I said before, I can't reproduce the bug you have. I am using the 
latest -closed source- nvidia drivers: 4496

However I tried this code using Mesa (5.0.2), and only then I could get 
a crash:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1594)]
0x4212e22a in main_arena () from /lib/i686/libc.so.6
(gdb) bt
#0  0x4212e22a in main_arena () from /lib/i686/libc.so.6
#1  0x41249c73 in vtkFieldData::SetArray (this=0x805d168, i=1, 
data=0x825b048) at /home/malat/Kitware/VTK/Common/vtkFieldData.cxx:345
#2  0x4124a2a1 in vtkFieldData::AddArray (this=0x805d168, 
array=0x825b048) at /home/malat/Kitware/VTK/Common/vtkFieldData.cxx:511
#3  0x41236a1d in vtkDataSetAttributes::SetAttribute (this=0x805d168, 
da=0x825b048, attributeType=0) at 
/home/malat/Kitware/VTK/Common/vtkDataSetAttributes.cxx:1588
#4  0x41235e94 in vtkDataSetAttributes::SetScalars (this=0x805d168, 
da=0x825b048) at 
/home/malat/Kitware/VTK/Common/vtkDataSetAttributes.cxx:1306
#5  0x4100a34e in vtkImageToImageFilter::AllocateOutputData 
(this=0x805ce40, out=0x805cf88) at 
/home/malat/Kitware/VTK/Filtering/vtkImageToImageFilter.cxx:337
#6  0x4100a754 in vtkImageToImageFilter::ExecuteData (this=0x805ce40, 
out=0x805cf88) at 
/home/malat/Kitware/VTK/Filtering/vtkImageToImageFilter.cxx:406
#7  0x41303cf4 in vtkSource::UpdateData (this=0x805ce40, 
output=0x805cf88) at /home/malat/Kitware/VTK/Common/vtkSource.cxx:393
#8  0x41229f27 in vtkDataObject::UpdateData (this=0x805cf88) at 
/home/malat/Kitware/VTK/Common/vtkDataObject.cxx:355
#9  0x41266c0c in vtkImageData::UpdateData (this=0x805cf88) at 
/home/malat/Kitware/VTK/Common/vtkImageData.cxx:1080
#10 0x413038e3 in vtkSource::UpdateData (this=0x805a298, 
output=0x805a320) at /home/malat/Kitware/VTK/Common/vtkSource.cxx:337
#11 0x41229f27 in vtkDataObject::UpdateData (this=0x805a320) at 
/home/malat/Kitware/VTK/Common/vtkDataObject.cxx:355
#12 0x41266c0c in vtkImageData::UpdateData (this=0x805a320) at 
/home/malat/Kitware/VTK/Common/vtkImageData.cxx:1080
#13 0x402926e9 in vtkActor::GetIsOpaque (this=0x805ee60) at 
/home/malat/Kitware/VTK/Rendering/vtkActor.cxx:122
#14 0x402927d5 in vtkActor::RenderOpaqueGeometry (this=0x805ee60, 
vp=0x8058a78) at /home/malat/Kitware/VTK/Rendering/vtkActor.cxx:163
#15 0x40340df3 in vtkRenderer::UpdateGeometry (this=0x8058a78) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderer.cxx:451
#16 0x403c335b in vtkOpenGLRenderer::DeviceRender (this=0x8058a78) at 
/home/malat/Kitware/VTK/Rendering/vtkOpenGLRenderer.cxx:176
#17 0x403403a3 in vtkRenderer::Render (this=0x8058a78) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderer.cxx:231
#18 0x403478fc in vtkRendererCollection::Render (this=0x8059050) at 
/home/malat/Kitware/VTK/Rendering/vtkRendererCollection.cxx:54
#19 0x40330035 in vtkRenderWindow::DoStereoRender (this=0x8058ea8) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderWindow.cxx:633
#20 0x4032ffcd in vtkRenderWindow::DoFDRender (this=0x8058ea8) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderWindow.cxx:621
#21 0x4032fb6d in vtkRenderWindow::DoAARender (this=0x8058ea8) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderWindow.cxx:515
#22 0x4032f372 in vtkRenderWindow::Render (this=0x8058ea8) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderWindow.cxx:342
#23 0x403d264e in vtkXOpenGLRenderWindow::Render (this=0x8058ea8) at 
/home/malat/Kitware/VTK/Rendering/vtkXOpenGLRenderWindow.cxx:1338
#24 0x40337dfb in vtkRenderWindowInteractor::Render (this=0x805a1b0) at 
/home/malat/Kitware/VTK/Rendering/vtkRenderWindowInteractor.cxx:110
#25 0x4088881b in vtkImagePlaneWidget::OnMouseMove (this=0x805b1d0) at 
/home/malat/Kitware/VTK/Hybrid/vtkImagePlaneWidget.cxx:861
#26 0x40886d37 in vtkImagePlaneWidget::ProcessEvents (event=25, 
clientdata=0x805b1d0) at 
/home/malat/Kitware/VTK/Hybrid/vtkImagePlaneWidget.cxx:361
#27 0x411fd5e6 in vtkCallbackCommand::Execute (this=0x805b3a0, 
caller=0x805a1b0, event=25, callData=0x0) at 
/home/malat/Kitware/VTK/Common/vtkCallbackCommand.cxx:44
#28 0x412ac5ae in vtkSubjectHelper::InvokeEvent (this=0x805d2e8, 
event=25, callData=0x0, self=0x805a1b0) at 
/home/malat/Kitware/VTK/Common/vtkObject.cxx:484
#29 0x412aca68 in vtkObject::InvokeEvent (this=0x805a1b0, event=25, 
callData=0x0) at /home/malat/Kitware/VTK/Common/vtkObject.cxx:625
#30 0x403ac0fc in vtkXRenderWindowInteractorCallback 
(client_data=0x805a1b0, event=0xbfffeaf0) at 
/home/malat/Kitware/VTK/Rendering/vtkXRenderWindowInteractor.cxx:666
#31 0x4160bc58 in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
#32 0x4160c42a in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
#33 0x4160c68f in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
#34 0x4160c997 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#35 0x403aa91c in vtkXRenderWindowInteractor::Start (this=0x805a1b0) at 
/home/malat/Kitware/VTK/Rendering/vtkXRenderWindowInteractor.cxx:172
#36 0x08049833 in main () at 
/home/malat/Kitware/Test/DilateMesh/Eric.cxx:154
#37 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6


As you see there is no call to vtkImageResclice in the trace...

Line 345 in vtkFieldData.cxx is this one:

     if ( this->Data[i] != NULL )
       {
       this->Data[i]->Register(this);
       }


> My build is latest VTK cvs, Borland C++ Builder 5, MinSizeRel,
> CMake 1.8.1 on Win2k, NVidia GeForce Ti, Intel P4.  Anyone 
> have any ideas?


I am a bit puzzled you could reproduce the bug with your nvidia card. 
Are you using the same driver I am using, Dean ?

HTH
mathieu
Ps: I could reproduce it on WinXP, nvidia GeForce420




More information about the vtkusers mailing list