Found a bug on TIBCAlerter

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Execute
Posts: 6
Joined: Tue 22 Jul 2014 22:56

Found a bug on TIBCAlerter

Post by Execute » Tue 22 Jul 2014 23:04

Hello,

with this simple project I can raise an exception on a Move() operation
:0040696C System::Move(Source=????, Dest=????, Count=????)
:00744b8e EventCallback + $22
:6d47190a ; C:\Windows\SysWOW64\gds32.dll

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  create: Boolean;
begin
  IBCConnection1.Database := 'TEST.GDB';
  IBCConnection1.ClientLibrary := 'gds32.dll';
  IBCConnection1.Username := 'SYSDBA';
  IBCConnection1.Password := 'masterkey';
  create := not FileExists(IBCConnection1.Database);
  if create then
  begin
    IBCConnection1.Params.Add('USER ''SYSDBA''');
    IBCConnection1.Params.Add('PASSWORD ''masterkey''');
    IBCConnection1.Params.Add('PAGE_SIZE 4096');
    IBCConnection1.Params.Add('DEFAULT CHARACTER SET WIN1251');
    IBCConnection1.CreateDatabase;
  end;
  IBCConnection1.Open;
  if create then
  begin
    IBCQuery1.SQL.Text := 'CREATE TABLE test (id INT)';
    IBCQuery1.ExecSQL;
    IBCQuery1.SQL.Text := 'CREATE TRIGGER onTest FOR test ACTIVE AFTER INSERT POSITION 0 AS BEGIN POST_EVENT ''HELLO''; END';
    IBCQuery1.ExecSQL;
  end;
  IBCAlerter1.Events.Add('HELLO');
  IBCAlerter1.Start;
  IBCQuery1.SQL.Text := 'INSERT INTO test (id) VALUES(1)';
end;

procedure TForm1.IBCAlerter1Event(Sender: TObject; EventName: string;
  EventCount: Integer);
begin
  Memo1.Lines.Add(EventName);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  IBCQuery1.ExecSQL;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  Index: Integer;
begin
  for Index := 0 to 10 do
  begin
    IBCQuery1.ExecSQL;
    IBCAlerter1.Stop;
    IBCQuery1.ExecSQL;
    IBCAlerter1.Start;
  end;
end;
I just loop on Start/Stop on the Alerter while a query fire the event.

tested with last release of Delphi XE6 and last release of IBDAC for XE6 (2014-07-23) under Windows 8 64bits with a VCL/Win32 application.

Regards from France
Paul TOTH
Execute SARL

ZEuS
Devart Team
Posts: 240
Joined: Thu 05 Apr 2012 07:32

Re: Found a bug on TIBCAlerter

Post by ZEuS » Wed 23 Jul 2014 06:24

Thank you for the information. We have reproduced the error and fixed it. The fix will be included in the next IBDAC build.

Post Reply