Bug report #17244

New node tool snapping index out of sync for transaction groups (and triggers in the DB)

Added by Regis Haubourg over 6 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:Editing
Affected QGIS version:3.4.2 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:25142

Description

Hi,
This is something that happened in the past I guess.

When playing with new node tool with database updating other features than the currently edited one,
the snapping index is quickly out of sync. It worked correctly in 2.18 (issue was in 2.16 IIRW)

See the video here: [[https://youtu.be/Miex5XarR3g]]

bug_17244.sql - script to create and populate a minimal PG database (1.36 KB) Regis Haubourg, 2018-03-01 11:09 AM

17244_node_index_broken.qgs (22.8 KB) Regis Haubourg, 2018-03-01 11:09 AM

History

#1 Updated by Regis Haubourg about 6 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

Still true and very blocking in fact

#2 Updated by Giovanni Manghi about 6 years ago

  • Affected QGIS version changed from master to 3.0.0

#3 Updated by Regis Haubourg about 6 years ago

Added minimal dataset and project to reproduce

database is named bug_17244 on localhost in the attached project file

#4 Updated by Regis Haubourg about 6 years ago

Update video using the minimal database attached
[[https://youtu.be/zZDF9ZM7y6I]]

#5 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Please try on QGIS 3.4.1, if the issue is still valid change the affected version, thanks.

#6 Updated by Burghardt Scholle over 5 years ago

I can't confirm this bug in either 3.4.1 or QGIS Master (QGIS code revision 152b1b09ff). I have done my tests with my own data as well as with the data from Regis.

#7 Updated by Hugo Mercier over 5 years ago

The issue is still present in 3.4.2.

However, when the "data dependencies" are correctly declared on the table "pipe" (the table "pipe" may be modified by the view "vw_pipe"), it works correctly.

But ... this does not fix the other way around: when a modification is made to the table, the view geometry is updated but QGIS does not know it. That would require to declare circular data dependencies between layers, which has been forbidden initially, but should probably be loosen.

See https://share.oslandia.net/public/fe1af2

#8 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open
  • Affected QGIS version changed from master to 3.4.2

#9 Updated by Martin Dobias over 5 years ago

#10 Updated by Hugo Mercier over 5 years ago

Nope, the PR only fixed another sync problem of cache found in vertextool ("cachedGeometry").

But that does not resolve the problem here which is: the relation between the table and the view must be known somehow by QGIS to properly maintain caches. Declaring "data dependencies" between them works as a not-very-user-friendly workaround, and only in "one direction", because circular dependencies have been explicitly forbidden. A short term fix would be to allow for such circular dependencies.

IMHO a better fix would be to have an editing mode where no cache is used and get rid of these "data dependencies"

Also available in: Atom PDF