[Xastir] Crash when reading shapefile

Jason Godfrey godfreja at gmail.com
Fri Jun 19 23:30:55 EDT 2009


On Fri, Jun 19, 2009 at 10:20 PM, Tom Russo<russo at bogodyn.org> wrote:

> so we get the number of shapes out of the shapefile and then loop over that,
> expecting that they're all there.  It is possible that your KML-to-shapefile
> converter is setting the number of shapes in the shapefile wrong, and causing
> us to attempt to read past the end of the file.
>
> Try instrumenting the code with a printf to print how many shapes the
> shapefile *says* it has, and see what "i" is before the crash.  Betcha there's
> an off-by-one error in the converted shapefile.

Wouldn't suprise me. A little bit ago I tried running the shapefile
through ogr2ogr, and it failed with a similar error. I'll try
instrumenting the code.

If I could get GDAL to compile with expat support I could try
converting the kml file with ogr2ogr, but I hit an error compiling
when I have expat support turned on. :-( Oh well, I guess that is a
complaint for another list.

Thanks
- Jason

-- 
I have learned to use the word 'impossible' with the greatest caution.
 -- Wernher von Braun



More information about the Xastir mailing list