Bug report #10976

attribute table refresh problems after edits

Added by John Floyd - over 9 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Jürgen Fischer
Category:Attribute table
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 #:19321

Description

This is a problem whether through the calculator or manual changes are made.

Edit an entry.
Table does not change - shows old entry.
Save it - layer on screen changes to new value (displayed as a label) - table still has old value.
(edit back to old value - nothing changes at all because the entered value is the same as the table is displaying)

Close attribute table, reopen new value is in table.

This problem occurs on manual edit or calulator edits.

During any table display I am getting an error that may be related to this behaviour.
ERROR 1: IllegalArgumentException: point array must contain 0 or >1 elements

Maybe related - the layer is shapefile.


Related issues

Related to QGIS Application - Feature request #11319: Allow to (re)add features to null geometries Closed 2014-10-03
Related to QGIS Application - Bug report #11939: Updating field values does not work on sorted columns Closed 2015-01-04

Associated revisions

Revision 2073c039
Added by Jürgen Fischer about 9 years ago

attribute table: fix update of sort column (fixes #10976)

History

#1 Updated by John Floyd - over 9 years ago

Further investigation seems to suggest that this issue is related to another independent layer, that generates the stated error on a canvas redraw - which somehow in turn terminates the attribute table update - without crashing the application.

Not totally sure or clear on how this could evolve, but rebuilding the particular layer causes the Point error to disappear and the attribute table refresh than works as expected. Very strange?

#2 Updated by Matthias Kuhn over 9 years ago

Can you attach a project that demonstrates the problem?

#3 Updated by Giovanni Manghi over 9 years ago

  • Category changed from GUI to Vectors
  • Status changed from Open to Feedback
  • Target version deleted (Future Release - High Priority)

#4 Updated by John Floyd - over 9 years ago

Further investigation shows a possible related problem - at least for shape files. This hickup was active in my setup, when the problem showed up.

If a layer item is geometrically edited - removing all its vertices say for a line, the attribute table still have the attribute entry for it. That is despite no underlaying geometry data - the object still sort of exists.

Sorry still cant isolate a working example that causes the lock up in the attribute edit.

#5 Updated by V Charlet over 9 years ago

  • Target version set to Future Release - High Priority

Same problem with QGIS 2.2 and QGIS 2.4 on Windows, on several differents projects and different computers

#6 Updated by Frank Sokolic over 9 years ago

I also get the same problem although I haven't been able to reproduce it consistently. Sometimes the table refreshes correctly, sometimes not. Upon saving the table, closing it and then reopening it the updated edits are there. This is using shapefiles with QGIS 2.5.0-Master on Ubuntu 14.04.

#7 Updated by Giovanni Manghi over 9 years ago

  • Affected QGIS version changed from 2.4.0 to master
  • Subject changed from attribute table problems refresh and updates after edits to attribute table refresh problems after edits
  • Priority changed from Severe/Regression to High
  • Operating System deleted (linux)

I also seen this issue a number of times, but struggled to replicate it. Anyway it is not a regression (so we should not tag this as blocker) because I clearly remember to have seen this since... forever.

#8 Updated by Giovanni Manghi over 9 years ago

If a layer item is geometrically edited - removing all its vertices say for a line, the attribute table still have the attribute entry for it. That is despite no underlaying geometry data - the object still sort of exists.

this is certainly a regression on qgis 2.4/master, see #11319

#9 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Feedback to Open

#10 Updated by Jürgen Fischer over 9 years ago

  • Category changed from Vectors to Attribute table

#11 Updated by ramon . over 9 years ago

This seems fairly reliable for me:
  • Open an attribute table for a layer that you are editing.
    • Any change you make now should become visible.
  • Sort the attribute table by clicking on a header.
    • Any change you make now won't be visible unless you reopen the attribute table.

No, sorting it back to how it started doesn't fix it either.

I'm fairly sure there are other ways of producing this, but that's the known repeatable one for me.

#12 Updated by Pedro Venâncio over 9 years ago

ramon . wrote:

This seems fairly reliable for me:
  • Open an attribute table for a layer that you are editing.
    • Any change you make now should become visible.
  • Sort the attribute table by clicking on a header.
    • Any change you make now won't be visible unless you reopen the attribute table.

No, sorting it back to how it started doesn't fix it either.

I'm fairly sure there are other ways of producing this, but that's the known repeatable one for me.

Hi Ramon,

I've been testing and I can confirm the behavior you describe.

I do not know if there are other causes for the problem, but this seems to be one of them.

#13 Updated by Giovanni Manghi over 9 years ago

  • Priority changed from High to Severe/Regression
  • Target version changed from Future Release - High Priority to Version 2.8

ramon . wrote:

This seems fairly reliable for me:
  • Open an attribute table for a layer that you are editing.
    • Any change you make now should become visible.
  • Sort the attribute table by clicking on a header.
    • Any change you make now won't be visible unless you reopen the attribute table.

No, sorting it back to how it started doesn't fix it either.

I'm fairly sure there are other ways of producing this, but that's the known repeatable one for me.

confirmed, and I add that qgis 2.0.1 was working as expected.

#14 Updated by Filipe Dias over 9 years ago

I received reports from users that thought Field Calculator was not working because of this bug. It is very annoying and may lead less persistent users to think there is something seriously wrong.

#15 Updated by Filipe Dias over 9 years ago

  • Affected QGIS version changed from master to 2.6.1

#16 Updated by Giovanni Manghi over 9 years ago

Filipe Dias wrote:

I received reports from users that thought Field Calculator was not working because of this bug. It is very annoying and may lead less persistent users to think there is something seriously wrong.

it is a blocker, so it will certainly be fixed for 2.8

#17 Updated by Paolo Cavallini over 9 years ago

See also #11939

#18 Updated by Giovanni Manghi over 9 years ago

  • Affected QGIS version changed from 2.6.1 to master

This also affects edit widgets like the value map: if a column has been sorted then choosing a entry from the value map combo box will not result in a filled cell, unless sorting again or closing and reopening the table.

#19 Updated by Jürgen Fischer about 9 years ago

  • Status changed from Open to Feedback

Tried with airports.shp from the sample data - with a value map on "use". Seems to work fine for me.
Sorting by "cat" doesn't change that the update are shown for me. Regardless whether I do manual edits or update via expression and/or the field calculator.

#20 Updated by Giovanni Manghi about 9 years ago

Jürgen Fischer wrote:

Tried with airports.shp from the sample data - with a value map on "use". Seems to work fine for me.
Sorting by "cat" doesn't change that the update are shown for me. Regardless whether I do manual edits or update via expression and/or the field calculator.

see the following cast

https://www.dropbox.com/s/2psjltcwmpgu619/value_map_refresh.mp4?dl=0

#21 Updated by Jürgen Fischer about 9 years ago

  • Assignee set to Jürgen Fischer
  • Status changed from Feedback to Open

#22 Updated by Jürgen Fischer about 9 years ago

  • Status changed from Open to Closed

#23 Updated by Ger CO over 7 years ago

still an issue in 2.18.x.
And rather consistent when using shapefiles.
Features regularly are temporarily missing
in attribute table after making and saving edits
despite being displayed on map canvas.
Reloading shp fixes the issue until next edits are made.
Severe issue!

#24 Updated by Loïc Bouffard over 6 years ago

Work in 2.18.9 and still the same issue...
The same thing passing by 2 ways: copying and join two shapefiles, at the end some attributes are missing.
It works after closing QGIS and re opening but I don't know why is this appening and it's impossible to predict when it will be.
Hope this old problem will be fixed soon.

Also available in: Atom PDF