Bug report #18655

"Too many attributes" error when saving layer with auxiliary fields

Added by Nathan Perry over 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Editing
Affected QGIS version:3.0.0 Regression?:Yes
Operating System:Mac OS 10.13.3 Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:Yes Copied to github as #:26543

Description

When saving an edited GeoPackage layer that contains auxiliary fields, I will occasionally get the error "Layer has too many attributes (expecting [x], received [y]" (more precisely, I will get 20-30 identical error messages simultaneously). The layer will be successfully saved, but the values will be deleted from the auxiliary fields for the feature(s) I was most recently editing.

The error doesn't occur every time; perhaps 1-2 times out of 5. Saving the project before saving the layer seems to reduce, but not eliminate, the likelihood of getting the error.

I've attached an example project and data layer that causes the most trouble, but it happens with other GeoPackage layers as well.

national_water_m.gpkg (1.85 MB) Nathan Perry, 2018-04-06 05:15 PM

USA_Political.qgd (220 KB) Nathan Perry, 2018-04-06 05:22 PM

USA_Political.qgs (1.12 MB) Nathan Perry, 2018-04-06 05:22 PM

test.qgd (8 KB) Nathan Perry, 2018-04-07 04:59 AM

test.qgs (33.6 KB) Nathan Perry, 2018-04-07 04:59 AM

History

#1 Updated by Alessandro Pasotti over 2 years ago

The attached project contains a lot of unavailable layers, can you please attach a project with only the layer needed to reproduce the issue?

#2 Updated by Alessandro Pasotti over 2 years ago

  • Status changed from Open to Feedback

#3 Updated by Nathan Perry over 2 years ago

Alessandro Pasotti wrote:

The attached project contains a lot of unavailable layers, can you please attach a project with only the layer needed to reproduce the issue?

Sure. It doesn't seem to be a specific layer that causes the issue, but here's a project with just the one layer included. If you try to adjust one of the labels, it should activate the auxiliary fields; I've also included my own custom field for the string wrap length. Adjusting this, or any of the label settings, and then trying to save the layer, should be what triggers the error.

If it turns out you need my full project in order to reproduce the issue, then the legend item that points to my layer is Hydrography->Fill.

#4 Updated by Nathan Perry about 2 years ago

After working some more with this issue, it seems that the problem may be with the virtual field, rather than the auxiliary storage. It appears to be the same issue reported here:[[https://issues.qgis.org/issues/18812]]

#5 Updated by Nathan Perry about 2 years ago

As a further update, I continue to receive the error even after deleting the virtual field, so there may be separate issues both with auxiliary storage, and with virtual fields.

#6 Updated by Paolo Cavallini over 1 year ago

Could you please check again on current release?
Thanks.

#7 Updated by Nathan Perry over 1 year ago

Paolo Cavallini wrote:

Could you please check again on current release?
Thanks.

I can't immediately reproduce it in 3.4.2 with my test project, although I never determined the specific steps necessary to invoke the error. I have been using version 3.4.2 for some time without issue, although I no longer use auxiliary storage extensively. Virtual fields do seem to be stable in the current release.

#8 Updated by Giovanni Manghi over 1 year ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Also available in: Atom PDF