That was an interesting investigation ... (Why - I've just been working in
this area for the last day or so ..)

Except it has "Generally" nothing to do with threads - although there is
always an exception to the rule ...

So I always thought it was related to errors in the BDE on exit - how wrong
(and right - an issue with timer call-backs for the SQL cursor display in
one of my cases).

0x0eedfade is actually the code Delphi uses to identify that a Delphi
program has raised an exception (vs. a OS runtime exception like a
AV/Hardware error etc). The message box you see is actually a Standard Win32
dialog being displayed by "UnhandledExceptionFilter". This occurs when an
error is raise during the "finalization" of units. I.e. The finalize of a
unit has been called from System.FinalizeUnits and at this point a Delphi
exception is raised. This particular case will normally only happen once
sysutils has been finalized (Depending on your program uses etc, There will
be between 4 and 10 units to be finalised after sysutils.

So how do you find your problem ... Put a break point in each units
finalization code and trace through the code. 

You can very easily find out the finalization order of the units. Put a
breakpoint on System.FinalizeUnits on the line "Table :=
InitContext.InitTable^.UnitInfo;" If you then do Ctrl-F7 to evaluate Table^
and then take a copy of this. This array has the finalization and
initialisation unit addresses - in reverse order - i.e. the first entry is
the last one finalised.

Then do (while running/debugged/stopped) search -> Find error on the
finalisation addresses (for say the first 10 units - this gives you the
order of the last 10 units to be finalised). Ensure to build with debug
DCUs/stack frames etc - else your breakpoints in system.pas/finalization etc
will not work . Then you can put your breakpoints on these units to find
which one is causing the error.

Happy bug hunting <g> ...


Myles.

-----Original Message-----
From: Cooke, Andrew [mailto:[EMAIL PROTECTED]]
Sent: Friday, 3 August 2001 9:22 a.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Unknown error


We get this one quite often if we've used something related to internet
explorer in our apps (eg, WinINet, or HTML Help). My gut feeling was also
that it was thread related, even if our apps don't explicitly use threads.
Happens to us on program exit under Win2000.
So no help, but shared frustration.
  Andrew Cooke.

-----Original Message-----
From: Stephen Bertram [mailto:[EMAIL PROTECTED]]
Sent: Friday, 3 August 2001 9:09 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Unknown error


Can anyone interpret the following error. It is occurring on program exit
and may relate to a hanging thread.

Unknown exception (0x0eedfade) at ...

TIA

Stephen

========================================================================
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited.  If you have received this message in error, please notify
the sender immediately.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to