Menu

#74 DBGrid refresh after column moves access violation

Unknown
closed
None
2017-02-26
2014-05-23
bakter
No

Put a TZConnection, a TZQuery, a TDataSource and a TDBGrid to a form (set as usually).

Make a OnCreate event on the form like this:

procedure TForm1.FormCreate(Sender: TObject);
begin
ZQuery1.SQL.Text := 'SELECT 1 AS a, '''' AS b';
ZQuery1.Open;
DBGrid1.Columns[1].Index := 0;
ZQuery1.Refresh;
end;

The result is an access violation in ZDbcCache.pas at TZRowAcessor.SetString (line 2300 in 7.1.2-stable)

(but it surprisingly works with 'SELECT 0 AS a, '''' AS b' query)

I use delphi7 with postgresql.
I tried with Zeos 7.1.2-stable and 7.2.3a-stable.

Discussion

  • bakter

    bakter - 2014-05-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,7 @@
       ZQuery1.Refresh;
     end;
    
    -The result is an access violation in ZDbcCache.pas at TZRowAcessor.SetString (line 2301 in 7.1.2-stable)
    +The result is an access violation in ZDbcCache.pas at TZRowAcessor.SetString (line 2300 in 7.1.2-stable)
    
     (but it surprisingly works with 'SELECT 0 AS a, '''' AS b' query)
    
     
  • bakter

    bakter - 2014-05-23

    AV refinement:
    TZRowAccessor.InternalSetString line 493 at ReallocMem

     
  • EgonHugeist

    EgonHugeist - 2014-06-09

    Could you attach a little bugtemplate app, please?

    Cheers, Michael

     
  • EgonHugeist

    EgonHugeist - 2014-06-12
    • status: open --> accepted
    • assigned_to: EgonHugeist
     
  • EgonHugeist

    EgonHugeist - 2014-06-12

    Reproducable, indeed. Not compiler or Zeos-Version related. Same behavior on all known versions.
    There happens something with the fieldref-index.

    Bug accepted. Going to debug me in next days ):

    Cheers, Michael

     
  • marsupilami79

    marsupilami79 - 2017-02-26

    This bug should be fixed in the current branch of Zeos 7.2 now.

     
  • marsupilami79

    marsupilami79 - 2017-02-26
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB