Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: IdMappedPortTCP Error. Help with Debug Code please

www.cryer.info
Managed Newsgroup Archive

Re: IdMappedPortTCP Error. Help with Debug Code please

Subject:Re: IdMappedPortTCP Error. Help with Debug Code please
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Wed, 26 Apr 2006 15:24:50

"Danny Kellett" <dkellett@gotadsl.co.uk> wrote in message
news:444fe592@newsgroups.borland.com...

> On Outbound connect. Access violation at address 00471D1B in module
> 'Project1.exe'. Read of address 00000004

You are getting an AV because you are accessing the AException parameter
without first checking if it is nil or not.  On a successful connect,
AException will be nil.

> procedure TForm1.Log(S: String);
> begin
>   Memo1.Lines.Add(S);
> end;

That code is not thread-safe.  You must use TThread.Synchronize, either
directly or via TIdSync, in order to access the GUI safely from any event
handler that provides access to a TIdContext parameter.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive