LazReport raises AV after Export through standard save button in standard preview form
Original Reporter info from Mantis: zgabrovski
-
Reporter name: Zdravko Gabrovski
Original Reporter info from Mantis: zgabrovski
- Reporter name: Zdravko Gabrovski
Description:
The problem comes from
function TfrReport.ExportTo(FilterClass: TfrExportFilterClass; aFileName: String
): Boolean, line 11255 - fDefExportFilterClass := FCurrentFilter.ClassName;
In that point FCurrentFilter is already freed by function call at line 11252
result := ExportTo(FilterClass, exportStream, true);
The fix attached:
Just move fDefExportFilterClass := FCurrentFilter.ClassName; in other ExportTo procedure in finally section just before FreeAndNil(FCurrentFilter).
Please, check and apply provided patch.
Steps to reproduce:
Add any LazReport and any export filter.
Execute standard "Preview" or "Preview Modal"
then, click the button with diskette icon to export the report.
Choose file name, press "Save".
You will receive "Access violation"
Mantis conversion info:
- Mantis ID: 38258
- OS: All
- OS Build: All
- Build: trunk
- Platform: All
- Version: 2.3 (SVN)
- Fixed in version: 2.1 (SVN)
- Fixed in revision: 64289 (#cc6e0d00)
- Target version: 2.2