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

Posted on 2006-03-21
Medium Priority
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
Question by:iulianclaudiu
1 Comment

Accepted Solution

quilley earned 1500 total points
ID: 16279464
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 19 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question