We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

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

iulianclaudiu
on
Medium Priority
621 Views
Last Modified: 2008-01-09
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
Comment
Watch Question

Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.