Bug report #5877

Crash when adding WMS layer with enabled "Contrast enchancement" option

Added by Alexander Bruy about 7 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:Marco Hugentobler
Category:Rasters
Affected QGIS version:master Regression?:No
Operating System:all Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:15337

Description

If global option "Contrast enhancement" (in "Settings - Options - Rendering") has value different from "No Stretch" and checkbox "Use standard deviation" is checked, then QGIS crashes when adding any WMS layer. Tested with latest QGIS master (8304d6a)
Here is backtrace

Program received signal SIGFPE, Arithmetic exception.
0xb60aa6af in QgsRasterDataProvider::bandStatistics (this=0xa312fd8, 
    theBandNo=1)
    at /home/alex/devel/cpp/qgis/master/src/core/qgsrasterdataprovider.cpp:258
258      myNXBlocks = ( xSize() + myXBlockSize - 1 ) / myXBlockSize;
(gdb) bt
#0  0xb60aa6af in QgsRasterDataProvider::bandStatistics (this=0xa312fd8, 
    theBandNo=1)
    at /home/alex/devel/cpp/qgis/master/src/core/qgsrasterdataprovider.cpp:258
#1  0xb6186d23 in QgsRasterRendererRegistry::minMaxValuesForBand (
    this=0x8927a68, band=1, provider=0xa312fd8, [email protected], 
    [email protected])
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterrendererregistry.cpp:306
#2  0xb61872b3 in QgsRasterRendererRegistry::defaultRendererForDrawingStyle (
    this=0x8927a68, [email protected], provider=0xa312fd8)
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterrendererregistry.cpp:219
#3  0xb6174e8f in QgsRasterLayer::setRendererForDrawingStyle (this=0xa314548, 
    [email protected])
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterlayer.cpp:593
#4  0xb617cee5 in setDrawingStyle (this=0xa314548, provider=...)
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterlayer.h:336
#5  QgsRasterLayer::setDataProvider (this=0xa314548, provider=...)
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterlayer.cpp:1655
#6  0xb618056a in QgsRasterLayer::QgsRasterLayer (this=0xa314548, uri=..., 
    baseName=..., providerKey=..., loadDefaultStyleFlag=true)
    at /home/alex/devel/cpp/qgis/master/src/core/raster/qgsrasterlayer.cpp:160
#7  0x0811fdb8 in QgisApp::addRasterLayer (this=0x8686b38, uri=..., 
    baseName=..., providerKey=...)
    at /home/alex/devel/cpp/qgis/master/src/app/qgisapp.cpp:7054
#8  0x0834a345 in QgisApp::qt_metacall (this=0x8686b38, 
    _c=QMetaObject::InvokeMetaMethod, _id=42, _a=0xbfffd040)
    at /home/alex/devel/cpp/qgis/master/build/src/app/moc_qgisapp.cxx:466
#9  0xb56ddb7a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#10 0xb56ed9bd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#11 0xb278b648 in QgsWMSSourceSelect::addRasterLayer (this=0xa26e958, _t1=..., 
    _t2=..., _t3=...)
    at /home/alex/devel/cpp/qgis/master/build/src/providers/wms/moc_qgswmssourceselect.cxx:151
#12 0xb276ee71 in QgsWMSSourceSelect::addClicked (this=0xa26e958)
    at /home/alex/devel/cpp/qgis/master/src/providers/wms/qgswmssourceselect.cpp:542
#13 0xb278b7fb in QgsWMSSourceSelect::qt_metacall (this=0xa26e958, 
    _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbfffd378)
    at /home/alex/devel/cpp/qgis/master/build/src/providers/wms/moc_qgswmssourceselect.cxx:124
#14 0xb56ddb7a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#15 0xb56ed9bd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#16 0xb5311d39 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#17 0xb501f269 in ?? () from /usr/lib/libQtGui.so.4
#18 0xb5020b24 in ?? () from /usr/lib/libQtGui.so.4
#19 0xb5020dde in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/libQtGui.so.4
#20 0xb4c72b94 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#21 0xb501fe1e in QAbstractButton::event(QEvent*) ()
   from /usr/lib/libQtGui.so.4
#22 0xb50bfe12 in QPushButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb4c198c4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#24 0xb4c1efca in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#25 0xb5fcc490 in QgsApplication::notify (this=0xbffff628, receiver=0xa2c2b20, 
    event=0xbfffdbb8)
    at /home/alex/devel/cpp/qgis/master/src/core/qgsapplication.cpp:222
#26 0xb56d752b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQtCore.so.4
#27 0xb4c1a832 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/libQtGui.so.4
#28 0xb4ca2aac in ?? () from /usr/lib/libQtGui.so.4
#29 0xb4ca1017 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/libQtGui.so.4
#30 0xb4ccaec2 in ?? () from /usr/lib/libQtGui.so.4
#31 0xb3913432 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#32 0xb3913c10 in ?? () from /usr/lib/libglib-2.0.so.0
#33 0xb3913ec4 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#34 0xb5704bac in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0xb4ccaad5 in ?? () from /usr/lib/libQtGui.so.4
#36 0xb56d66e9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4

History

#1 Updated by Marco Hugentobler about 7 years ago

  • Status changed from Open to Closed

Fixed in f383deae8cab8f85bb7f9e8de9d71fbe37fa4160

Also available in: Atom PDF