• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 576
  • Last Modified:

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
0
iulianclaudiu
Asked:
iulianclaudiu
1 Solution
 
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now