AFAIK Application.OnException does not fire when you kill a tardy app
via the NT Task Manager which is the sort of thing I do way too often.  
I have nasty piece of code at the moment that does some bad recursion &
rewinding to do comms sequencing - if I get it wrong I often end up in
an infinite loop which means reset button for Win 98 or under NT I have
to prune the task.

I also have to admit to using 'Halt' in some code to get back to the IDE
fast when things go really wrong in code (normally removed before
release I might add <g>).

In the end I just don't trust things like on exception handling to work
100% under Win9x.

Grant Black
Software Developer
SmartMove (NZ) Ltd
Phone:     +64 9 361-0219 extn 719
Fax  :     +64 9 361-0211
Email:     [EMAIL PROTECTED]


> -----Original Message-----
> From: Aaron Scott-Boddendijk [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 12, 1999 11:07 AM
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: One Instance (Again)
> 
> 
> >One of the major problems that was probably overlooked by 
> most solutions
> >(including the JustOne32 component), is what happens if your app
> >crashes.  
> >
> >For instance if your method creates something such as the global atom
> >below (or memory mapped files etc), then removes it on the 
> FormDestroy
> >method, then what happens if you application dies with out 
> hitting the
> >form destroy?  
> >I have had a couple of commerical applications crash and it 
> is annoying
> >to have to reboot to restart the app. Of course we being 
> such fantastic
> >programmers our apps never crash so it not such a problem...<g>   
> >
> >Basically the best solution is search through the list of windows and
> >check if your window is still running.  I should really wrap 
> the code up
> >into a component & redistribute it someday but it is code 
> developed in
> >work time...
> 
> 
> How about using TApplication.OnException to trap any 
> unhandled exceptions
> and release the Atom.  Rather than having the Atom Form 
> dependant add your
> own exit procedure to trap application exit and if the atom 
> exists remove it.
> 
> So normal termination the exit procedure will release the 
> Atom and abnormal
> temination the OnException trap will release the Atom.
> 
> Comments
> 
> --
> Aaron Scott-Boddendijk
> Jump Productions
> (07) 838-3371 Voice
> (07) 838-3372 Fax
> 
> 
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to