Re: Application "Nuked"



Hi Kristofer,


If you have these 24x7 applications, that die without any trace, you should
start in writing a 'launcher program' that starts your application. Keep
waiting until app24x7 finishes, and log the resultcode. (this is
application.exitcode from app24x7).

from the delphi-help:
Description

In Delphi code, the ExitCode variable contains the application's exit code.
An exit procedure can learn the cause of termination by examining ExitCode.
If the program terminates normally, ExitCode is zero. If the program
terminates due to a call to Halt, ExitCode contains the value passed to
Halt. If the program terminates due to a runtime error, ExitCode contains
the error code.

On Windows, setting the ExitCode variable to a value other than 0 in the
initialization section of a unit will make loading of a DLL fail (DllMain
will return false). You can also set ExitCode in code called from DllProc or
DllProcEx to signal failure of loading.
On Linux, although the ExitCode variable is accessible from shared object
code, its value does not affect the loader of the shared object. Thus, using
ExitCode in a shared object has no effect.

Ad Franse.



"Kristofer Skaug" <nospam@xxxxxxxxx> schreef in bericht
news:42b1f6ab@xxxxxxxxxxxxxxxxxxxxxxxxx
> Dear all,
>
> We're having some trouble with a Delphi 6 app that sometimes just
disappears
> without a trace. It happens within a timespan of typically 30 to 60 hours
of
> continuous uptime. It's a heavily multithreaded system, but all threads
are
> internally exception-safed (basically, a catch-all try-except block in the
> TThread.Execute method, which should report the occurrence and nature of
any
> exception to a log file), so I'm rather at a loss to explain why we cannot
> see any kind of error message at all. We use no third party components or
> DLL's.
>
> I'm wondering whether there's a knowledge base somewhere specifically
> oriented toward grave application crash symptoms and their causes. Or if
you
> have experienced a similar situation and found the cause, it would be
> helpful if you would share your story for me and others to possibly learn
> from.
>
> thanks!
>
> --
> Kristofer
>
>


.