Opened 16 years ago
Last modified 14 years ago
#468 assigned defect
Fix looping inheritance in gml212 schema.
Reported by: | brentrobinson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 3.6.0 |
Component: | FDO API | Version: | 3.4.0 |
Severity: | 2 | Keywords: | XML GML AbstractFeatureType stack overflow |
Cc: | External ID: |
Description ¶
The following code lead to a stack overflow on the last line:
FdoFeatureSchemaCollection* schema = FdoFeatureSchemaCollection::Create(NULL); FdoPtr<FdoXmlFlags> flags = FdoXmlFlags::Create( L"fdo.osgeo.org/schemas/feature", FdoXmlFlags::ErrorLevel_VeryLow); FdoXmlReaderP gmlReader = FdoGml212Schema::CreateReader(); schema->ReadXml(gmlReader, flags); schema->WriteXml(L"e:/transient/testschema.xml", FdoXmlFlagsP(FdoXmlFlags::Create(L"www.autodesk.com"))); FdoFeatureSchemaCollection* schema2 = FdoFeatureSchemaCollection::Create(NULL); schema2->ReadXml(L"e:/transient/testschema.xml", FdoXmlFlagsP(FdoXmlFlags::Create(L"www.autodesk.com", FdoXmlFlags::ErrorLevel_Normal)));
The Gml212 schema describes the GML 2.1.2 base types (of which one of the types is AbstractFeatureType). When FDO writes schemas, it writes feature classes as being based on AbstractFeatureType. However, this means AbstractFeatureType ends up based on itself.
The fix is to not extend AbstractFeatureType from itself when writing it to XML.
Change History (2)
comment:1 by , 16 years ago
Status: | new → assigned |
---|
comment:2 by , 14 years ago
Milestone: | → 3.6.0 |
---|
Note:
See TracTickets
for help on using tickets.