Opened 14 years ago

Closed 13 years ago

#2884 closed bug (duplicate)

crash when resizing vertically the overview window

Reported by: lutra Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.7.0
Component: GUI Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: Linux
Platform Version: Awaiting user input: no

Description (last modified by jef)

Ok, this may be related to other tickets about crashes when resizing the overview window. In this case I'm experiencing the crash while resizing it vertically, not horizontally.

I'm under a fresh installation of Ubuntu 10,04 and a fresh installation of qgis trunk.

This is the message:

Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Warning: QPainter::end: Painter not active, aborted
Segmentation fault

and this are the steps to replicate:

  • open a new project
  • add the "rede viaria layer" from this wfs server http://mapas.igeo.pt/wfs/sc500k.1
  • set project CRS to epsg 3763
  • right click on the layer and select "show in overview"
  • right click on empty spot in the toolbars and activate the overview window
  • in my case the overview window will show above the TOC window and with a very little height
  • drag and drop the overview window under the TOC
  • resize vertically the overview window -> qgis will crash with the above message or with just "seg fault"

not tested under windows.

Change History (12)

comment:1 by jef, 14 years ago

Component: Build/InstallGUI
Description: modified (diff)

comment:2 by trapanator, 14 years ago

Windows 1.5.0 build here running on Windows XP. Doesn't seg fault.

But I discovered that if I drag the Overview, only some parts of the WFS layer are drawn.

comment:3 by trapanator, 14 years ago

I think: it could be a QT bug?

comment:4 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

Can anyone test it with different Qt versions, and note here which ones are working, and which not?

comment:5 by trapanator, 14 years ago

Confirmed the bug here (Archlinux, QT 4.6.3, KDE 4.5.1). I've compiled QGIS with debugging options on, here's the backtrace of the segmentation fault:

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 224: (render) ========== Rendering ==========
Warning: QPainter::end: Painter not active, aborted
Debug: /usr/local/src/qgis_unstable/src/gui/qgsmapoverviewcanvas.cpp: 162: (drawExtentRect) panning: extent to widget: [0,23] [251x129]
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 195: (adjustExtentToSize) Map units per pixel (x,y) : 5041.32, 4900.5

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 196: (adjustExtentToSize) Pixmap dimensions (x,y) : 250, 179

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 197: (adjustExtentToSize) Extent dimensions (x,y) : 1.26033e+06, 877190

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 198: (adjustExtentToSize) -594174.7892561983317137,-453595.0413223140058108 : 666155.7892561983317137,423595.0413223140058108
Debug: /usr/local/src/qgis_unstable/src/core/qgsscalecalculator.cpp: 139: (calculateGeographicDistance) Distance across map extent (m): 4.68037e+10
Debug: /usr/local/src/qgis_unstable/src/core/qgsscalecalculator.cpp: 90: (calculate) Using conversionFactor of 39.3701
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 209: (adjustExtentToSize) Scale (assuming meters as map units) = 1:7.07584e+11
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 224: (render) ========== Rendering ==========
Warning: QPainter::end: Painter not active, aborted
Debug: /usr/local/src/qgis_unstable/src/gui/qgsmapoverviewcanvas.cpp: 162: (drawExtentRect) panning: extent to widget: [0,26] [251x128]
Warning: QPixmap::operator=: Cannot assign to pixmap during painting
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 195: (adjustExtentToSize) Map units per pixel (x,y) : 5041.32, 4851.6

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 196: (adjustExtentToSize) Pixmap dimensions (x,y) : 250, 186

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 197: (adjustExtentToSize) Extent dimensions (x,y) : 1.26033e+06, 902397

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 198: (adjustExtentToSize) -594174.7892561983317137,-466198.3471074380213395 : 666155.7892561983317137,436198.3471074380213395
Debug: /usr/local/src/qgis_unstable/src/core/qgsscalecalculator.cpp: 139: (calculateGeographicDistance) Distance across map extent (m): 4.68037e+10
Debug: /usr/local/src/qgis_unstable/src/core/qgsscalecalculator.cpp: 90: (calculate) Using conversionFactor of 39.3701
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 209: (adjustExtentToSize) Scale (assuming meters as map units) = 1:7.07584e+11
Warning: QPainter::begin: A paint device can only be painted by one painter at a time.

