Bug report #7472

vector editing errors

Added by Alessandro Ciali over 6 years ago. Updated almost 6 years ago.

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

Description

With the current night-build release 1.9.0-134 editing an existing feature (I try node tool, clip and rotate feature) reports the follow warning in the log window (OGR):

Already active iterator on this provider was closed (level 1)

For polygon shapefile layer editing ends ok.
For line shapefile layer after editing all the features except the one edited disappear; saving changes restores the features.

It seems to be related to bug #7321 and bug #7267. This bug causes serious problems during editing.
The warnings were added in ec07a0c2.

7472_1_before-edit.png (260 KB) Larry Shaffer, 2013-05-26 04:22 PM

7472_2_on-edit_before-save.png (266 KB) Larry Shaffer, 2013-05-26 04:22 PM

7472_3_edit-saved.png (261 KB) Larry Shaffer, 2013-05-26 04:22 PM

test19edit.zip (5.76 KB) Alessandro Ciali, 2013-07-14 02:32 PM

edit_bug.avi (791 KB) Alessandro Ciali, 2013-07-15 02:33 PM

12.png (177 KB) Giovanni Manghi, 2013-07-16 01:22 AM

46.png (176 KB) Giovanni Manghi, 2013-07-16 01:22 AM


Related issues

Related to QGIS Application - Bug report #7321: all feature disappear when a node is modified using node ... Closed 2013-03-11
Related to QGIS Application - Bug report #7267: loss of attributes during split feature operation Closed 2013-03-03
Related to QGIS Application - Bug report #7071: Field calculator regression - does not update all features Closed 2013-01-29
Related to QGIS Application - Bug report #7862: "Already active iterator on this provider was closed." wh... Closed 2013-05-19
Related to QGIS Application - Bug report #7668: Merge feature tools causes Qgis crash Closed 2013-04-22
Related to QGIS Application - Bug report #8317: Deleted features are not really deleted. Closed 2013-07-17
Duplicated by QGIS Application - Bug report #7660: all features disappear when editing layer feature(s) unde... Closed 2013-04-20

Associated revisions

Revision 4164d6ed
Added by Nathan Woodrow over 6 years ago

Merge branch 'iterator'

Semi fix #7472.
Semi fix #7862

Revision 810c11bb
Added by Jürgen Fischer over 6 years ago

ogr provider: move REPACK into createSpatialIndex. Don't REPACK in deleteFeatures as there might still be pending changes that depend on the current feature ids (fixes #7472)

History

#2 Updated by Larry Shaffer over 6 years ago

Just ran into this nasty bug today, on Mac with recent master build of 5e28220. Makes simple editing seem destructive. Attached are photos showing the features disappearing during editing.

Provider: Spatialite
Layer type: Point
Map tool: Move feature (moved feature with 'trailhead' symbol)

Not sure if it is related, but after about 5 minutes of editing, and upon clicking 'Save edits' button, the associated CPU spins up to 100% and it takes a long time to save the edits, about 1-3 minutes. If I don't quit the app, the wait for saving or toggling editing gets even longer.

#3 Updated by Nathan Woodrow over 6 years ago

  • Assignee set to Martin Dobias

#4 Updated by Sandro Santilli over 6 years ago

  • Operating System changed from window to window, GNU/Linux

Same problem here with PostGIS provider on GNU/Linux.

#5 Updated by Jürgen Fischer over 6 years ago

  • Operating System deleted (window, GNU/Linux)
  • OS version deleted (win7 64bit)

#6 Updated by Anonymous over 6 years ago

  • Status changed from Open to Closed

#7 Updated by Nathan Woodrow over 6 years ago

This should be fixed now with the ogr provider. The PostGIS and spatialite driver are yet to be done.

#8 Updated by Alessandro Ciali over 6 years ago

I have just tested version f8d6e32 and it seems to perform editing in a right way! I've tested all the editing tools like add, copy-cut-paste, move, rotate, reshape,node tool on a polygon shapefile and always works perfectly. By the way I will continue to perform tests. Even the noise with features disappearing during editing with categorized rendered layers seems to be resolved.

#9 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Closed to In Progress

Nathan Woodrow wrote:

The PostGIS and spatialite driver are yet to be done.

so better tag this as "in progress"?

#10 Updated by Nathan Woodrow over 6 years ago

  • Assignee deleted (Martin Dobias)
  • Status changed from In Progress to Closed
  • Resolution set to fixed

All the other providers are done now.

#11 Updated by Alessandro Ciali over 6 years ago

  • Status changed from Closed to Reopened

I reopen this bug because it seems that editing is still affected by the seriouos problems already described. I performed some editing tasks, on a new created polygon shape: add new features, delete features and cut existing ones. After saving some features disappear and other are duplicated getting the attribute of the disappeared ones. This problem occurs with high frequency but is not systematic, so I can reproduce it, but not every time I perform an editing operation. It happens after saving, so it corrupts the shape permanently.
Tested on win7 with last master.

