Hi Arno and thanks for Your effort!

I'm sorry to say that Your answer doesn't promote ICS at all. I don't
possess enough knowledge about winsock and smtp to be absolutely sure but I
am not willing to accept that it isn't possible to use ICS components on
"all" computers. (You can see the answers on Your questions in Your message
below.)
If I can't be sure it's going to work on the majority of my customers
computers I can not use ICS smtp components.

So, since I really like ICS I go at it once more; These are the known facts:
- Everything works on all tested computers if we let one smtp component
exist at _all_ time when the application is running. (It doesn't have to be
the one used to send the emails. See my work around code). As I said I have
almost no knowledge about smpt communication (that's why I use ICS) but
isn't this a tell tail about the error that obviously can appear in the
component under certain circumstances...?
- The recreate approach (create the component when needed and free when
ready) works on all computers using other smtp components, for instance with
Indy. (Indy has problems with Swedish characters in the subject so I must
switch to use some other smtp component. I already use ICS in another
application so I would very much like to use ICS in all of my application.)
- Arno: Even if we don't understand _why_ it works: Is there any harm using
the strange work around I attached earlier? (Just to bee on the safe side on
computers where the component error may show...)

Sorry to bother You all with these emails.
I really appreciate all the help I get!

Best Regards
Henrik


 

-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Arno Garrels
Skickat: den 12 december 2006 18:40
Till: ICS support mailing
Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform

Henrik,

I still guess that it's caused by any crap process running on this box. Why
else does it not happen on other computers as well? 

[Henrik]: It does happen on other computers. I assure You that the one I use
were I get the same freeze as my customer, has no real-time protection
software, internet security suites or malicious software, anything like
that.

I don't know the Norman software, but have you tried to uninstall it? 

[Henrik]: This is not the problem as You can read in my earlier posts. (FYI:
It's a widespread Antivirus software from Norway.)

I would also check the auto-started processes as well and turn them off one
after the other. Then I would search for strange processes in the process
list that do not exist on the other, working boxes. That's at least worth a
try. 

[Henrik]: Even though my opinion I wrote early in this mail, that I can't
check this on all my customers computers, I've checked this on my test
computer. Everything seems ok.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

Henrik wrote:
> Hello Wilfred!
> 
> Yes, I get the same behavior when running the application from within 
> the IDE. So I traced the code up until the application stops to 
> respond.
> (And
> yes, we mean the same thing: the application freezes or hangs so that 
> You can't quit and You can not move or close the window.)
> 
> The trace disappears in the function
> WSocket_Synchronized_WSAAsyncSelect in WSocket.pas. You can see the 
> actual line where something happens in the code snippet below:
> 
> function WSocket_Synchronized_WSAAsyncSelect(
>            s: TSocket; HWindow: HWND;
>            wMsg: u_int; lEvent: Longint): Integer; begin
>   SaveTrace('Start WSocket.pas: function 
> WSocket_Synchronized_WSAAsyncSelect');
> 
>   if @FWSAAsyncSelect = nil then
>       @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect');
> 
>   SaveTrace('Hang on the line below this row: Result := 
> FWSAAsyncSelect...');
> 
>   Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent);   // <------
> Something happens here
> 
>   SaveTrace('Hang on the line obove this row: Result := 
> FWSAAsyncSelect...');
>   SaveTrace('End   WSocket.pas: function
> WSocket_Synchronized_WSAAsyncSelect');
> end;
> 
> Does this make any sense?
> Best Regards
> Henrik
> 
> 
> 
> Ps. If there by any chance is someone who want a bit more "in depth 
> facts", I also attached the following trace logs :-)
> 
> I added the SaveTrace procedure seen in the snippet above at the first 
> line and the last line of the following functions and procedures:
>   WSocket.pas:  function XSocketWindowProc
>   WSocket.pas:  procedure TCustomWSocket.WndProc
>   WSocket.pas:  procedure TCustomWSocket.WMAsyncGetHostByName
>   WSocket.pas:  procedure TCustomWSocket.TriggerDNSLookupDone
>   SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone
>   WSocket.pas:  procedure TCustomSocksWSocket.Connect;
>   WSocket.pas:  procedure TCustomWSocket.Connect
>   WSocket.pas:  function WSocket_Synchronized_WSAAsyncSelect
> 
> So after the ConnectButton in the example is pressed I get the 
> following results on computers where everything works:
> 
> First time the SmtpTestForm is created and ConnectButton is pressed:
> --------------------------------------------------------------------
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>     Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>       Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>         Start SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>           Start WSocket.pas: procedure TCustomSocksWSocket.Connect
>             Start WSocket.pas: procedure TCustomWSocket.Connect
>               Start WSocket.pas: function 
> WSocket_Synchronized_WSAAsyncSelect
>                 Hang on the line below this row: Result := 
> FWSAAsyncSelect...
>                 Hang on the line obove this row: Result := 
> FWSAAsyncSelect...
>               End   WSocket.pas: function
> WSocket_Synchronized_WSAAsyncSelect
>             End   WSocket.pas: procedure TCustomWSocket.Connect
>         End   SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>       End   WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>     End   WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> 
> 
> I close the SmtpTestForm, release it and create it again.
> When ConnectButton is pressed this time I get the following trace:
> ------------------------------------------------------------------
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>     Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>       Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>         Start SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>           Start WSocket.pas: procedure TCustomSocksWSocket.Connect
>             Start WSocket.pas: procedure TCustomWSocket.Connect
>               Start WSocket.pas: function 
> WSocket_Synchronized_WSAAsyncSelect
>                 Hang on the line below this row: Result := 
> FWSAAsyncSelect...
>                 Hang on the line obove this row: Result := 
> FWSAAsyncSelect...
>               End   WSocket.pas: function
> WSocket_Synchronized_WSAAsyncSelect
>             End   WSocket.pas: procedure TCustomWSocket.Connect
>         End   SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>       End   WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>     End   WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> 
> 
> 
> So now to the interesting part. On computers where the application 
> freezes I get the following trace.
> First time the SmtpTestForm is created and ConnectButton is pressed:
> --------------------------------------------------------------------
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>     Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>       Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>         Start SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>           Start WSocket.pas: procedure TCustomSocksWSocket.Connect
>             Start WSocket.pas: procedure TCustomWSocket.Connect
>               Start WSocket.pas: function 
> WSocket_Synchronized_WSAAsyncSelect
>                 Hang on the line below this row: Result := 
> FWSAAsyncSelect...
>                 Hang on the line obove this row: Result := 
> FWSAAsyncSelect...
>               End   WSocket.pas: function
> WSocket_Synchronized_WSAAsyncSelect
>             End   WSocket.pas: procedure TCustomWSocket.Connect
>         End   SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>       End   WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>     End   WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>   End   WSocket.pas: procedure TCustomWSocket.WndProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> 
> 
> I close the SmtpTestForm, release it and create it again.
> When ConnectButton is pressed this time I get the following trace:
> ------------------------------------------------------------------
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
> End   WSocket.pas: function XSocketWindowProc
> Start WSocket.pas: function XSocketWindowProc
>   Start WSocket.pas: procedure TCustomWSocket.WndProc
>     Start WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName
>       Start WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone
>         Start SmtpProt.pas: procedure
> TCustomSmtpClient.WSocketDnsLookupDone 
>           Start WSocket.pas: procedure TCustomSocksWSocket.Connect
>             Start WSocket.pas: procedure TCustomWSocket.Connect
>               Start WSocket.pas: function 
> WSocket_Synchronized_WSAAsyncSelect
>                 Hang on the line below this row: Result := 
> FWSAAsyncSelect...
> 
> 
> 
> 
> 
> 
> 
> -----Ursprungligt meddelande-----
> Från: [EMAIL PROTECTED] [mailto:twsocket- 
> [EMAIL PROTECTED] För Wilfried Mestdagh
> Skickat: den 12 december 2006 13:17
> Till: ICS support mailing
> Ämne: Re: [twsocket] Freeze when using smtp after recreating its 
> parentform
> 
> Hello Henrik,
> 
> Do you have the same problem in the IDE ?  Because this way you can 
> check witch code line never comes back (freeze). If not eventually 
> open a console window and write some debug information into it to see 
> where it happens.
> 
> Your approach is normal. I do this all the time, however I almost 
> never use forms for it. Normally I have an object containing the 
> component, eg TSmtpClient, another object that creates / handles / 
> destroy the TSmtpClient objects. But in principle it is the same. It 
> can as whell be a DataModule, a Form or whatever other object.
> 
> Question: We do understeand the word 'Freeze' the right way ?  Form 
> cannot moved, closed, application cannot quit, etc... Right ?
> 
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to