Opened 11 years ago

Closed 11 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


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 Changed 11 years ago by waltweltonlair

Status: newassigned

comment:2 Changed 11 years ago by waltweltonlair

Fixed in trunk with submission

comment:3 Changed 11 years ago by waltweltonlair

External ID: 10224561022456.01

comment:4 Changed 11 years ago by waltweltonlair

Resolution: fixed
Status: assignedclosed

Merged fix into branch stream with submission

Note: See TracTickets for help on using tickets.