[Xastir] Crash when reading shapefile
Jason Godfrey
godfreja at gmail.com
Sat Jun 20 00:47:50 EDT 2009
On Fri, Jun 19, 2009 at 10:20 PM, Tom Russo<russo at bogodyn.org> wrote:
>
> Not a known error. The code is clearly *not* doing some error checking it
> should do (check for null pointer return from SHPReadObject before
> dereferencing it), but neither should SHPReadObject ever fail so long as you're
> accessing a shape number that's lower than the number in the file --- again,
> I suspect that the file is advertising more shapes than it actually contains.
Well, you were right about the last shape returning null:
Reading entity 0... returned 0237cf20
Reading entity 1... returned 0237cf20
Reading entity 2... returned 0237cf20
Reading entity 3... returned 0237cf20
Reading entity 4... returned 0237cf20
ERROR 3: Error in fseek() or fread() reading object from .shp file.
Reading entity 5... returned 00000000
Bus error
However, when I run shpdump on the shapefile, I get entries for entiy 5:
Shape:5 (Arc) nVertices=36, nParts=1
Bounds:( -92.944, 46.011, 0, 0)
to ( -92.879, 46.125, 0, 0)
( -92.879, 46.125, 0, 0) Ring
( -92.892, 46.125, 0, 0)
<and so on>
I'll poke around some more tomorrow.
- Jason
>
> --
> Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
> Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM
> In some cultures what I do would be considered normal.
> -- Ineffective daily affirmation
> _______________________________________________
> Xastir mailing list
> Xastir at lists.xastir.org
> http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
>
--
I have learned to use the word 'impossible' with the greatest caution.
-- Wernher von Braun
More information about the Xastir
mailing list