Bug report #18655
"Too many attributes" error when saving layer with auxiliary fields
|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|
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.
#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.
#7 Updated by Nathan Perry over 1 year ago
Paolo Cavallini wrote:
Could you please check again on current release?
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.