Opened 16 years ago

Closed 16 years ago

#510 closed defect (fixed)

Potential stylization crash with composite styles + expressions

Reported by: waltweltonlair Owned by: waltweltonlair
Priority: high Milestone: 2.1
Component: General Version: 2.0.0
Severity: critical Keywords:
Cc: External ID: 1022456.01

Description

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.

Change History (4)

comment:1 by waltweltonlair, 16 years ago

Status: newassigned

comment:2 by waltweltonlair, 16 years ago

Fixed in trunk with submission https://trac.osgeo.org/mapguide/changeset/3103.

comment:3 by waltweltonlair, 16 years ago

External ID: 10224561022456.01

comment:4 by waltweltonlair, 16 years ago

Resolution: fixed
Status: assignedclosed

Merged fix into branch stream with submission https://trac.osgeo.org/mapguide/changeset/3131.

Note: See TracTickets for help on using tickets.