[Qgis-developer] Using --snapshot option freezes QGis

Giuseppe Sucameli brush.tyler at gmail.com
Mon Jun 25 07:17:58 PDT 2012


Hi devs,

the latest QGis (90b02ecc8) executed with the --snapshot option freezes.
It seems a deadlock occurs in the QgsMapRenderer::render method.

The problem is not due to plugins, I get the sam behavior running it
adding the --noplugins option.

Here's the command:

qgis --snapshot ~/ ~/test.qgs

and here's the backtrace:

(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb472748c in pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:169
#2  0xb54afdaa in ?? () from /usr/lib/libQtCore.so.4
#3  0xb54ac4b2 in QMutex::lock() () from /usr/lib/libQtCore.so.4
#4  0xb5ce64b6 in QMutexLocker::QMutexLocker (this=0xbfffd6bc,
m=0x8a34010) at /usr/include/qt4/QtCore/qmutex.h:102
#5  0xb5ce0338 in QgsMapRenderer::render (this=0x8a33ef0,
painter=0xbfffd7cc, forceWidthScale=0x0)
    at /home/brushtyler/projects/sources/qgis/src/core/qgsmaprenderer.cpp:223
#6  0xb594d110 in QgsMapCanvasMap::render (this=0x89b0ca0) at
/home/brushtyler/projects/sources/qgis/src/gui/qgsmapcanvasmap.cpp:83
#7  0xb5945c51 in QgsMapCanvas::refresh (this=0x899c958) at
/home/brushtyler/projects/sources/qgis/src/gui/qgsmapcanvas.cpp:391
#8  0xb59482bc in QgsMapCanvas::paintEvent (this=0x899c958,
e=0xbfffdf74) at
/home/brushtyler/projects/sources/qgis/src/gui/qgsmapcanvas.cpp:1020
#9  0xb4b5618e in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#10 0xb4f4a9f3 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#11 0xb4fd9062 in QAbstractScrollArea::viewportEvent(QEvent*) () from
/usr/lib/libQtGui.so.4
#12 0xb5195dff in QGraphicsView::viewportEvent(QEvent*) () from
/usr/lib/libQtGui.so.4
#13 0xb4fdb965 in ?? () from /usr/lib/libQtGui.so.4

BTW the canvas looks resized and overlaps the status bar.
Probably the resizeEvent requests a new paintEvent and something goes
wrong with the maprenderer mutex.

Does anybody confirm?
Regards.

-- 
Giuseppe Sucameli


More information about the Qgis-developer mailing list