[vtk-developers] [vtkusers] qtimageviewer example crashes with vtk 5.6.0

Thorben Kröger thorben.kroeger at iwr.uni-heidelberg.de
Thu May 6 03:52:50 EDT 2010


On Wednesday 05 May 2010 22:02:56 Clinton Stimpson wrote:
> The "-graphicssystem opengl" option for Qt/VTK applications is not
> supported.

This should be added to the documentation of QVTKWidget then...

> 
> For the infinite recursion, I've seen that happen if there was a particluar
> QStyle used with a QVTKWidget that has no parent.  Changing QStyle or
> giving it a parent might solve your problem.
> QWidget* parent_widget = new QWidget(NULL);
> QVTKWidget* new_widget = new QVTKWidget(parent_widget);
> QVBoxLayout* l = new QVBoxLayout(parent_widget);
> l->setContentsMargins(0,0,0,0);
> parent_widget->setLayout(l);
> l->addWidget(new_widget);

Indeed, I was using QVTKWidget as a top level widget with parent = 0.
I now put it in a QMainWindow as central widget and it works :-)

I'm CC'ing vtk-developers...

Thanks for your help,

Thorben

> 
> If that doesn't fix your problem, then you'll have to put a breakpoint in
> QPaintEngine::drawPolygon to see from where it starts an infinite
> recursion.
> 
> Clint
> 
> On Wednesday, May 05, 2010 12:26:38 pm Thorben Kröger wrote:
> > Hello,
> > Today I tried migrating to vtk 5.6.0.
> > However, my application using QVTK now crashes. I looked at the
> > distributed Qt examples and qtimageviewer exhibits what seems to be the
> > same crash:
> > 
> > GNU gdb (Gentoo 7.1 p1) 7.1
> > Copyright (C) 2010 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html> This is free software: you are free to
> > change and redistribute it. There is NO WARRANTY, to the extent permitted
> > by law.  Type "show copying" and "show warranty" for details.
> > This GDB was configured as "x86_64-pc-linux-gnu".
> > For bug reporting instructions, please see:
> > <http://bugs.gentoo.org/>...
> > Reading symbols from
> > /home/thorben/tmp/VTK/Examples/GUI/Qt/ImageViewer/qtimageviewer...(no
> > debugging symbols found)...done.
> > (gdb) r
> > Starting program:
> > /home/thorben/tmp/VTK/Examples/GUI/Qt/ImageViewer/qtimageviewer
> > warning: no loadable sections found in added symbol-file
> > /usr/lib64/debug/lib64/ld-2.11.1.so.debug
> > [Thread debugging using libthread_db enabled]
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff71e3c8b in QPaintEngine::drawPolygon(QPoint const*, int,
> > QPaintEngine::PolygonDrawMode) () from /usr/lib64/qt4/libQtGui.so.4
> > (gdb)
> > 
> > The backtrace yields some 2000 call to drawPolygon() ...
> > 
> > What's also intersesting is that the program cannot use the opengl
> > graphicssystem:
> > 
> > (gdb) r
> > Starting program:
> > /home/thorben/tmp/VTK/Examples/GUI/Qt/ImageViewer/qtimageviewer -
> > graphicssystem opengl
> > warning: no loadable sections found in added symbol-file
> > /usr/lib64/debug/lib64/ld-2.11.1.so.debug
> > [Thread debugging using libthread_db enabled]
> > using visual class 4, id 9f
> > QGLFramebufferObject: Framebuffer incomplete attachment.
> > QGLFramebufferObject: Framebuffer incomplete attachment.
> > Failed to create pixmap texture buffer of size  QSize(32, 192) , falling
> > back to raster paint engine
> > QGLFramebufferObject: Framebuffer incomplete attachment.
> > QGLFramebufferObject: Framebuffer incomplete attachment.
> > Failed to create pixmap texture buffer of size  QSize(128, 192) , falling
> > back to raster paint engine
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff71e3c8b in QPaintEngine::drawPolygon(QPoint const*, int,
> > QPaintEngine::PolygonDrawMode) () from /usr/lib64/qt4/libQtGui.so.4
> > (gdb)
> > 
> > Has anyone come across this problem?
> > 
> > Thorben
> > _______________________________________________
> > Powered by www.kitware.com
> > 
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > 
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtk-developers mailing list