Bug report #6658

Segfault duplicating layer

Added by Sandro Santilli almost 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:Larry Shaffer
Category:Map Legend
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:Yes Copied to github as #:15835

Description

A layer which was added to the legend and set to invisible.
Right-click, duplicate layer -> Segfault
Stack trace:

Core was generated by `output/bin/qgis'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000065cdb4 in QTreeWidgetItem::treeWidget (this=0x0) at /usr/include/qt4/QtGui/qtreewidget.h:85
85          inline QTreeWidget *treeWidget() const { return view; }
(gdb) bt
#0  0x000000000065cdb4 in QTreeWidgetItem::treeWidget (this=0x0) at /usr/include/qt4/QtGui/qtreewidget.h:85
#1  0x0000000000803eef in QgsLegendItem::storeAppearanceSettings (this=0x0)
    at /usr/src/qgis/qgis/src/app/legend/qgslegenditem.cpp:91
#2  0x00000000007fba1e in QgsLegend::moveItem (this=0x2b0e1b0, move=0x0, after=0x6ed5580)
    at /usr/src/qgis/qgis/src/app/legend/qgslegend.cpp:1979
#3  0x0000000000578963 in QgisApp::duplicateLayers (this=0x2b12280, lyrList=...)
    at /usr/src/qgis/qgis/src/app/qgisapp.cpp:5467

History

#1 Updated by Larry Shaffer almost 8 years ago

  • Status changed from Open to Feedback

Larry via irc:

gonna need more info on that duplicate layer ticket. was the layer in a group?
what was the provider? was the project saved before the duplication, or unsaved state?

Sandro via irc:

in a group, postgresql provider, most likely unsaved

#2 Updated by Sandro Santilli almost 8 years ago

This is 100% reproducible for me. Steps:
1. Open a topology with the topoviewer (db_manager)
2. Duplicate the "edge" layer

#3 Updated by Larry Shaffer almost 8 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

Fixed in commit 81f99d6

Also available in: Atom PDF