Delphi 5 Indy 10.0.52 connect error not socket

Please can someone explain what error is happening here or how to get an 
error code
            try
                SMTP.Connect;
            except
                on e:EidSocketError do
                    begin
{whole lots of error trapping here
                            MessageDlg('Socket error on connection.  Error 
code'+inttostr(LastSocketError), mtError, [mbOk], 0);
                    end;
                on e:Exception do
                    begin
                             uLogFile.putLog('SendMail - Connect error not 
socket Error : '+e.message);
the error is trapped here but it is not a socket error and seems to be from 
an access violation  in the connect-
the log looks like this
[17/03/2010 @ 01:46:06 PM]: SendMail: begin....
[17/03/2010 @ 01:46:06 PM]: TLSStatus : Resolving hostname 
smtp.thehealthteam.co.za..
[17/03/2010 @ 01:46:06 PM]: TLSStatus : Connecting to 196.28.80.20..
[17/03/2010 @ 01:46:06 PM]: SendMail - Connect error not socket Error : 
Access violation at address 00000000. Read of address 00000000.




-- 
Jenny Foster
Made to Measure Computer Systems
www.madetomeasure.co.za
Tel 044 850 1123
0
Jenny
3/17/2010 1:57:31 PM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

6 Replies
1143 Views

Similar Articles

[PageSpeed] 29

further info is that this error happens sometimes when the smtp is already 
connected and it is now trying the connect again

-- 
Jenny Foster
Made to Measure Computer Systems
www.madetomeasure.co.za
Tel 044 850 1123

"Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
news:224785@forums.codegear.com...
> Please can someone explain what error is happening here or how to get an
> error code
>            try
>                SMTP.Connect;
>            except
>                on e:EidSocketError do
>                    begin
> {whole lots of error trapping here
>                            MessageDlg('Socket error on connection.  Error
> code'+inttostr(LastSocketError), mtError, [mbOk], 0);
>                    end;
>                on e:Exception do
>                    begin
>                             uLogFile.putLog('SendMail - Connect error not
> socket Error : '+e.message);
> the error is trapped here but it is not a socket error and seems to be 
> from
> an access violation  in the connect-
> the log looks like this
> [17/03/2010 @ 01:46:06 PM]: SendMail: begin....
> [17/03/2010 @ 01:46:06 PM]: TLSStatus : Resolving hostname
> smtp.thehealthteam.co.za..
> [17/03/2010 @ 01:46:06 PM]: TLSStatus : Connecting to 196.28.80.20..
> [17/03/2010 @ 01:46:06 PM]: SendMail - Connect error not socket Error :
> Access violation at address 00000000. Read of address 00000000.
>
>
>
>
> -- 
> Jenny Foster
> Made to Measure Computer Systems
> www.madetomeasure.co.za
> Tel 044 850 1123
0
Jenny
3/17/2010 2:34:38 PM
further info is that this error happens sometimes when the smtp is already 
connected and it is now trying the connect again

-- 
Jenny Foster
Made to Measure Computer Systems
www.madetomeasure.co.za
Tel 044 850 1123

"Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
news:224785@forums.codegear.com...
> Please can someone explain what error is happening here or how to get an
> error code
>            try
>                SMTP.Connect;
>            except
>                on e:EidSocketError do
>                    begin
> {whole lots of error trapping here
>                            MessageDlg('Socket error on connection.  Error
> code'+inttostr(LastSocketError), mtError, [mbOk], 0);
>                    end;
>                on e:Exception do
>                    begin
>                             uLogFile.putLog('SendMail - Connect error not
> socket Error : '+e.message);
> the error is trapped here but it is not a socket error and seems to be 
> from
> an access violation  in the connect-
> the log looks like this
> [17/03/2010 @ 01:46:06 PM]: SendMail: begin....
> [17/03/2010 @ 01:46:06 PM]: TLSStatus : Resolving hostname
> smtp.thehealthteam.co.za..
> [17/03/2010 @ 01:46:06 PM]: TLSStatus : Connecting to 196.28.80.20..
> [17/03/2010 @ 01:46:06 PM]: SendMail - Connect error not socket Error :
> Access violation at address 00000000. Read of address 00000000.
>
>
>
>
> -- 
> Jenny Foster
> Made to Measure Computer Systems
> www.madetomeasure.co.za
> Tel 044 850 1123
0
Jenny
3/17/2010 2:37:00 PM
"Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
news:224785@forums.codegear.com...

> Please can someone explain what error is happening here

A nil pointer is being accessed.  Is your SMTP object actually instantiated?

-- 
Remy Lebeau (TeamB)
0
Remy
3/18/2010 4:55:00 PM
Thank you Remy
Yes it must be instantiated because the component is on the form - i have a 
unit uEmailEngine.pas and the smtp component is on uEmailEngine.dfm.

the form is not autocreated so when i want to use it i create it
            frmEmailEngine := TfrmEmailEngine.Create(self);
then i populate the properties of the smtp component
then i do the send
        if not (smtp.connected)   // which it is not
              smtp.connect  // this is where it goes down with the access 
violation  but only on the second time the engine is created - first time is 
fine
       smtp.sendmessage etc

then i free the form
         TfrmEmailEngine.free and it does a smtp.disconnect on the close

on approx 1000 users this has happened with about 5 of them - the current 
problem user is running windows xp with no antivirus other than a windows 
firewall to which i have added my app as an exception.
i cannot recreate the problem from any of my own pc's - even using their 
fromEmailadr and their host smtp server (the server does not need 
authentication), the send works every time.

Also................
Should I get an indy upgrade? i am very confused by the site which says that 
10.0.52 is a 'rather old version and is no longer recommended.' But then 
says that v 10 is unstable and 9 is the stable version.  Is there a TI sheet 
or something with idiot-proof steps on how to get, compile, build and 
install the package?  I am scared of messing up the installation i have 
which is why i keep delaying.

Have a good weekend
Jenny Foster
Made to Measure Computer Systems
www.madetomeasure.co.za
Tel 044 850 1123

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:225274@forums.codegear.com...
> "Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
> news:224785@forums.codegear.com...
>
>> Please can someone explain what error is happening here
>
> A nil pointer is being accessed.  Is your SMTP object actually 
> instantiated?
>
> -- 
> Remy Lebeau (TeamB)
0
Jenny
3/19/2010 10:06:46 AM
"Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
news:225644@forums.codegear.com...

> Yes it must be instantiated because the component is on the form

That does not necessarily mean you are acessing it via a valid pointer, 
though.

>              smtp.connect  // this is where it goes down with the
> access violation  but only on the second time the engine is
> created - first time is fine

That is a good indication that a bad pointer is actually being used.

> then i free the form

Are you re-creating the form the next time you want to use the SMTP 
component?  My guess is that you are not.  For instance, if your code is 
checking for Assigned(frmEmailEngine) before calling 
TfrmEmailEngine.Create(), but you are not setting frmEmailEngine to nil 
after calling frmEmailEngine.Free().

> Should I get an indy upgrade?

Yes.  10.0.52 is very old and no longer supported.

> i am very confused by the site which says that 10.0.52 is
> a 'rather old version and is no longer recommended.'

What is confusing about that?

> But then says that v 10 is unstable and 9 is the stable version.

In general, Indy 10 is still a beta at best.  It undergoes a lot of frequent 
changes, especially after the release of D2009 and its new Unicode 
capabilities.  That is not to say that Indy 10 can't be used, because it 
can.

> Is there a TI sheet or something with idiot-proof steps on
> how to get, compile, build and install the package?

http://www.indyproject.org/Sockets/Docs/Indy10Installation.EN.aspx

-- 
Remy Lebeau (TeamB)
0
Remy
3/21/2010 5:45:17 AM
Thankyou for the instructions - i will do the update this evening
I understand what you say about a bad pointer  as  the form not getting 
free'd fully on the free, but can't imagine why it consistently fails on few 
configurations and runs fine on the majority.
Looking at the code below i cannot see it not creating the form - but i did 
not write it and have no idea why there is a 'if true then ' there and can 
only assume that ' if true' always resolves to true - will take it out.
My plan now is to put a try around the 'create' to trap any non-fatal error 
there and then to set frmEmailEngine to nil after the free.  As i explained 
before I cannot reproduce the error on any of my machines - it is happening 
at a windows-illiterate client only,  so i have to  put in all the 
fixes/messages i can think might be helpful and then email the update.

Here is all the code on the test button in case i am missing something.  I 
really appreciate your advice.  Ta - Jenny

procedure TfrmSysVar.btnTestSettingsClick(Sender: TObject);
var
    profileName : String;
    tmpEr : ErrType;
begin
    screen.cursor := crHourglass;
    profileName := uppercase(cbProfile.Items[cbProfile.ItemIndex]);


    writeEmailSettings(profileName);

    pnlButtons.Visible := false;

    pnlPingResults.Align := alClient;

    pnlPingResults.Show;
    Application.ProcessMessages;
    btnClosePnl.Left := (pnlResultsClose.Width - btnClosePnl.Width) div 2;
    memTestLog.Lines.Clear;

    if true then
        begin

            memTestLog.Lines.Add('Reading SMTP Settings for ' + profileName 
+'.');

            frmEmailEngine := TfrmEmailEngine.Create(self);

            tmpEr := frmEmailEngine.GetSMTPSettings(profileName);

            memTestLog.Lines.Add(GetErrorString(tmpEr, 'Settings Read 
Successfuly.'));

            if tmpEr = ER_NONE then
                begin
                    memTestLog.Lines.Add('Sending Test Email Message to ' + 
edMailAddress.Text);

                    tmpEr := frmEmailEngine.SendMessage(edMailAddress.Text, 
'Test Mail Server Settings for Profile ' + profileName,'', 
edMailAddress.Text, memTestLog.Lines,nil,false,false,false,false);

                    memTestLog.Lines.Add(GetErrorString(tmpEr, 'Mail Sent 
Successfuly.'));

                    if tmpEr = ER_NONE then
                        memTestLog.Lines.Add('Mail Settings Appear 
Correct.')
                end;

            if tmpEr <> ER_NONE then
                memTestLog.Lines.Add('Please Check Settings and Try 
Again.');

            frmEmailEngine.Free;

        end
    else
        memTestLog.Lines.Add('No internet connection found');

    screen.Cursor := 0;

end;
-- 
Jenny Foster
Made to Measure Computer Systems
www.madetomeasure.co.za
Tel 044 850 1123

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:225943@forums.embarcadero.com...
> "Jenny Foster" <jen@madetomeasure.co.za> wrote in message 
> news:225644@forums.codegear.com...
>
>> Yes it must be instantiated because the component is on the form
>
> That does not necessarily mean you are acessing it via a valid pointer, 
> though.
>
>>              smtp.connect  // this is where it goes down with the
>> access violation  but only on the second time the engine is
>> created - first time is fine
>
> That is a good indication that a bad pointer is actually being used.
>
>> then i free the form
>
> Are you re-creating the form the next time you want to use the SMTP 
> component?  My guess is that you are not.  For instance, if your code is 
> checking for Assigned(frmEmailEngine) before calling 
> TfrmEmailEngine.Create(), but you are not setting frmEmailEngine to nil 
> after calling frmEmailEngine.Free().
>
>> Should I get an indy upgrade?
>
> Yes.  10.0.52 is very old and no longer supported.
>
>> i am very confused by the site which says that 10.0.52 is
>> a 'rather old version and is no longer recommended.'
>
> What is confusing about that?
>
>> But then says that v 10 is unstable and 9 is the stable version.
>
> In general, Indy 10 is still a beta at best.  It undergoes a lot of 
> frequent changes, especially after the release of D2009 and its new 
> Unicode capabilities.  That is not to say that Indy 10 can't be used, 
> because it can.
>
>> Is there a TI sheet or something with idiot-proof steps on
>> how to get, compile, build and install the package?
>
> http://www.indyproject.org/Sockets/Docs/Indy10Installation.EN.aspx
>
> -- 
> Remy Lebeau (TeamB)
0
Jenny
3/23/2010 9:05:00 AM
Reply:

Similar Artilces:

Delphi 2009
Hello, I am using Delphi 2009 with a recent Indy 10.5.5 development snapshot. In my code I am using a TIDHttp with TIDSSLIOHandlerSocketOpenSSL. The Open SLL .dlls I am using is from the the indy website and are openssl-0.9.8k-i386-win32. The issue is, randomly, I am getting a socket error # 0 error. I never got this error with Delphi 2007 and Indy 10.2.3. Any help would be GREATLY appreciated! Thank you. The code looks something like this: var sHttpResult, sVar, sParam: string; ssHttpResult : TStringStream; slPostData : TStringList; begin IdSSL.CheckForDi...

Converting Delphi 2007 Indy 10.2.3 to Delphi 2009 Indy 10.5.5 [Edit]
Hello, I am currently attempting to port over a Delphi 2007 project that uses Indy 10.2.3 (very successfully) to Delphi 2009 and Indy 10.5.5 (I just got the latest development build this morning). I think I am running into an encoding issue, but am not sure. Specifically, IDHTTP with SSL calls an old CGI and the CGI returns a .zip file and I then save it to the disk. In 2007 and before this worked perfectly. In 2009, it is not. Here is the examples of the 2 different results (though cut way short in the post) I am getting back: 2007: 'PK'#3#4#$14#0#0#0#8#0'rLQ9žrPb€'#0...

Error Connecting Delphi 3 to SqlanyWare 5.5
hi, please i want to know how to connect from delpi ver 3 on sqla ver 5.5 on win 3.11 because when i tried it i got an error message can not start engine. the steps which i did are 1- install sqla 2- configuire odbc 3- start delphi and from database adminstratot i confguired my db 4- from the delphi dataaccess i choose the dataaccess control 5- i confguire it 6- i try to start connection i got an error message can not start engine tank you >steps which i did are 1- install sqla > 2- configuire odbc > 3- start del...

Encoding issues with Delphi 2007 and Indy 10.5.5
Hi, I'm using the last snapshot of Indy 10 (Rev 3539) with Delphi 2007 under a French version of Windows Vista. I just discovered that some characters wasn't transferred correctly, probably since the Unicode update (AFAIK that worked fine with Indy 10.2.3). They are replaced by '?' on the other end of the connection. For instance, this code : procedure TForm2.Button1Click(Sender: TObject); begin IdTCPClient1.Connect; IdTCPClient1.IOHandler.WriteLn('£'); end; procedure TForm2.IdTCPServer1Execute(AContext: TIdContext); var S: string;...

C++ Builder/Delphi 2009 and IndyTiburon 10.5.5 error
Hello, i installing the latest IndyTiburon package r3641. 1. There are a problem with the genarated header file /core/IdWinsock2.hpp when i will use the components: [BCC Error] IdWinsock2.hpp(88):E2040 [BCC Error] IdWinsock2.hpp(89):E2040 [BCC Error] IdWinsock2.hpp(90):E2040 [BCC Error] IdWinsock2.hpp(91):E2040 static const Word IPPORT_REGISTERED_MIN = 0x400; static const Word IPPORT_REGISTERED_MAX = 0xbfff; static const Word IPPORT_DYNAMIC_MIN = 0xc000; static const Word IPPORT_DYNAMIC_MAX = 0xffff; I comment them out ! and it work fine ! But can i get any other Problem...

Indy 10.5.8/Delphi 5 (SMTP) getting "... temporary failure"
Everything has been working fine for over a year, but now a customer is getting the above error. Actually, the program simply bombs on their system. That error only shows up when running inside Delphi. It never makes it outside of Indy code before bombing the program. Two things: this only happens after several e-mails are sent in a short period of time. Also, this was not a problem before, when the program ran MUCH slower, due to BDE/SQL speed issues. We are now using the Advantage database server, which makes everything run much faster. We know there is a problem if we go over 250 e-ma...

Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]
Communication type is set to HTTP, LifeCycle is set to Invocation. Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle? Hi Irina, > Communication type is set to HTTP, LifeCycle is set to Invocation. > > Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other proper...

Indy 10 Installation Delphi 5
Hi, As a result of this POODLE thing, I have to upgrade our Delphi 5 program to use TLS instead of SSL3, so I was trying to upgrade from Indy 9 to Indy 10 (does some version of Indy 9 support TLSv1.2?). So after running the batch file that comes with the installation (Full_5.bat) and installing the component in Delphi 5. I go and drop a idIOhandlerSSL or whatever onto an empty form and get an error: "Stack overflow - save your work and restart Delphi" Anyone know how to get the installation to work? Thanks! Orren wrote: > As a result of this POODLE thing, I have t...

migrating from Delphi 6 With Indy 10 to XE7 with Indy 10
I updated the original Indy in D6 to version 10 several years ago. Now I want to migrate my application from D6 to XE7 and would like some feedback on the best route to take. I usually send data using readln and writeln statements. The data is typically XML format. Since migrating to XE7 will include potential unicode data what is the best approach to take when reading and writing data? Will writeln and readln work in these cases or should I be using a different strategy to send unicode data between the tidtcpclient and tidtcpserver applications? al wrote: > I usually send data ...

Problem with Delphi 3.0 and SQL Anywhere 5.5.0.3
Hi All ! I have next problem: I have programm writing in Delphi 3.0 and SQL Anywhere server 5.0.3 build #1666 is runnig under Intranetware 4.11 for small buisnes. The client station run with programm on Delphi 3.0, get the Error "Error ! Trying to acsses the page beyond the maximum allowspace ....." or someting like this. The mate is that it's the error with DB Space.(I think so) I think may be it the error in programm but may be in sever. When I shut down server and then restart it - it OK. This error is apearence once a week. What i have to do ? Please help...

Delphi 5 To Delphi 2009
I upgraded to Delphi 2009 from D5. The install says I can install Delphi and/or C++. Delphi installed OK but I see nothing of C++. What am I missing or does my upgrade not include C++? Thanks It depends on what you bought. If you bought Delphi 2009 only, that's what you get. If you bought Delphi 2009 and C++ Builder 2009 you get both. My guess is you got Delphi 2009 only. The simplest way to verify is look your invoice - it should say I would think. You could also go to members.embarcadero.com, login, then click on my registered products. There will be a textual description of...

Delphi 5 to Delphi 6 and up
Dear List, Trying to add 7Zip compression support to my delphi application. I am using the ported 7Zip sdk (see their website, they have a link). I am stumped on how to rewrite a single function: function ReverseDecode(var Models: array of SmallInt; ....): ..... where the input is mostly a fixed size array of SmallInt. This code perfectly compiles and functions in Delphi 6 and up, but in Delphi 5 I get the error: There is no overloaded version of 'ReverseDecode' that can be called with these arguments And obviously, the input (fixed) isn't the same as the param de...

Delphi 5 to Delphi XE4
Thinking about making the conversion. Of course we have numerous components such as: TurboPower AsyncPro, TurboPower Orpheus ICS2 Synactis All-In-The-Box. You guys have any advice as to the effort and time it may possibly take. It is a large application, several hundred thousand lines. And that's what happens when using third party components, a lot of extra work. I have been burned a few times. I now minimize the use to a few well known suppliers, like TMS. I have "banned" a lot of other components. Regards, Ole > > Thinking about making the conver...

Delphi 2010 / IdHTTP problem: Socket Error # 0
Use D2010 Indy 10 gmail login with OAuth. When i send Post(https://accounts.google.com/o/oauth2/token,ABody,Response) In Indy on Line 2174 error "Socket Error # 0" case FHTTPProto.ProcessResponse(AIgnoreReplies) of In Delphi XE2 indy work withiut errors. <Roman Dukuy> wrote in message news:418271@forums.embarcadero.com... > Use D2010 Indy 10 > gmail login with OAuth. When i send > Post(https://accounts.google.com/o/oauth2/token,ABody,Response) > > In Indy on Line 2174 error "Socket Error # 0" > case FHTTPProto.ProcessResp...

Web resources about - Delphi 5 Indy 10.0.52 connect error not socket - embarcadero.delphi.winsock

First Capital Connect - Wikipedia, the free encyclopedia
( FCC ) is a British train operating company , owned by FirstGroup , operating the Thameslink Great Northern franchise . FCC operates passenger ...

Connect
mobile photography technology, culture and community www.dpreview.com News Reviews Features Phones Tablets Cameras Apps Forums Mobile photography ...

CloudCraze Connects Consumers To Facebook Brands Via Cloud Technology
Brands on Facebook are always looking for new, efficient ways to connect with customers . CloudCraze, which recently released its 3.0 e-commerce ...

Apple celebrates App Store records as it notes iTunes Connect’s usual holiday break
Apple has posted the dates of the usual holiday shutdown of iTunes Connect , running for eight days from 22 to 29 December inclusive. During ...

FishbowlNY Newsstand: Connect The Dots
FishbowlNY Newsstand: Connect The Dots

Apple announces Dec. 22-29 holiday closing dates for iTunes Connect
Apple has announced the dates for the annual holiday shutdown of iTunes Connect. As in the previous year , Apples developer portal is scheduled ...

App connects seniors across the globe
The start-up behind the app raised $1 million in its first six months and has grown to serve a global user base of 25,000.

Ford announces Sync Connect smartphone app
The app works with Ford's new embedded modem, first arriving on the 2017 Escape, to bring vehicle functions to the owner's smartphone, no matter ...

Uber Launches Service To Help Drivers Connect With Passengers On Their Route
Between offering taxi, private car and rideshare options, Uber seems to have a service to meet just about every users’ transportation needs. ...

Ford's new Sync Connect app lets you remotely start your car
How do you know that app-connected cars are going to become the norm rather than the exception? When Ford decides to get in on the action. The ...

Resources last updated: 11/28/2015 1:34:54 AM