Bug report #3970

QGIS Crashes when removing a layer

Added by Tim Sutton over 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System:Ubuntu Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:13969

Description

When removing a layer, QGIS sometimes crashes. I get the following backtrace. The layers in question were all vector layers.

#0  0x00007ffff2a2d5b8 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff70d66fa in QgsVectorLayer::nextFeature (this=0x4fc3d20, f=...)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsvectorlayer.cpp:1795
#2  0x00007ffff70d0bf6 in QgsVectorLayer::drawRendererV2 (this=0x4fc3d20, rendererContext=..., labeling=false)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsvectorlayer.cpp:731
#3  0x00007ffff70d2286 in QgsVectorLayer::draw (this=0x4fc3d20, rendererContext=...)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsvectorlayer.cpp:987
#4  0x00007ffff70723e2 in QgsMapRenderer::render (this=0x7ffffffed2e0, painter=0x7ffffffed5e0)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsmaprenderer.cpp:492
#5  0x00007ffff7112350 in QgsComposerMap::draw (this=0x6999f90, painter=0x7ffffffed5e0, extent=..., size=..., dpi=96)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/composer/qgscomposermap.cpp:177
#6  0x00007ffff71127dc in QgsComposerMap::cache (this=0x6999f90) at /home/timlinux/dev/cpp/Quantum-GIS/src/core/composer/qgscomposermap.cpp:229
#7  0x00007ffff71135f1 in QgsComposerMap::updateCachedImage (this=0x6999f90)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/composer/qgscomposermap.cpp:362
#8  0x00007ffff742bf8f in QgsComposerMap::qt_metacall (this=0x6999f90, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7ffffffed760)
    at /home/timlinux/dev/cpp/Quantum-GIS/build-release/src/core/composer/moc_qgscomposermap.cxx:78
#9  0x00007ffff5fb75f8 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007ffff742952b in QgsMapLayerRegistry::layerWillBeRemoved (this=0xe6f6a0, _t1=...)
    at /home/timlinux/dev/cpp/Quantum-GIS/build-release/src/core/moc_qgsmaplayerregistry.cxx:90
#11 0x00007ffff706e9b0 in QgsMapLayerRegistry::removeMapLayer (this=0xe6f6a0, theLayerId=..., theEmitSignal=true)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsmaplayerregistry.cpp:97
#12 0x000000000078441d in QgsLegend::removeSelectedLayers (this=0xf0a7c0) at /home/timlinux/dev/cpp/Quantum-GIS/src/app/legend/qgslegend.cpp:2003
#13 0x000000000055eae8 in QgisApp::removeLayer (this=0xd403c0) at /home/timlinux/dev/cpp/Quantum-GIS/src/app/qgisapp.cpp:4539
#14 0x00000000007fc3ed in QgisApp::qt_metacall (this=0xd403c0, _c=QMetaObject::InvokeMetaMethod, _id=45, _a=0x7ffffffedb00)
    at /home/timlinux/dev/cpp/Quantum-GIS/build-release/src/app/moc_qgisapp.cxx:407
#15 0x00007ffff5fb75f8 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#16 0x00007ffff535d112 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#17 0x00007ffff535d2ff in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#18 0x00007ffff535d46f in QAction::event(QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff53639e4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007ffff53683aa in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007ffff701869b in QgsApplication::notify (this=0x7fffffffdd10, receiver=0xdaa240, event=0x7ffffffee120)
    at /home/timlinux/dev/cpp/Quantum-GIS/src/core/qgsapplication.cpp:118
#22 0x00007ffff5fa249c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#23 0x00007ffff5395be0 in ?? () from /usr/lib/libQtGui.so.4

History

#1 Updated by Tim Sutton about 8 years ago

  • Target version changed from Version 1.7.1 to Version 1.7.2

#2 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.2 to Version 1.7.3

#3 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.3 to Version 1.7.4

#4 Updated by Giovanni Manghi almost 8 years ago

  • Resolution set to duplicate
  • Crashes QGIS or corrupts data set to No
  • Status changed from Open to Closed
  • Affected QGIS version set to master
  • Pull Request or Patch supplied set to No

duplicate of #3527

Also available in: Atom PDF