Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in table attribute causes "Invalid Field Index" error when trying to save #15899

Closed
qgib opened this issue Nov 20, 2012 · 6 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority

Comments

@qgib
Copy link
Contributor

qgib commented Nov 20, 2012

Author Name: Alexandre Neto (@SrNetoChan)
Original Redmine Issue: 6735
Affected QGIS version: 1.8.0


I'm using, QGIS 1.8 6416f38, in a Windows Vista 32bit Machine. Changes in table attribute causes "Invalid Field Index" error when trying to save.

The error occurs doing the following steps:

  • Open editing;
  • Create new field; # Ups... not the field type I wanted
  • DO NOT SAVE;
  • Erase the same field;
  • Save edition.

QGIS is enable to save the changes trowing the following error:

Could not commit changes to layer teste2


  Errors: ERROR: 1 attribute(s) not deleted.
  SUCCESS: 1 attribute(s) added.
  SUCCESS: 1 attribute value(s) changed.
  
  Provider errors:
  OGR error deleting field 1: Invalid field index

The error only occurs when deleting a recent created fields.

After that, the shapefile index seems to be messed up and data edited in new fields may keep throwing errors, or even be lost.

I haven't tried in a Linux machine.

WORKAROUND: Always save editing immediately after creating a new field.

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2012

Author Name: Alexandre Neto (@SrNetoChan)


I have tried in Xubuntu (OSGEO Live 6) and the same issue occurs.

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2012

Author Name: Giovanni Manghi (@gioman)


Alexandre Neto wrote:

I have tried in Xubuntu (OSGEO Live 6) and the same issue occurs.

Hi Alexandre, does this happen also on master or 1.7.4 (looking for a possible fix/regression)?

@qgib
Copy link
Contributor Author

qgib commented Nov 20, 2012

Author Name: Andre Joost (Andre Joost)


Giovanni Manghi wrote:

Hi Alexandre, does this happen also on master or 1.7.4 (looking for a possible fix/regression)?

I'm not Alexandre, but can confirm the bug for master on Windows XP.
The table manager plugin does the operation without throwing errors.

@qgib
Copy link
Contributor Author

qgib commented Nov 21, 2012

Author Name: Alexandre Neto (@SrNetoChan)


I had the chance to try in a 1.7.0 Installation. The problem was not replicable, as in 1.7 was not possible to delete attributes in the attribute table window.

@qgib
Copy link
Contributor Author

qgib commented Dec 30, 2012

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Jun 2, 2013

Author Name: Giovanni Manghi (@gioman)


seems fixed on master, reopen if necessary.


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Crash/Data Corruption labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption High Priority
Projects
None yet
Development

No branches or pull requests

1 participant