[fdo-trac] #636: ExpressionEngine: segv when no filterCapabilities
passed to ValidateFilter.
FDO
trac_fdo at osgeo.org
Thu Apr 1 13:59:20 EDT 2010
#636: ExpressionEngine: segv when no filterCapabilities passed to ValidateFilter.
-----------------------------+----------------------------------------------
Reporter: brentrobinson | Owner: brentrobinson
Type: defect | Status: new
Priority: major | Milestone: 3.6.0
Component: Utilities API | Version: 3.5.0
Severity: 1 | Keywords: Expression Engine filter capabilities segv
External_id: |
-----------------------------+----------------------------------------------
The following:
{{{
clock_t start = clock();
FdoPtr<FdoIConnection> conn;
// ... open a connection to any provider and datastore
FdoPtr<FdoISelect> select =
(FdoISelect*)conn->CreateCommand(FdoCommandType_Select);
FdoPtr<FdoFgfGeometryFactory> gf =
FdoFgfGeometryFactory::GetInstance();
double ordsXYExt[10];
double llx = 465000;
double lly = 172000;
double urx = 467000;
double ury = 175000;
ordsXYExt[0] = llx; ordsXYExt[1] = lly;
ordsXYExt[2] = llx; ordsXYExt[3] = ury;
ordsXYExt[4] = urx; ordsXYExt[5] = ury;
ordsXYExt[6] = urx; ordsXYExt[7] = lly;
ordsXYExt[8] = llx; ordsXYExt[9] = lly;
FdoPtr<FdoILinearRing> extRing =
gf->CreateLinearRing(FdoDimensionality_XY, 10, ordsXYExt);
FdoPtr<FdoIPolygon> poly = gf->CreatePolygon(extRing, NULL );
FdoPtr<FdoGeometryValue> geomValue =
FdoGeometryValue::Create(FdoPtr<FdoByteArray>(gf->GetFgf(poly)));
FdoPtr<FdoSpatialCondition> spatialFilter =
FdoPtr<FdoSpatialCondition>(FdoSpatialCondition::Create(L"the_geom",
FdoSpatialOperations_EnvelopeIntersects,
geomValue));
FdoPtr<FdoIFeatureReader> rdr = select->Execute();
FdoPtr<FdoExpressionEngine> engine =
FdoExpressionEngine::Create(rdr, rdr->GetClassDefinition(), NULL);
engine->ValidateFilter(rdr->GetClassDefinition(), spatialFilter);
}}}
leads to a segmentation violation.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/636>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list