[mapguide-trac] #510: Potential stylization crash with composite
styles + expressions
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Mar 20 16:10:54 EDT 2008
#510: Potential stylization crash with composite styles + expressions
------------------------------+---------------------------------------------
Reporter: waltweltonlair | Owner: waltweltonlair
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: General | Version: 2.0.0
Severity: critical | Keywords:
External_id: 1022456 |
------------------------------+---------------------------------------------
An interaction between the expression engine and the feature reader can
lead to a stylization crash. Here’s the scenario:
* Stylization creates an RS_FeatureReader, and this guy maintains a
reference to an FdoIFeatureReader.
* Stylization creates an expression engine, passing it the
FdoIFeatureReader. The expression engine only maintains a weak reference
to this reader (non-addref'ed).
* With composite styles stylization will reset the RS_FeatureReader. The
reset call releases the FdoIFeatureReader and creates a new one. Since
the expression engine does not addref the FdoIFeatureReader, the ref count
of the original FdoIFeatureReader drops to zero and it’s destroyed.
* After the RS_FeatureReader has been reset stylization starts processing
the next style in the composite. A crash can then occur as soon as we
attempt to evaluate an expression. That’s because the expression engine
is still pointing to the original FdoIFeatureReader that was destroyed in
step 3.
To fix this we simply need to create a new expression engine for each
style in a composite. This also applies to rendering passes with the new
stylization.
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/510>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list