Bug report #2884

crash when resizing vertically the overview window

Added by Giovanni Manghi over 14 years ago. Updated almost 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:GUI
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied: Resolution:duplicate
Crashes QGIS or corrupts data: Copied to github as #:12944

Description

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.

Associated revisions

Revision af87923a
Added by Jürgen Fischer almost 14 years ago

fix #2884:
crashed when two map renderers are simultaneously rendering the layers
for the canvas and overview (eg. on resize, when overview is docked).
This might fix it.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15050 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 185ec5db
Added by Jürgen Fischer almost 14 years ago

fix #2884:
crashed when two map renderers are simultaneously rendering the layers
for the canvas and overview (eg. on resize, when overview is docked).
This might fix it.

git-svn-id: http://svn.osgeo.org/qgis/trunk@15050 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by luca76 - about 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.

#2 Updated by luca76 - about 14 years ago

I think: it could be a QT bug?

#3 Updated by Paolo Cavallini about 14 years ago

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

#4 Updated by luca76 - about 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.

#5 Updated by luca76 - about 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
#3905  0x00007ffff6774662 in QVariantAnimation::valueChanged(QVariant const&) () from /usr/lib/libQtCore.so.4
#3906  0x00007ffff677477c in ?? () from /usr/lib/libQtCore.so.4
#3907  0x00007ffff6774976 in ?? () from /usr/lib/libQtCore.so.4
#3908  0x00007ffff67776ee in QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State) () from /usr/lib/libQtCore.so.4
#3909  0x00007ffff6772ca6 in ?? () from /usr/lib/libQtCore.so.4
#3910  0x00007ffff60e2378 in ?? () from /usr/lib/libQtGui.so.4
#3911  0x00007ffff60477fe in ?? () from /usr/lib/libQtGui.so.4
#3912  0x00007ffff604db77 in ?? () from /usr/lib/libQtGui.so.4
#3913  0x00007ffff60712a9 in ?? () from /usr/lib/libQtGui.so.4
#10 0x00007ffff688335e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#3914 0x00007ffff5c6a854 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#3915 0x00007ffff5c6e93a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#3916 0x00007ffff75eb19b in [[QgsApplication]]::notify (this=0x7fffffffdd70, receiver=0xc84ed0, event=0x7fffffffd960)
    at /usr/local/src/qgis_unstable/src/core/qgsapplication.cpp:88
#3917 0x00007ffff6871d3c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#3918 0x00007ffff689d1d2 in ?? () from /usr/lib/libQtCore.so.4
#3919 0x00007ffff689a184 in ?? () from /usr/lib/libQtCore.so.4
#3920 0x00007ffff25cdb23 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#3921 0x00007ffff25ce300 in ?? () from /usr/lib/libglib-2.0.so.0
#3922 0x00007ffff25ce59d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3923 0x00007ffff689a82f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#3924 0x00007ffff5d0a37e in ?? () from /usr/lib/libQtGui.so.4
#3925 0x00007ffff6871122 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#3926 0x00007ffff687135c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#3927 0x00007ffff687576b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#3928 0x0000000000529b46 in main (argc=1, argv=0x7fffffffe528) at /usr/local/src/qgis_unstable/src/app/main.cpp:802

#6 Updated by Paolo Cavallini about 14 years ago

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

#7 Updated by Giovanni Manghi about 14 years ago

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

#8 Updated by Giovanni Manghi about 14 years ago

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

#9 Updated by Volker Fröhlich almost 14 years ago

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

#10 Updated by Jürgen Fischer almost 14 years ago

see also #3396.

#11 Updated by Jürgen Fischer almost 14 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

duplicate of #2714

Also available in: Atom PDF