Hello again Arno! > Hmm, your 'workaround' doesn't sound logical, why > should a secondary instance of a _V5_ component > have any effects, strange?
No I know, it isn't logical but since I want to free my forms it is the only way I so far have been able to solve it... > Do you close the SMTP-form while mail is been sent? No, I click the button to create and show the SmtpTestForm. In SmtpTestForm I click the "All-in-one" button. I wait until the line "All-in-One done!" is written in the Info messages memo. Then I close the form with the X in the upper right corner. Back to the first form I once again press the button to show SmtpTestForm and when pressing "All-in-one" (or "Connect") button the program freezes. > Is the SMTP-form yet destroyed when you create another one? Well I think so...? I do not get any error messages and I get the same behavior when using Free instead of Release or if I set Action := caFree in SmtpTestForm.OnClose. > When does it freeze exactely (try the buttons on the left, > Connect etc. instead)? When I'm trying to connect. > How is the CPU load when it freezes? MailSnd constant on 50% and "system idle" (I don't know the English term) has 50% > What is different with the two boxes, any > Anti Virus software, any personal firewall etc.? It is different Anti Virus software (Norman on the one with the problem and McAfee on the other) otherwise I can not come up with anything that differs... I also tried the exe on a third computer also with Norman Anti Virus and everything works there as well so it doesn't seem to have anything to do with Norman. Thanks once more //Henrik -----Ursprungligt meddelande----- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Arno Garrels Skickat: den 11 december 2006 15:06 Till: ICS support mailing Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform [Message from Arno included above...] --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Henrik wrote: > Hi Arno and thank You for the reply! > > I use V2.32 of SmtpProt.pas (the one You get when clicking "Download > the latest ICS-V5 Distribution" on overbyte.be) and Delphi7. > > Trying to solve this mystery I have now discovered two things: > * Since You did not experience any problem I decided to test the > example application on another computer by copying the exe-file. Here > the second time I show the SmtpTestForm and presses the "All-in-one" > button everything works ok and the mail is being sent as expected!!! > Do You have any ideas on what can be the difference between these > computers that leads to the freeze problem on just one of them? (both > has Win XP SP2 and the latest Windows update patches) > > * I don't know if this gives any clues but a workaround on the > computer where the problems appear is to either not destroy the form > OR create a dummy smtpCli component like in the code below! > > procedure TForm2.Button1Click(Sender: TObject); > var dummySmtpCli : TSmtpCli; > alreadyCreated: Boolean; > i: integer; > begin > SmtpTestForm := TSmtpTestForm.Create(Application); > > // Workaround that prevents freezing on some computers > alreadyCreated := false; > if Application.ComponentCount > 0 then > begin > for i := 0 to Application.ComponentCount-1 do > begin > if Application.Components[i].Name = 'DummySmtpClient' then > begin > alreadyCreated := true; > BREAK; > end; > end; > end; > if not(alreadyCreated) then > begin > dummySmtpCli := TSmtpCli.Create(Application); > dummySmtpCli.Name := 'DummySmtpClient'; > end; > > try > SmtpTestForm.ShowModal; > finally > SmtpTestForm.Release; > end; > end; > > > Any further thoughts on the matter is greatly appreciated! > // Henrik > > -----Ursprungligt meddelande----- > Från: [EMAIL PROTECTED] [mailto:twsocket- > [EMAIL PROTECTED] För Arno Garrels > Skickat: den 11 december 2006 10:32 > Till: ICS support mailing > Ämne: Re: [twsocket] Freeze when using smtp after recreating its > parentform > > Hello Henrik, > > Just tested with latest V5 beta, but works great? > > --- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > Henrik wrote: >> Hi! >> >> I have probably misunderstood something because I get the same >> behavior described below no matter which of the components SmtpCli, >> SyncSmtpCli and HtmlSmtpCli I use. >> >> The problem has to do with freeing the smtp-components parent form. >> You can easily duplicate the behavior with one of the standard demo >> applications: * Open Your favorite demo of MailSnd, MimeTst or >> MailHtml. (I proceed with MailSnd-demo below.) >> * Add a new form with a button to the project. Write the following in >> the buttons OnClick method: >> procedure TForm2.Button1Click(Sender: TObject); >> begin >> SmtpTestForm := TSmtpTestForm.Create(Application); >> try >> SmtpTestForm.ShowModal; >> finally >> SmtpTestForm.Release; >> end; >> end; >> * Click on the menu: "Project" - "Options", and remove the >> SmtpTestFrom from the "Auto-createForms" list. >> * Run the application and click the button. SmtpTestForm opens and >> You can send lots of e-mails. >> * Close SmtpTestForm and press the button again. Try to send yet >> another email and You get stuck! >> >> I guess I'm doing something fundamentally wrong?! I have narrowed it >> down to that everything works as expected if I don't release the >> form. (I get the same error when setting Action to caFree in >> SmtpTestFrom.OnClose.) >> >> Is it not a good idea to free a manually created form? >> >> Best Regards >> Henrik > -- > 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 -- 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