[vtk-developers] [bug?] VTK freezes and pegs 1 core.

Perryn Fowler pezlists at gmail.com
Fri Oct 18 00:28:48 EDT 2013


Hi there,

I am having a problem where VTK sometimes freezes and leaves one core
running at 100%. I hope this is the right form to discuss this -
please let me know if you would rather I raise a bug.

The problem occurs when I use a custom interactor that extends
vtkInteractorStyleRubberBand3D. It seems to happen during picking. I
am sharing the underlying data between several renderer/volume/mapper
chains if that is relevant.

The relevant piece of code is:

 void CubeSelectInteractor::OnLeftButtonUp() {
        vtkInteractorStyleRubberBand3D::OnLeftButtonUp();
        int *startPixels = this->GetStartPosition();
        int *endPixels = this->GetEndPosition();

        //ignore selections that are too small
        if ((endPixels[0] - startPixels[0]) > 5) {

            //NOTE HOW WE SWAP THE START AND END POSITIONS FOR THE Y AXIS
            // so that the selection box is more natural
            // TODO- make the direction irrelevant
            picker->Pick(startPixels[0],endPixels[1],0,this->GetDefaultRenderer());
            double startPoint[3];
            picker->GetPickPosition(startPoint);

            picker->Pick(endPixels[0],startPixels[1],0,this->GetDefaultRenderer());
            double endPoint[3];
            picker->GetPickPosition(endPoint);
            emit crop(startPoint[0], startPoint[1], startPoint[2],
endPoint[0], endPoint[1], endPoint[2]);

        }
   }

the back trace from gdb at the point where it freezes

#0  0x00007ffff7972720 in
vtkInformationInformationVectorKey::Get(vtkInformation*) () from
/usr/local/lib/vtk-5.10/libvtkCommon.so.5.10
#1  0x00007ffff739920a in
vtkDataObject::GetActiveFieldInformation(vtkInformation*, int, int) ()
   from /usr/local/lib/vtk-5.10/libvtkFiltering.so.5.10
#2  0x00007ffff74032ba in vtkImageData::GetScalarType() () from
/usr/local/lib/vtk-5.10/libvtkFiltering.so.5.10
#3  0x00007ffff55738b2 in vtkCellPicker::ComputeVolumeOpacity(int
const*, double const*, vtkImageData*, vtkDataArray*,
vtkPiecewiseFunction*, vtkPiecewiseFunction*) () from
/usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#4  0x00007ffff5576fbc in
vtkCellPicker::IntersectVolumeWithLine(double const*, double const*,
double, double, vtkProp3D*, vtkAbstractVolumeMapper*) () from
/usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#5  0x00007ffff4f92894 in
vtkVolumePicker::IntersectVolumeWithLine(double const*, double const*,
double, double, vtkProp3D*, vtkAbstractVolumeMapper*) () from
/usr/local/lib/vtk-5.10/libvtkVolumeRendering.so.5.10
#6  0x00007ffff5575881 in vtkCellPicker::IntersectWithLine(double*,
double*, double, vtkAssemblyPath*, vtkProp3D*, vtkAbstractMapper3D*)
() from /usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#7  0x00007ffff5613387 in vtkPicker::Pick(double, double, double,
vtkRenderer*) () from /usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#8  0x00007ffff557674e in vtkCellPicker::Pick(double, double, double,
vtkRenderer*) ()
   from /usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#9  0x00007ffff7dae4e7 in LSI::CubeSelectInteractor::OnLeftButtonUp
(this=0x9502f0)
    at /home/perryn/lsiscan/scandalous_ui/cube_select_interactor.cpp:31
#10 0x00007ffff55b7e3c in
vtkInteractorStyle::ProcessEvents(vtkObject*, unsigned long, void*,
void*) ()
   from /usr/local/lib/vtk-5.10/libvtkRendering.so.5.10
#11 0x00007ffff791a1d9 in vtkCallbackCommand::Execute(vtkObject*,
unsigned long, void*) ()
   from /usr/local/lib/vtk-5.10/libvtkCommon.so.5.10
#12 0x00007ffff79c8973 in vtkSubjectHelper::InvokeEvent(unsigned long,
void*, vtkObject*) ()
   from /usr/local/lib/vtk-5.10/libvtkCommon.so.5.10
#13 0x00007ffff36d7428 in QVTKInteractorAdapter::ProcessEvent(QEvent*,
vtkRenderWindowInteractor*) ()
   from /usr/local/lib/vtk-5.10/libQVTK.so.5.10
#14 0x00007ffff36d87e5 in QVTKWidget::mouseReleaseEvent(QMouseEvent*)
() from /usr/local/lib/vtk-5.10/libQVTK.so.5.10
#15 0x00000034e85f5b9a in QWidget::event(QEvent*) () from
/usr/lib64/libQtGui.so.4
#16 0x00000034e85aaa0c in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00000034e85b1425 in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib64/libQtGui.so.4
#18 0x00000034e6d57cdc in QCoreApplication::notifyInternal(QObject*,
QEvent*) () from /usr/lib64/libQtCore.so.4
#19 0x00000034e85b061e in
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*,
QWidget*, QWidget**, QPointer<QWidget>&, bool) () from
/usr/lib64/libQtGui.so.4
#20 0x00000034e86224b5 in ?? () from /usr/lib64/libQtGui.so.4
#21 0x00000034e8620ec0 in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib64/libQtGui.so.4
#22 0x00000034e8649da2 in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00000034e0c38f0e in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#24 0x00000034e0c3c938 in ?? () from /lib64/libglib-2.0.so.0
#25 0x00000034e0c3ca3a in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#26 0x00000034e6d7d5f3 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib64/libQtCore.so.4
#27 0x00000034e8649a6e in ?? () from /usr/lib64/libQtGui.so.4
#28 0x00000034e6d56722 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib64/libQtCore.so.4
#29 0x00000034e6d569ec in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib64/libQtCore.so.4
#30 0x00000034e6d58cd9 in QCoreApplication::exec() () from
/usr/lib64/libQtCore.so.4
#31 0x0000000000400e1b in main (argc=1, argv=<value optimized out>) at
/home/perryn/lsiscan/scandalous_application/main.cpp:13

cheers
Perryn





-- 
-----------------------
Perryn Fowler
ThoughtWorks



More information about the vtk-developers mailing list