Debugging the XE8 IDE as an application
Asked Answered
F

0

2

I've been having an intermittent show-stopping problem with the XE8 IDE ever since I first installed it. Every few times I click the File | Open button, there is a brief pause, then the entire IDE shuts down and vanishes. There's no warning, no OS error message and nothing is recorded in the Windows event log (this is on a system upgraded from Win7 to Win10Pro 64-bit since I installed XE8, btw). Sometimes this happens when the only action I take in the IDE is to click File | Open straight after restarting the IDE from a previous occurrence.

Anyway, the reason I'm posting this q is that I seem to have discovered a v. simple sequence of steps which reproducibly provokes the problem, as follows:

  1. Start the XE8 IDE (I'll refer to this instance as A).

  2. In A, go to Run | Load Process and load and run a second instance of BDS.EXE, which I'll call B.

  3. In B, re-open the last project I was working on. Once it's open, do a File | Close All.

  4. In B, click File | Open

And that's it. B shuts down and disappears, and there's no sign of it when I return to A. This happens whether or not I start B with the /NOCASTALIA switch.

The reason I tried this out in the first place was that I was hoping that the Delphi debugger would be able to catch whatever exception I imagined was causing B's shutdown and thereby throw some light on what is happening.

So what I'm asking is whether anyone can suggest any simple measures so that A can catch whatever happens in B to cause it to vanish? I've tried viewing the CPU in A while B is running, but the entire CPU debugging window sub-menu is greyed out. I've also looked at A's debugger event log, and that shows a couple of "file in use" exceptions as B starts up (obviously they are in use by the A instance), but nothing subsequently.

Update: By a rather laborious process of elimination, I've established that this behaviour is not being caused by any of the IDE's design-time packages. The problem still remains if I remove them all from the list, so that the Install packages pop-up is completely empty. I guess that only leaves the DLLs the IDE itself loads, like the Modelling and Refactoring ones.

Btw, I eliminated the Beyond Compare and CodeSite packages by removing them for the Registry Experts key.

Faucet answered 13/10, 2015 at 15:31 Comment(6)
Sounds like a DLL issue:(Urethritis
@MartinJames: Yes, thanks. I was thinking that the OS would shut down an app if there's an unhandled exception in a DLL it uses, and that's why I was trying this, hoping that the debugger in A would take the place of the OS and catch the exception instead.Faucet
There is exactly the same issue with Delphi XE5.So you might consider to retag your question.Ting
Have you checked the Windows event log for possible entries for DEP (Data Execution Prevention). When the application gets killed by DEP it usually looks as it has just disappeared. Also have you checked your Anti Virus software logs to make sure that Delphi hasn't been killed by it?Zagreus
@SilverWarior: Thanks for the interest. As I say in my q, I've checked the Windows event logs (the Applications, System and Security ones). My AV (F-Secure) knows to ignore stuff in my various Delphi bin directories - in fact XE4 won't start without that exclusion. Somewhere in my BIOS there's a DEP setting - I'll take a look at that next time I reboot. FWIW, I don't get the behaviour in my q with any other XE version.Faucet
Did you perhaps have some shell extensions installed back on Windows 7. If you have it is possible that upgrading to Windows 10 broke them. Now Windows Explorer is made in a way to be able to handle that but Delphi probably isn't. Also have you perhaps tried launching Delphi in Windows 7 compatibility mode?Zagreus

© 2022 - 2024 — McMap. All rights reserved.