Board index » delphi » too many consecutive exceptions: 'access violation...'

too many consecutive exceptions: 'access violation...'


2006-02-20 11:41:42 PM
delphi252
I am trying to modify an Apache web service that is been working for over a
year.
When I start the project in my Delphi IDE, I get an AV. At the point the AV
arises, the stack is blank. The CPU de{*word*81} window shows it is on
TObject.Free, but I have had no luck figuring out what object it is trying to
free.
I don't know what's changed - some shared source code, a firewall setting,
etc. Does anyone have an idea how to debug the problem?
More: If I run Apache from a local command line, I get a similar AV (The
memory could not be read), then a runtime 216 error, then Apache is loaded
and the service is operational. When stopping Apache, I get the same AV and
runtime 216. I think the fact that Apache loads and unloads the DLL twice
is why I get the same error on the way in and out - the first AV is when the
DLL is unloaded prior to being reloaded.
 
 

Re:too many consecutive exceptions: 'access violation...'

Not sure what causes the problem, but I have found a workaround.
The CPU window seemed to point me toward units' initialization and
finalization sections.
I started looking at the units that have been modified since the last build
of the web service and found one particular unit that added a potentially
lengthy process to the finalization section. Although I was sure the code
in the if condition was not being executed, I commented it out and the web
service started without error. I subsequently moved it from the
finalization area to a function and my service starts and works properly.
Is there a limit or a recommend amount of code that is to be placed in a
unit's finalization section?