Bug report #13541
regression: editing complex polygon freezes QGIS (for as long as 1 minute) per node move
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Nyall Dawson | ||
Category: | Digitising | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21583 |
Description
I've just spotted a significant regression under QGIS 2.12, whereas QGIS will freeze for a significant amount of time when trying to edit complex polygons. The freeze occurs when you select a polygon with the node tool, and every time you succeed (after waiting for a long time) into moving a node.
Steps to reproduce:
1. Create a new project
2. Add the attached shapefile (ocean.shp)
3. Switch on the edit mode for that layer
4. Select the node tool
5. Click on the largest polygon in the layer, and see QGIS freeze for a long time
6. Try to move a node, QGIS freezes, and eventually the node gets moved
Needs fixing before 2.12 is shipped.
Associated revisions
Use a model for node editor table (fixes #13541)
This commit switches the node editor to use a model backend rather then
inserting and updating every node on every edit. Fixes the hang when
editing a large feature.
Also implements some extra functionality like scrolling to a selected
vertex in the table.
History
#1 Updated by Paolo Cavallini about 9 years ago
- Subject changed from regression: editing complexe polygon freezes QGIS (for as long as 1 minute) per node move to regression: editing complex polygon freezes QGIS (for as long as 1 minute) per node move
#2 Updated by Mathieu Pellerin - nIRV about 9 years ago
This is where QGIS freezes:
#0 0x00007ffff565d9ed in QHeaderView::isSectionHidden(int) const ()
from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#1 0x00007ffff56608e8 in QHeaderView::sectionsInserted(QModelIndex const&, int, int) ()
from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#2 0x00007ffff5de2f60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3 0x00007ffff5e33484 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4 0x00007ffff5dc84b2 in QAbstractItemModel::endInsertRows() ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5 0x00007ffff56c0bee in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6 0x00007ffff56bf069 in QTableWidget::insertRow(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7 0x00007ffff77cf395 in QgsNodeEditor::rebuildTable() ()
from /home/webmaster/dev/cpp/QGIS/bm/output/lib/libqgis_app.so.2.11.0
#8 0x00007ffff77cf135 in QgsNodeEditor::QgsNodeEditor(QgsVectorLayer*, QgsSelectedFeature*, QgsMapCanvas*) () from /home/webmaster/dev/cpp/QGIS/bm/output/lib/libqgis_app.so.2.11.0
That looks like it could be linked to the vertex editor panel.
#3 Updated by Mathieu Pellerin - nIRV about 9 years ago
Disabling validation doesn't remove the freeze; it increasingly looks like the vertex editor panel is the cause of the freeze.
#4 Updated by Mathieu Pellerin - nIRV about 9 years ago
Ok, the freeze is definitively caused by the rebuildTable() function. If I "disable" rebuildTable() by adding a return; at the beginning of that function, QGIS doesn't freeze.
#5 Updated by Nyall Dawson about 9 years ago
- Assignee set to Nyall Dawson
#6 Updated by Nyall Dawson about 9 years ago
- Status changed from Open to Closed
Fixed in changeset 534cb410eb53ab1ff964c34e10c8e034c7f08b62.