EExternalException at address 7C964ED1 in module Nt.dll in a multithreaded application

Hello Experts,

I made an application that spiders the web and indexes pages ... more like a search engine indexer.

The App uses winsock directly and threads created using BeginThread function ....  everything works fine for about 5 hours of running .. after wich it rasies the EExternalException.

I use blocking sockets with select so i only read when there is to read data.
I protect any global vars using critical sections ..
I recently downloaded EurekaLog .. and i'm currently evaluating it.. using Eureka .. it sais that the exception was rased at multiple lines in my code... one wich is at  the CriticalSection ( at the Enter ) and another one at the exit of the critical section.

I tried everything i know there is to try .. and no result... I hope the fact that i do not have Delphi Updates is not the reason .... I know there is an RTL update ... please someone guide me towards a solution ... i'm really stuck !


BTW.. I use Delphi 6 , WinXP Home edition with all windows updates.

Thank you
iulianclaudiuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

quilleyCommented:
Things to try:

- Use a class derived from TThread instead of BeginThread
- Replace global variables that are specific to one thread with thread-local variables (see threadvar in online Help).
- Use synchronisation objects defined in Syncobjs unit, e.g. TCriticalSection.Acquire instead of EnterCriticalSection etc.
- Call ExitThread before leaving thread function

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.