Recent

Author Topic: zeoslib av on transaction destruction  (Read 794 times)

jksmithiii

  • New Member
  • *
  • Posts: 11
zeoslib av on transaction destruction
« on: February 05, 2025, 04:32:23 am »
I've read somewhere this bug was fixed in in ver 8 patch. I've applied patch and still get it. Anybody seen this?

procedure TZAbstractTransaction.BeforeDestruction;
var I: Integer;
  Comp: TComponent;
begin
  for i := FLinkedComponents.Count -1 downto 0 do begin
    Comp := TComponent(FLinkedComponents);
  av  --> if Comp.InheritsFrom(TZAbstractRWTxnSeqDataSet) then
      if TZProtectedAbstractRWTxnSeqDataSet(Comp).UpdateTransaction = Self then
        TZProtectedAbstractRWTxnSeqDataSet(Comp).UpdateTransaction := nil;
    if Comp.InheritsFrom(TZAbstractRODataset) then
      if TZProtectedAbstractRODataset(Comp).Transaction = Self then
        TZProtectedAbstractRODataset(Comp).Transaction := nil;
    if Comp.InheritsFrom(TZSQLProcessor) then
      {if TZSQLProcessor(Comp).Transaction = Self then
        TZSQLProcessor(Comp).Transaction := nil;}
  end;
  FreeAndNil(FParams);
  FreeAndNil(FLinkedComponents);
  ReleaseInternalTransaction;
  if Connection <> nil then
    SetConnection(nil);
  inherited BeforeDestruction;
end;
 

jksmithiii

  • New Member
  • *
  • Posts: 11
Re: zeoslib av on transaction destruction
« Reply #1 on: February 09, 2025, 07:07:16 pm »
I need to do some memchecks on this, but prior to destruction, better to manually make sure references to linked components are set to nil before allowing the stock zeos code do it.

rnervi

  • New Member
  • *
  • Posts: 32
Re: zeoslib av on transaction destruction
« Reply #2 on: October 04, 2025, 02:43:20 pm »
hu in effect I'am experiencing same trouble. when closing sounds like the
Comp is not assingned but Ive tried with
Code: Pascal  [Select][+][-]
  1. if Assigned(comp)
but no luck
I'm investigating on it

rnervi

  • New Member
  • *
  • Posts: 32
Re: zeoslib av on transaction destruction
« Reply #3 on: October 04, 2025, 02:48:43 pm »
solved (I hope !) with

Code: Pascal  [Select][+][-]
  1. if (comp.Name <>  '') then
  2.     begin
  3.  
  4.     IF COMP.InheritsFrom(TZAbstractRWTxnSeqDataSet) THEN  

 

TinyPortal © 2005-2018