Service Throws AV after TNSListener has been stopped

kwolak

Member
AstaDOAServer:
Start it.
Stop TNSListener
Stop the AstaDOAServer
Throws AV

D5, DOA 3.4.3 Standard.

I know this is a weird way to produce the problem, but it ACTUALLY occurs when we reboot/shutdown a machine with the server running on it.

Since the error DOES NOT HAPPEN unless we
ACTUALLY connect to Oracle (.LogOn), my
first assumption is that it is in there.

Also, if I RESTART TNSListener before
stopping my service, I do not get the
exception. Clearly TNSListener/DOA are
involved here.
 
Actually, this is TOracleEvent causing
this WHEN it uses its own execution
thread, and we try to .FREE it after
TNSListener is turned off.
 
In which module (your applications, an Oracle library) does the Av occur?

------------------
Marco Kalter
Allround Automations
 
It happens in the application,
during the shutdown process.

It looks like a Delphi AV.

We HACKED it a bit to reduce the errors
to a minimum, by doing the following in
the DataModuleDestroy() event of the form
that contains the OracleEvent.

Try
OracleEvent.InternalSession.CheckConnection(False);
OracleEvent.InternalSession.LogOut
Except
On E: ... // IGNORE
End;

This seemed to reduce the problems from
EVERY time to 1 in 20 or less. Typically
when we got an exception that we ignored,
we would later (assuming when component
was freed), get the AV.
 
We'll look into this. Note that we have implemented some more robustness into the component destructors in the upcoming 4.0 release, so that you do not get exceptions when the owner of these components is freed.

------------------
Marco Kalter
Allround Automations
 
I think the overall issue can be summed up:

If I KNOW we are shutting down the app
(or service), then give me a graceful way
to tell the component to DEAL WITH IT.

Right now, I can reproduce Exceptions in
a stand alone app, and because it was SO
easy, I assume you can as well.

I am VERY WILLING to TEST this issue
in the upcoming version 4.0 if you need to
find out how well you did.
 
If I KNOW we are shutting down the app (or service), then give me a graceful way to tell the component to DEAL WITH IT.
Disconnect your sesssions and stop TOracleEvent instances.
Right now, I can reproduce Exceptions in a stand alone app, and because it was SO easy, I assume you can as well.
Not really, please send me the stand alone application and the steps to reproduce the issue.
I am VERY WILLING to TEST this issue in the upcoming version 4.0 if you need to find out how well you did.
You will have this opportunity shortly, when the first public beta is released.[/QUOTE]

------------------
Marco Kalter
Allround Automations
 
Back
Top