[Gdal-dev] GetNextFeature error handling
Frank Warmerdam
warmerdam at pobox.com
Sun Sep 18 19:51:19 EDT 2005
On 9/18/05, Tim Sutton <tim at linfiniti.com> wrote:
> Hi
>
> Im trying to file away an outstanding bug in QGIS:
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1211058&group_id=55820&atid=478378
>
> If you look at the stack trace that the original poster kindly provided, you
> will notice that the problem occurs in OGRShapeLayer::GetNextFeature (). Of
> course the real cause of the problem is that the user has an invalid
> shapefile (there is inconsistency with the number of points compared to the
> number of dbf recs).
>
> My question is, is there any way to gracefully trap this error?
>
> I tested on gdal 1.2.6 btw
Tim,
I tried the bad shapefile from the bug report with the current ogrinfo and
it just emits an error message but doesn't crash. I did apply a patch to
OGR when this problem was discussed a week or two ago (on IRC?), so
that may be why I don't get a crash.
By the way, it looks like the dbf has no fields.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list