comment:6 by trapanator, 14 years ago

the part above is generated when I am resizing the overview. This is the last that generates the segmentation fault:

Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 224: (render) ========== Rendering ==========
Warning: QPainter::end: Painter not active, aborted
Debug: /usr/local/src/qgis_unstable/src/gui/qgsmapoverviewcanvas.cpp: 162: (drawExtentRect) panning: extent to widget: [0,29] [251x129]
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 481: (render) Layer rendered without issues
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 521: (render) Done rendering map layers
Debug: /usr/local/src/qgis_unstable/src/core/qgsmaprenderer.cpp: 599: (render) Rendering completed in (seconds): 0.281
Debug: /usr/local/src/qgis_unstable/src/gui/qgsmapoverviewcanvas.cpp: 162: (drawExtentRect) panning: extent to widget: [0,29] [251x129]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6885c1d in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
(gdb) bt
#0  0x00007ffff6885c1d in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#1  0x00007ffff6774662 in QVariantAnimation::valueChanged(QVariant const&) () from /usr/lib/libQtCore.so.4
#2  0x00007ffff677477c in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007ffff6774976 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007ffff67776ee in QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State) () from /usr/lib/libQtCore.so.4
#5  0x00007ffff6772ca6 in ?? () from /usr/lib/libQtCore.so.4
#6  0x00007ffff60e2378 in ?? () from /usr/lib/libQtGui.so.4
#7  0x00007ffff60477fe in ?? () from /usr/lib/libQtGui.so.4
#8  0x00007ffff604db77 in ?? () from /usr/lib/libQtGui.so.4
#9  0x00007ffff60712a9 in ?? () from /usr/lib/libQtGui.so.4
#10 0x00007ffff688335e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#11 0x00007ffff5c6a854 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007ffff5c6e93a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007ffff75eb19b in QgsApplication::notify (this=0x7fffffffdd70, receiver=0xc84ed0, event=0x7fffffffd960)
    at /usr/local/src/qgis_unstable/src/core/qgsapplication.cpp:88
#14 0x00007ffff6871d3c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#15 0x00007ffff689d1d2 in ?? () from /usr/lib/libQtCore.so.4
#16 0x00007ffff689a184 in ?? () from /usr/lib/libQtCore.so.4
#17 0x00007ffff25cdb23 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#18 0x00007ffff25ce300 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00007ffff25ce59d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#20 0x00007ffff689a82f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#21 0x00007ffff5d0a37e in ?? () from /usr/lib/libQtGui.so.4
#22 0x00007ffff6871122 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0x00007ffff687135c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#24 0x00007ffff687576b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#25 0x0000000000529b46 in main (argc=1, argv=0x7fffffffe528) at /usr/local/src/qgis_unstable/src/app/main.cpp:802

comment:7 by pcav, 14 years ago

I cannot reproduce it with libqtcore4 4:4.6.3-4 on Debian unstable

comment:8 by lutra, 14 years ago

still true on trunk/ubuntu and libqtcore4 4:4.6.2-0

comment:9 by lutra, 14 years ago

it crashes also on ubuntu 10.10, qgis trunk and libqtcore4 4:4.7.0-0

comment:10 by volter, 13 years ago

Milestone: Version 1.6.0Version 1.7.0
Platform: DebianLinux

Confirmed for Fedora 14, QGIS 1.6, Qt 4.7.0-8.

comment:11 by jef, 13 years ago

see also #3396.

comment:12 by jef, 13 years ago

Resolution: duplicate
Status: newclosed

duplicate of #2714

Note: See TracTickets for help on using tickets.