View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038258 | Lazarus | LCL | public | 2020-12-25 20:53 | 2020-12-28 19:54 |
Reporter | Zdravko Gabrovski | Assigned To | Jesus Reyes | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | All | OS | All | ||
Fixed in Version | 2.1 (SVN) | ||||
Summary | 0038258: LazReport raises AV after Export through standard save button in standard preview form | ||||
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" | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 64289 | ||||
LazTarget | 2.2 | ||||
Widgetset | |||||
Attached Files |
|
|
lr_class.diff (670 bytes)
Index: components/lazreport/source/lr_class.pas =================================================================== --- components/lazreport/source/lr_class.pas (revision 64121) +++ components/lazreport/source/lr_class.pas (working copy) @@ -11252,7 +11252,6 @@ result := ExportTo(FilterClass, exportStream, true); if result then begin - fDefExportFilterClass := FCurrentFilter.ClassName; fDefExportFileName := aFileName; end; @@ -11330,6 +11329,10 @@ FCurrentFilter.AfterExport; finally + if result then + begin + fDefExportFilterClass := FCurrentFilter.ClassName; + end; FreeAndNil(FCurrentFilter); end; |
|
Sorry forgot to mention the problem is in LR_Class.pas unit, Lazreport package. |
|
This was a regression Thanks for your fix Applied. |
|
Thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-25 20:53 | Zdravko Gabrovski | New Issue | |
2020-12-25 20:53 | Zdravko Gabrovski | File Added: lr_class.diff | |
2020-12-25 20:54 | Zdravko Gabrovski | Note Added: 0127800 | |
2020-12-25 21:01 | Jonas Maebe | Project | FPC => Lazarus |
2020-12-26 08:03 | Jesus Reyes | Assigned To | => Jesus Reyes |
2020-12-26 08:03 | Jesus Reyes | Status | new => assigned |
2020-12-28 16:46 | Jesus Reyes | Status | assigned => resolved |
2020-12-28 16:46 | Jesus Reyes | Resolution | open => fixed |
2020-12-28 16:46 | Jesus Reyes | Fixed in Version | => 2.1 (SVN) |
2020-12-28 16:46 | Jesus Reyes | Fixed in Revision | => 64289 |
2020-12-28 16:46 | Jesus Reyes | LazTarget | => 2.2 |
2020-12-28 16:46 | Jesus Reyes | Note Added: 0127866 | |
2020-12-28 19:54 | Zdravko Gabrovski | Note Added: 0127871 |