#12 Updated by Giovanni Manghi over 6 years ago

  • Crashes QGIS or corrupts data changed from No to Yes
  • Category changed from Vectors to Digitising
  • Resolution deleted (fixed)

#13 Updated by Nathan Woodrow over 6 years ago

  • Status changed from Reopened to Closed

Alessandro, can you do some more testing for us using a new version of master. I can't replicate any data loss or incorrect behavior. There was some issues with the split tools that have been fixed recently so I think this might have been caused by them.

I'm going to close this for now. Reopen if you still see the issue and can reproduce it for us.

#14 Updated by Alessandro Ciali over 6 years ago

I nathan, at this moment I have d37e03b version on win7, that's the most recent version I can download with OSGEO4W, so I think it's better to wait for a newer commit.
I'll post a ticket as soon as possible about results of tests,
bye

#15 Updated by Alessandro Ciali over 6 years ago

It seems that the problems with editing still persist. I have made some tests, and found a bug, reproducible almost every time you make the following actions:
- start editing the shape
- draw a feature, delete one feature, add another one;

save: after saving a feature disappear, and another has been duplicated with the attribute of the disappeared feature.
I attached the shape and project used in test.
Other tools (split, merge, merge attribute) seems to work as expected.
I hope it will help to get rid of this bug,

#16 Updated by Giovanni Manghi over 6 years ago

Alessandro Ciali wrote:

It seems that the problems with editing still persist. I have made some tests, and found a bug, reproducible almost every time you make the following actions:
- start editing the shape
- draw a feature, delete one feature, add another one;

save: after saving a feature disappear, and another has been duplicated with the attribute of the disappeared feature.
I attached the shape and project used in test.

Hi Alessandro,

this sound really similar to #8274

the point is that in both cases we are struggling to replicate the issue.

I used your project, and done the described steps, but still no issue.

Would you mind do and attach a screencast? You can use this

no installation needed.

#17 Updated by Alessandro Ciali over 6 years ago

Hi giovanni,
I made an orrible video, but I hope enough to show the problem. I summarize the actions:
  • create polygon #32
  • delete polygon #0
  • create polygon #33
  • save edits

polygons #25 and #33 disappear and polygons #23 and #28 are duplicated. The error may occur after a variable number of attemps. I think that the problem arises when the command "delete feature" is used after or before a command that create a new feature during. As you can se I work in windows 7. Reopen the ticket if you can replicate it.

I'm here if you have other requests, bye

#18 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Closed to Reopened

Alessandro Ciali wrote:

Hi giovanni,
I made an orrible video, but I hope enough to show the problem. I summarize the actions:
  • create polygon #32
  • delete polygon #0
  • create polygon #33
  • save edits

Hi Alessandro, I'm finally able to replicate it.

#19 Updated by Giovanni Manghi over 6 years ago

Hi Alessandro, I'm finally able to replicate it.

attached screenshots before and after.

If you will use the project attached by Alessandro please ignore the missing layer error, and be sure to enable the "avoid intersection" option in the snapping dialog. Put also some transparency to the layer.

https://issues.qgis.org/attachments/6000/test19edit.zip

#20 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Reopened to Closed

#21 Updated by Simon Dedman almost 6 years ago

  • Status changed from Closed to Reopened

Hi all, apologies for reopening if this isn't the best way of raising this.

I've just posted this problem on gis.stackexchange here, after having a similar problem here, and I think they're related to this bug.

In brief: in QGis master, csv files (and polygons e.g. voronoi built off them?) disappear when styles other than 'single symbol' are selected. A blank-named column field is present at the end of the list of candidate columns upon which to base the style.
In DuFour, neither of these problems are present.

Thanks. Let me know if this is unrelated to the internal workings of this page's bug and i'll open a new bug report for it.

Simon

#22 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Reopened to Closed
  • Resolution set to fixed/implemented

Simon Dedman wrote:

Hi all, apologies for reopening if this isn't the best way of raising this.

I've just posted this problem on gis.stackexchange here, after having a similar problem here, and I think they're related to this bug.

In brief: in QGis master, csv files (and polygons e.g. voronoi built off them?) disappear when styles other than 'single symbol' are selected. A blank-named column field is present at the end of the list of candidate columns upon which to base the style.
In DuFour, neither of these problems are present.

Thanks. Let me know if this is unrelated to the internal workings of this page's bug and i'll open a new bug report for it.

Simon

I can't see how the issue you describe is related to the description of this ticket. Please file a new ticket with a proper (resumed) description, and steps/data to replicate. Thanks!

Also available in: Atom PDF