1

I have a frame that never had any problems before. Now when I am in the Delphi 6 IDE and I try to draw an instance of it on a Form in design mode, the IDE exits immediately without any crash errors, dialog boxes, or Watson style "please report this error" message boxes. I am running on Windows XP and I have never seen the Delphi IDE do this before. The frame doesn't even have any of my custom components on it, just some of the stock Delphi VCL components and a few third party components from a library that I have used without trouble for years. I tried several other frames resident in my project and I can still create those at design time without error.

Note, I did try a complete clean of all project DCUs and rebuilt several Delphi packages for my custom VCL components just in case but those efforts changed nothing.

Does anyone have any tips for diagnosing and fixing this problem?

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
  • 3
    Delete components from the frame one by one until you find the culprit. You may need to do this by text editor in .pas and .dfm of your frame. – David Heffernan Feb 23 '12 at 20:03
  • 3
    This behavior is caused by an unhandled error that escaped Delphi's exception handling, and is caused by Windows (typically DEP). It's to keep whatever the problem is from making the system unstable or unsafe. Without any information other than "I have a frame" (eg., no source for the frame at all, or the form you're trying to use it in), it's pretty hard to tell what exactly might be happening. – Ken White Feb 23 '12 at 20:37
  • Try installing [madExcept](http://www.madshi.net/). It does a good job [catching IDE exceptions](http://help.madshi.net/madExceptInternals.htm). – Leonardo Herrera Feb 23 '12 at 20:39
  • Just in case you haven't tried it yet, please try restarting Delphi and/or rebooting your computer. This has fixed IDE issues for me in the past. – Marcus Adams Feb 23 '12 at 21:56
  • Hint: When I have an application that crashes without any errors, it is always caused by a stack overflow. Of course, YMMV – The_Fox Feb 24 '12 at 08:02

1 Answers1

3

It is possible to configure Delphi to debug itself. You launch a second copy of Delphi, and you might be able to see where in your code, and the only reasonable thing I can assume is that suddenly there is a problem with the code of the third party library components. To locate the source and line number of that crash, the Delphi debugger itself may be of some use.

Simply launch the third party component with Delphi.exe as the host executable (for Delphi 6 and 7), or bds.exe (for more recent Delphi versions). (In the IDE using Run Parameters, in the Host Application, put delphi.exe or bds.exe)

Then once you've located the source of the exception and fixed the code and recompiled the component packages containing that code, your problem may be solved.

Related answer by me

(Note that the madExcept idea is equivalent in that it might also give you a stack traceback to help you find what code is crashing, but in case it doesn't this technique is also valuable to know about.)

Community
  • 1
  • 1
Warren P
  • 65,725
  • 40
  • 181
  • 316