Feature request #13468

Error in psSHP->sHooks.Fwrite : not a really meaningful error message

Added by Harrissou Santanna over 4 years ago. Updated about 4 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Digitising
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:21515

Description

I have a shapefile I can't add a feature to. I can change attributes, geometry without problem. But each time I add a new feature (digitize a simple rectangle or copy paste a feature), impossible to save these modifications. I'll dig what the problem may be and open another issue report.
But the current problem is that when saving, I get an error message that should be better expressed.

Could not Commit changes to layer MyLayer
Errors : ERROR: 1 feature(s) not added.
Provider errors:
OGR vector creating feature - 16: Error in psSHP->sHooks.Fwrite() while writing object to .shp file.

This doesn't help user understand what's going wrong with his data so, if it's possible to give a more understandable message, it'd be nice...

History

#1 Updated by Giuseppe Sucameli over 4 years ago

  • Status changed from Open to Feedback

Hi, more info are needed to understand the issue: QGIS version/revision, operating system.

In addition, if you attach a small dataset to reproduce the error we can check whether the error is due to QGIS code or not.

#2 Updated by Jürgen Fischer over 4 years ago

Might related to GDAL #3236 (ie. shapefile is larger than 2 or 4 GB). But that's the error message, we got from OGR - we can't interpret all possible error messages from OGR anyway, so I'm afraid relaying the verbatim error message from OGR to the user is the best we can do.

#3 Updated by Harrissou Santanna over 4 years ago

You're right, indeed. Sorry! My report was rather on the message text than the digitising issue.
My layer is a shapefile I created with the "save as" option from a subset of a postgis table. No error found according to QGIS error checker. Removing the layer from the project and add it again let me fully change features without problem. So I'm not sure sharing data will change anything.

This occured in master fea4ed9.

Jürgen Fischer wrote:

Might related to GDAL #3236 (ie. shapefile is larger than 2 or 4 GB). But that's the error message, we got from OGR - we can't interpret all possible error messages from OGR anyway, so I'm afraid relaying the verbatim error message from OGR to the user is the best we can do.

My data is just about 640 Ko. But I agree that if this message is from OGR, better focus on other issues instead of tracking each message and adapt it.

#4 Updated by Paolo Cavallini about 4 years ago

Better reporting it upstream and close this, right?

#5 Updated by Even Rouault about 4 years ago

I've added hopefully better error reporting in GDAL in https://trac.osgeo.org/gdal/changeset/34285 , but I'm not sure why the error occured in the first place in that case. Anyway...

#6 Updated by Even Rouault about 4 years ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Closed

Also available in: Atom PDF