View Issue Details

IDProjectCategoryView StatusLast Update
0033309LazarusPackagespublic2018-03-04 13:18
ReporterStephanoAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.9 (SVN)Product Build 
Target VersionFixed in Version1.9 (SVN) 
Summary0033309: FPReport designer: Crash on New/Load report
DescriptionNew and Open report crash the designer. This is due to commit 57435/57436.
Potential patch attached.
TagsNo tags attached.
Fixed in Revision57440
LazTarget-
Widgetset
Attached Files
  • patch1.diff (839 bytes)
    Index: components/fpreport/design/frmfpreportdesignermain.pp
    ===================================================================
    --- components/fpreport/design/frmfpreportdesignermain.pp	(revision 57436)
    +++ components/fpreport/design/frmfpreportdesignermain.pp	(working copy)
    @@ -1347,13 +1347,18 @@
     procedure TFPReportDesignerForm.ResetReport;
     
     begin
    -  if Assigned(FReport) and (FReport.Owner=Self) then
    +  if Assigned(FReport) then
         begin
    -    FreeAndNil(FReport);
    -    FReport := TFPReport.Create(Self);
    +    if (FReport.Owner=Self) then
    +      begin
    +      FreeAndNil(FReport);
    +      FReport := TFPReport.Create(Self);
    +      end
    +    else
    +      FReport.Clear;
         end
       else
    -    FReport.Clear;
    +    FReport := TFPReport.Create(Self);
     end;
     
     procedure TFPReportDesignerForm.LoadDesignFromFile(const AFilename: string);
    
    patch1.diff (839 bytes)

Activities

Stephano

2018-03-03 14:28

developer  

patch1.diff (839 bytes)
Index: components/fpreport/design/frmfpreportdesignermain.pp
===================================================================
--- components/fpreport/design/frmfpreportdesignermain.pp	(revision 57436)
+++ components/fpreport/design/frmfpreportdesignermain.pp	(working copy)
@@ -1347,13 +1347,18 @@
 procedure TFPReportDesignerForm.ResetReport;
 
 begin
-  if Assigned(FReport) and (FReport.Owner=Self) then
+  if Assigned(FReport) then
     begin
-    FreeAndNil(FReport);
-    FReport := TFPReport.Create(Self);
+    if (FReport.Owner=Self) then
+      begin
+      FreeAndNil(FReport);
+      FReport := TFPReport.Create(Self);
+      end
+    else
+      FReport.Clear;
     end
   else
-    FReport.Clear;
+    FReport := TFPReport.Create(Self);
 end;
 
 procedure TFPReportDesignerForm.LoadDesignFromFile(const AFilename: string);
patch1.diff (839 bytes)

Michael Van Canneyt

2018-03-04 13:14

administrator   ~0106852

Checked and applied the patch, thank you very much!

Issue History

Date Modified Username Field Change
2018-03-03 14:28 Stephano New Issue
2018-03-03 14:28 Stephano Status new => assigned
2018-03-03 14:28 Stephano Assigned To => Michael Van Canneyt
2018-03-03 14:28 Stephano File Added: patch1.diff
2018-03-04 13:14 Michael Van Canneyt Fixed in Revision => 57440
2018-03-04 13:14 Michael Van Canneyt Note Added: 0106852
2018-03-04 13:14 Michael Van Canneyt Status assigned => resolved
2018-03-04 13:14 Michael Van Canneyt Fixed in Version => 1.9 (SVN)
2018-03-04 13:14 Michael Van Canneyt Resolution open => fixed
2018-03-04 13:18 Stephano Status resolved => closed