Ticket #3156 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

GML reading problems with Xerces 3.x

Reported by: warmerdam Owned by: chaitanya
Priority: high Milestone: 1.6.3
Component: OGR_SF Version: unspecified
Severity: major Keywords: gml xerces3
Cc: jmckenna, westside, rouault, hobu

Description

There have been reports that GDAL/OGR built against Xerces 3.x has problems reading some GML files. Even applied r15773 in an effort to resolve the issue, but it may not be completely fixed.

See  http://www.mail-archive.com/gdal-dev@lists.osgeo.org/msg03937.html

Also reported by Jeff McKenna? with regard to the file  http://home.gdal.org/tmp/wfs_gateway.gml

Please treat this as particularly high priority.

Attachments

xerces3fix.1.diff Download (6.6 KB) - added by chaitanya 2 years ago.
Patch file.

Change History

Changed 2 years ago by chaitanya

Patch file.

Changed 2 years ago by chaitanya

  • status changed from new to assigned
  • severity changed from normal to major

Just attached a patch file that should fix the xerces3 problem in gml and ili2 drivers.

In case xerces library is compiled as a shared library including both the versions of the characters() method instead of checking XERCES_VERSION_MAJOR (as in r15773) may be better.

Could someone comment on this?

Changed 2 years ago by chaitanya

Also, I couldn't check the ili driver. I didn't find the ili2c.jar and don't have any sample data.

Changed 2 years ago by chaitanya

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in trunk (r17904) and 1.6 branch (r17905).

During testing I found and fixed a bug in the trunk that was causing a segfault by accessing an uninitialised ILI1Reader::metaLayer in ILI1Reader::HasMultiplePointGeom?()

Changed 2 years ago by rouault

  • status changed from closed to reopened
  • resolution fixed deleted

Chaitanya,

the patch broke compilation with xerces 2.x on 32 bit platforms. See  http://buildbot.osgeo.org:8500/builders/telascience-quick/builds/74/steps/make/logs/stdio. I'm afraid you'll have to use #ifdef XERCES_VERSION_MAJOR

Changed 2 years ago by chaitanya

Fixed the compile error in trunk in r17910. I fix the 1.6 branch in a few hours.

I notice that my compilation didn't use -DDEBUG flag. It could be the reason the compilation passed in my system.

Changed 2 years ago by chaitanya

Fixed the compile error on the buildbot in branch 1.6 created by r17905 in 17913.

However, I could not recreate the error from the buildbot on my 64bit ubuntu with either xerces2.8.0 or xerces3.0.1

Changed 2 years ago by rouault

  • status changed from reopened to closed
  • resolution set to fixed

However, I could not recreate the error from the buildbot on my 64bit ubuntu with either xerces2.8.0 or xerces3.0.1

I think this is due to the fact the XMLSize_t expands to size_t, which is unsigned int on 32 bit architectures, so you had two methods with the same signature. Hence the build error.

Note: See TracTickets for help on using tickets.