Bug report #7963

qgis master crashes when adding a raster after having created a layout composer

Added by Giovanni Manghi over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16822

Description

for now tested on win/osgeo4w, will do also on Linux.

Steps:

add a vector
create a layout, add a map object
close the layout
add a raster
crash

saving the project with just the vector, closing qgis and then adding the raster still causes crash.

If the layout is not created, then adding the raster does not cause the crash.

I'm adding two sample files, but it happens also with other data.

dem_clipped.tif (786 KB) Giovanni Manghi, 2013-06-01 09:56 AM

etr89_3763.zip (229 KB) Giovanni Manghi, 2013-06-01 09:56 AM

Associated revisions

Revision f9a0a1d1
Added by Radim Blazek over 11 years ago

fixed rashes in atlas calling vector methods for rasters, fixes #7963

History

#1 Updated by Giovanni Manghi over 11 years ago

confirmed on Linux

gio@sibirica ~ $ qgis
Warning: loading of qt translation failed [/usr/share/qt4/translations/qt_en_US]
Fatal: QGIS died on signal 11
Stacktrace (run through c++filt):
/usr/bin/qgis.bin(Z15myMessageOutput9QtMsgTypePKc+0xac)[0x4e6b5c]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qt_message_output(QtMsgType, char const*)+0x2e)[0x7f7b910e641e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(+0x718bf)[0x7f7b910e68bf]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(qFatal(char const*, ...)+0x94)[0x7f7b910e6a64]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0)[0x7f7b8e5d74a0]
/usr/lib/libqgis_core.so.1.9.0(QgsVectorLayer::wkbType() const+0x0)[0x7f7b92243af0]
/usr/bin/qgis.bin(QgsAtlasCompositionWidget::checkLayerType(QgsVectorLayer*)+0xc)[0x75582c]
/usr/bin/qgis.bin(QgsAtlasCompositionWidget::onLayerAdded(QgsMapLayer*)+0x112)[0x7559a2]
/usr/bin/qgis.bin[0x7c593c]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7f7b91204281]
/usr/lib/libqgis_core.so.1.9.0(QgsMapLayerRegistry::layerWasAdded(QgsMapLayer*)+0x32)[0x7f7b92336122]
/usr/lib/libqgis_core.so.1.9.0(QgsMapLayerRegistry::addMapLayers(QList<QgsMapLayer*>, bool, bool)+0x52d)[0x7f7b9219e5fd]
/usr/bin/qgis.bin(QgisApp::addRasterLayer(QgsRasterLayer*)+0xc8)[0x503838]
/usr/bin/qgis.bin(QgisApp::addRasterLayerPrivate(QString const&, QString const&, QString const&, bool, bool)+0x300)[0x504c70]
/usr/bin/qgis.bin(QgisApp::addRasterLayers(QStringList const&, bool)+0x41f)[0x50b89f]
/usr/bin/qgis.bin(QgisApp::addRasterLayer()+0xfe)[0x50c32e]
/usr/bin/qgis.bin[0x7b91d5]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QMetaObject::activate(QObject*, QMetaObject const*, int, void**)+0x2b1)[0x7f7b91204281]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::triggered(bool)+0x32)[0x7f7b9056c132]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAction::activate(QAction::ActionEvent)+0x6f)[0x7f7b9056c31f]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x59ad4a)[0x7f7b90941d4a]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QAbstractButton::mouseReleaseEvent(QMouseEvent*)+0x8c)[0x7f7b90941ffc]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QToolButton::mouseReleaseEvent(QMouseEvent*)+0xa)[0x7f7b909ff5da]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QWidget::event(QEvent*)+0x684)[0x7f7b905c3144]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0xb4)[0x7f7b90572894]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::notify(QObject*, QEvent*)+0xabf)[0x7f7b905780bf]
/usr/lib/libqgis_core.so.1.9.0(QgsApplication::notify(QObject*, QEvent*)+0x96)[0x7f7b920fcc46]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x8c)[0x7f7b911efe9c]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)+0x172)[0x7f7b90573862]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24bbf5)[0x7f7b905f2bf5]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(QApplication::x11ProcessEvent(_XEvent*)+0xdce)[0x7f7b905f1bae]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2740d2)[0x7f7b9061b0d2]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x133)[0x7f7b8d103d53]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x480a0)[0x7f7b8d1040a0]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x34)[0x7f7b8d104164]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x6f)[0x7f7b9121f3bf]
/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x273d5e)[0x7f7b9061ad5e]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x32)[0x7f7b911eec82]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xf7)[0x7f7b911eeed7]
/usr/lib/x86_64-linux-gnu/libQtCore.so.4(QCoreApplication::exec()+0x87)[0x7f7b911f3f67]
/usr/bin/qgis.bin(main+0x229e)[0x4e2b0e]
/lib/x86_64-linux-gnu/libc.so.6(_libc_start_main+0xed)[0x7f7b8e5c276d]
/usr/bin/qgis.bin[0x4e6901]
Aborted (core dumped)

#2 Updated by Radim Blazek over 11 years ago

  • Status changed from Open to Closed

#3 Updated by Radim Blazek over 11 years ago

  • Category set to Map Composer/Printing

The problem was in QgsAtlasCompositionWidget casting raster maps to vector and then calling vector methods with null pointer. It may be that there are more similar problems in atlas.

Also available in: Atom PDF