Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AV on FinalizeDataOperations - Delphi5
Delphi 5
Indy 10 5473

I call List in ftp component and it returns the appropriate data.
when the FinalizeDataOperation; is called I get an AV read of address 0xea5278ed.
I Put a breakpoint at the begin of GetResponse and looked at
the call stack (shown below);

What could possible be causing the AEncoding to be anything other
than Nil?  

Couple of other things of note.
When I place mouse over AAAllowedResponses   it only shows  (226) not ([226, 225, 250]);
There are 9 calls to GetResponse before this final call that all show Nil in AEncoding

procedure TIdFTP.FinalizeDataOperation;
  end else begin
    // returns 250
    GetResponse([226, 225, 250]);  // call that generates AV

function TIdTCPConnection.GetResponse(const AAllowedResponses: array of Int16;
 AEncoding: IIdTextEncoding = nil): Int16;
begin  // break point inserted here
  Result := CheckResponse(LastCmdResult.NumericCode, AAllowedResponses);

Call Stack
TIdTCPConnection.GetResponse((...),Pointer($55E4E3) as IIdTextEncoding)
(10-31-2018, 01:44 PM)GrahamRola Wrote: Delphi 5
Indy 10 5473

There are known issues with Delphi 5's compiler outputting bad codegen that corrupts the call stack in various areas of Indy, including in TIdFTP (the compiler was fixed in Delphi 6). Contact me privately, I have a workaround available for Delphi 5 that is not checked in to the public source control repositories.


Forum Jump:

Users browsing this thread: 1 Guest(s)