Board index » delphi » Indy8.011b Ping demo generates a stack overflow

Indy8.011b Ping demo generates a stack overflow

Hi everyone!
The ping demo that comes with Indy 8.011b when run from the command prompt
generates  a stack overflow.

Besides that I had to to change the Reply method from:
procedure Reply(AReplyStatus: TReplyStatus);

to:
procedure Reply(ASender: TComponent; AReplyStatus: TReplyStatus);

I had to do the same change in the PingGui demo, otherwise the two won't
compile.

There seems to be a problem with the PingGUi demo, when I run it it just
freezes and
brings down the whole IDE.

Thanks!
Peter

 

Re:Indy8.011b Ping demo generates a stack overflow


Sorry for posting this, didn't see that someone before me had posted the
same thing!
Quote
"Peter Angelov" <peterange...@hotmail.com> wrote in message

news:3a4a7964_2@dnews...
Quote
> Hi everyone!
> The ping demo that comes with Indy 8.011b when run from the command prompt
> generates  a stack overflow.

> Besides that I had to to change the Reply method from:
> procedure Reply(AReplyStatus: TReplyStatus);

> to:
> procedure Reply(ASender: TComponent; AReplyStatus: TReplyStatus);

> I had to do the same change in the PingGui demo, otherwise the two won't
> compile.

> There seems to be a problem with the PingGUi demo, when I run it it just
> freezes and
> brings down the whole IDE.

> Thanks!
> Peter

Re:Indy8.011b Ping demo generates a stack overflow


Try changing GetBinding in IdRawBase.pas to:

function TIdRawBase.GetBinding: TIdSocketHandle;
begin
  if not FBinding.HandleAllocated then begin
    FBinding.AllocateSocket(Id_SOCK_RAW, FProtocol);
  end;
  FBinding.SetSockOpt(Id_IPPROTO_IP, Id_IP_TTL, PChar(@FTTL), SizeOf(FTTL));
  Result := FBinding;
end;

That should fix it. If not let me know here on the NG.

--
Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
      "Programming is an art form that fights back"
Forget the Y2K problem, Lets fix the W2K problem.
http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Re:Indy8.011b Ping demo generates a stack overflow


Hi!

I just reported this as a bug on the Indy home page. I saw this thread about
half an hour later. If anyone at the Indy-team reads this please ignore the
bug-report.

Sorry to waste your time :-)

Regards,

Morten Ludvigsen
2-People Software

"Kudzu - Team Indy" <chad...@pbe.com> wrote in message
news:90188D133chadngpbecom@207.105.83.62...

Quote
> Try changing GetBinding in IdRawBase.pas to:

> function TIdRawBase.GetBinding: TIdSocketHandle;
> begin
>   if not FBinding.HandleAllocated then begin
>     FBinding.AllocateSocket(Id_SOCK_RAW, FProtocol);
>   end;
>   FBinding.SetSockOpt(Id_IPPROTO_IP, Id_IP_TTL, PChar(@FTTL),
SizeOf(FTTL));
>   Result := FBinding;
> end;

> That should fix it. If not let me know here on the NG.

> --
> Chad Z. Hower (Kudzu) - Church Hill, TN - Team Indy
>       "Programming is an art form that fights back"
> Forget the Y2K problem, Lets fix the W2K problem.
> http://www.pbe.com/Kudzu/ - Free Delphi/CBuilder components and articles

Other Threads