[Gdal-dev] OGR/Shapefile crash

Curt Mills, WE7U hacker at tc.fluke.com
Wed Dec 10 12:07:04 EST 2003


On Mon, 8 Dec 2003 gdal-dev-admin at remotesensing.org wrote:

> > Question #2, OGR:
> > -----------------
> >
> >>As I try to get OGR integrated into Xastir, I'm getting segfaults
> >>any time I try to open a Shapefile dataset that includes a .prj
> >>file.  Is it something I'm doing, or perhaps the PROJ.4 installation
> >>on my system?
> >
> >
> >>Note:  Using Xastir with Shapelib, I can open these files.  Using
> >>OGR, I can open them.  Once I add the .prj file into the mix,
> >>Xastir/OGR segfaults, Xastir/Shapelib can read them just fine.
>  >
> >>Datum translations using libgeotiff are working fine in Xastir.
> >>Datum translations using OGR appear to be working for TIGER/Line
> >>files.  We're just having this segfault problem with Shapefile .prj
> >>files (so far).  Segfaults are bad for us.  Ours is a long-running
> >>program, and we'd like a way around segfaults in all cases.
> >
> >
> > Never mind on this one!  On one system with older? GDAL/OGR, it
> > segfaulted.  On another system, with CVS GDAL/OGR, it opened it just
> > fine with both methods, with a .prj file present.  I'll update the
> > other system and things will hopefully be fine there.

That system is using CVS GDAL, proj-4.4.7, and
proj-nad27-1.1.tar.gz.  It still segfaults on this statement if a
".prj" file is present with a Shapefile:


  datasource = OGROpen(full_filename, 0 /* bUpdate */, &driver);


It doesn't segfault if the .prj file is absent, but of course then
it can't get any spatial info from the file.

The system which segfaults has had various versions of proj and
libgeotiff installed at various times.  It has an older libtiff,
therefore is running libgeotiff 1.1.4 or 1.1.5 to match.
Libgeotiff's datum translation functions work fine inside Xastir on
that system, so the libgeotiff/libproj/libtiff stuff is working.

Another system doesn't segfault, but has a newer tiff/libgeotiff
installed.

It sounds like there might be a header/library file mismatch only
where OGR is concerned, which the libtiff/libproj/libgeotiff chain
is somehow avoiding.  Perhaps header files inside OGR that don't
match libraries that are installed on the system?

Another subject:  Is there a test suite of simple map files for the
various types and subtypes of maps accepted by OGR/GDAL?

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Gdal-dev mailing list