View Issue Details

IDProjectCategoryView StatusLast Update
0026281LazarusLazReportpublic2014-06-06 08:26
ReporterMichel TournayAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformi386OSWindowsOS Version7Pro 64b
Product Version1.2.0Product Build 
Target Version1.2.4Fixed in Version1.3 (SVN) 
Summary0026281: sigsegv when trying to access an undefined variable
DescriptionSometimes, because I copy/paste object between reports and don't add variables manually to new report, I get a sigsegv during ShowVarValue().

Attached patch modify this.

regards
TagsNo tags attached.
Fixed in Revision45370
LazTarget1.2.4
Widgetset
Attached Files
  • lr_ev_ed.pas.patch (587 bytes)
    Index: lr_ev_ed.pas
    ===================================================================
    --- lr_ev_ed.pas	(r�vision 45356)
    +++ lr_ev_ed.pas	(copie de travail)
    @@ -286,9 +286,14 @@
     end;
     
     procedure TfrEvForm.ShowVarValue(Value: String);
    +var
    +    frValue: TfrValue;
     begin
       if Value='' then Exit;
    -  with Doc.Values.FindVariable(Value) do
    +  frValue := Doc.Values.FindVariable(Value);
    +  if frValue=nil then
    +    raise EParserError.Create('Undefined symbol: ' + Value);
    +  with frValue do
         case Typ of
           vtNotAssigned:
             SetValTo(CurDataSet + '.' + sNotAssigned);
    
    lr_ev_ed.pas.patch (587 bytes)

Activities

Michel Tournay

2014-06-05 14:30

reporter  

lr_ev_ed.pas.patch (587 bytes)
Index: lr_ev_ed.pas
===================================================================
--- lr_ev_ed.pas	(r�vision 45356)
+++ lr_ev_ed.pas	(copie de travail)
@@ -286,9 +286,14 @@
 end;
 
 procedure TfrEvForm.ShowVarValue(Value: String);
+var
+    frValue: TfrValue;
 begin
   if Value='' then Exit;
-  with Doc.Values.FindVariable(Value) do
+  frValue := Doc.Values.FindVariable(Value);
+  if frValue=nil then
+    raise EParserError.Create('Undefined symbol: ' + Value);
+  with frValue do
     case Typ of
       vtNotAssigned:
         SetValTo(CurDataSet + '.' + sNotAssigned);
lr_ev_ed.pas.patch (587 bytes)

Jesus Reyes

2014-06-06 08:26

developer   ~0075497

Applied, thanks.

Issue History

Date Modified Username Field Change
2014-06-05 14:30 Michel Tournay New Issue
2014-06-05 14:30 Michel Tournay File Added: lr_ev_ed.pas.patch
2014-06-05 18:43 Jesus Reyes Assigned To => Jesus Reyes
2014-06-05 18:43 Jesus Reyes Status new => assigned
2014-06-06 08:26 Jesus Reyes Fixed in Revision => 45370
2014-06-06 08:26 Jesus Reyes LazTarget => 1.2.4
2014-06-06 08:26 Jesus Reyes Note Added: 0075497
2014-06-06 08:26 Jesus Reyes Status assigned => resolved
2014-06-06 08:26 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-06-06 08:26 Jesus Reyes Resolution open => fixed
2014-06-06 08:26 Jesus Reyes Target Version => 1.2.4