I´m almost happy... It´s because * maybe * (sight) the problem is resolved, and 
I´m writing to let you know what happened... maybe someone can say if the 
problem seems to be really resolved...
Well, my app have a  SocketServer, a Socket Client and a SMTP. The problem was 
that, anytime, anywhere, some (stupid) thread (that i dont started, my service 
is "mono-threaded") goes stack overflow... Some days later and many debug 
"step-into by step-into" after, looking to the threads windows I noticed that 
when I put SocketServer to listen, the activate event was called in another 
thread then the rest of the app... So I delay the call, and then it is now 
called in the same thread context of the rest of app... 
Before:
  // code code code
  SocketServer.Listen;
  // code code code
  while not Terminated do begin
    ServiceThread.ProcessRequests(True);
  end;
  // code code code
  // code code code

After:
  // code code code
  // SocketServer.Listen; // moved to some TimerOnTimer
  // code code code
  while not Terminated do begin
    ServiceThread.ProcessRequests(True);
  end;
  // code code code
  // code code code

The weird thing is that I had writen a simple app using the same way socket and 
client sockets, doing (almost) the same thing and it do the same different 
thread activation process but the error do not occur...
Anyway, if someone knows if it´s ok or not what I´m doing with the activation 
of the sockets, let me know
Thanks


Rm 12:2 - "E não vos conformeis com este século, mas transformai-vos pela 
renovação da vossa mente, para que experimenteis qual seja a boa, agradável e 
perfeita vontade de Deus."
--
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