joze
joze

Reputation: 41

application defined exception - no idea what is wrong

can somebody help me out with this error

enter image description here

Project1.exe faulted with message: 'application-defined exception (code 0xc0000008) at 0x7c90e4ff'. Process Stopped. Use step or Run to continue.

Using Delphi 7 on Win XP. Installed are ony default original Delphi 7 components. I have only a button and opendialog component on my new fresh project. I am using just one line of code in ButtonClick procedure

OpenDialog1.execute;

when this warning on picture occurs. Open dailog shows up for milisecond then Delphi error is reported before I can choose anything from open dialog.

What could be wrong? This behaviour is new, because I used opendialog before without problems.

TIA

P.S. Program runs OK outside of Delphi IDE.

P.P.S. I deinstalled GExperts, DelphiSpeedUp but problem remains.

Upvotes: 4

Views: 6341

Answers (6)

AlexeyD
AlexeyD

Reputation: 1

First of all - sorry for my English. I get the same error on the same Delph7. In my case this error was raised by recursion)

Upvotes: 0

Rudy Velthuis
Rudy Velthuis

Reputation: 28846

Looking around online, I see that this error seems to happen every now and then. I don't know the real reason, but it seems to be related to the debugger. I'd guess it is some kind of obscure debugger bug that only happens when many different things come together.

FWIW, I've seen reports from D4 to D7 and even D2006. It seems to be gone in higher versions, although that is not sure.

The more reports I see, I notice it always seems to happen in the Delphi debugger. More evidence that it is the debugger, IMO. If that is the case, there is not much you can do.

Upvotes: 4

alvaroc
alvaroc

Reputation: 471

I moreless had the same problem with D2007 running W8. I moved the code to and old WXP machine and the program ran fine both inside and outside Delphi. In our case, just for reference, the program reached two times the code that raises an Edatabaseerror

procedure DatabaseError(const Message: WideString; Component: TComponent = nil); begin if Assigned(Component) and (Component.Name <> '') then raise EDatabaseError.Create(WideFormat('%s: %s', [Component.Name, Message])) else raise EDatabaseError.Create(Message); end;

After debugging I discovered that the infamous error was created by Delphi as a noncontinuable exception after the Exception.Create constructor but why, remains a mistery

I also tried the proposed solution of leaving the debugger handle the exception but was useless since in our case the exception number changed every time

Upvotes: 0

Wouter van Nifterick
Wouter van Nifterick

Reputation: 24116

Same problem occurred in the office here.

The person facing the problem told me he managed to work around it by telling the debugger to leave error 0xc0000008 up to the app to handle.

/options/Debugger Options/Embarcadero Debuggers/Native OS Exceptions/32bit Windows OS Exceptions/

It occurred with the following configuration:

  • Windows XP
  • Rad Studio XE (Delphi)
  • Just installed Amazon Cloud Drive

Upvotes: 0

Nat
Nat

Reputation: 5453

Your problem could be an Explorer addin that is throwing an exception.

It could be something that adds things to the file context menu, like Tortoise SVN (as an example, I'm not saying that's the culprit), or it could be something creates previews for files or even a trojan or adware.

The file open dialog uses the same code as Explorer to display the file list, so any add in that you have for explorer is also loaded/used for the file open dialog. In explorer, it might throw the exception but not kill anything, but in your program (whilst running in the debugger) you can see it.

How to fix it? Try uninstalling any explorer addins that you know about... If that doesn't work, maybe do a scan for adware and trojans.

Upvotes: 3

Warren  P
Warren P

Reputation: 69082

Set a breakpoint on the line of code that is crashing. Go into the debugger (run the app).

When you hit this line check these things:

  • Evaluate expression Self and make sure it is not nil.
  • Evaluate expression Self.OpenDialog1 and make sure it is not nil.

Also, look for code that frees (destroys) the objects you are working on. If you truly have written no extra code, and have a completely new empty application, then it is very hard indeed to understand how you could have a problem like you describe, on a new fresh project.

Upvotes: 1

Related Questions