Opened 12 years ago

Closed 12 years ago

#3156 closed defect (fixed)

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: Jeff McKenna, westside, Even 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 (1)

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

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by chaitanya

Attachment: xerces3fix.1.diff added

Patch file.

comment:1 Changed 12 years ago by chaitanya

Severity: normalmajor
Status: newassigned

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?

comment:2 Changed 12 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.

comment:3 Changed 12 years ago by chaitanya

Resolution: fixed
Status: assignedclosed

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?()

comment:4 Changed 12 years ago by Even Rouault

Resolution: fixed
Status: closedreopened

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

comment:5 Changed 12 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.

comment:6 Changed 12 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

comment:7 Changed 12 years ago by Even Rouault

Resolution: fixed
Status: reopenedclosed

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.