user3586403
user3586403

Reputation: 107

Delphi IDE hangs after performing Install of Package

I am trying to install a commercial Package by loading the DPROJ file, Compiling it (succeeds) and then Installing. When I try to Install, the compile progress box appears for an instant, and then the IDE becomes unresponsive. It is not using significant CPU resources, so it is not in a tight loop.

How do I go about attempting to diagnose what the problem is?

Upvotes: 1

Views: 366

Answers (1)

Mason Wheeler
Mason Wheeler

Reputation: 84540

This really isn't much to go on--it would really help if we knew the name of the package and which version of Delphi you were using--but I'll take a crack at it. At least you've done a good job of describing the problem you're observing. A lot of new users don't even do that much.

You said you were able to compile. I hope that means this came with source. If not--if you got a commercial, DCU-only library--you've been ripped off. Call up the people who created it and take them to task over it.

But let's assume you have source code. If so, this problem is actually fairly easy to track down. Here's what you do:

  • Open two copies of Delphi, load the package into both of them, and compile. Make sure debug info is turned on.
  • In one copy, try to install the package. Wait for it to hang.
  • Switch to the other copy of Delphi.
  • In the menu, go to Run->Attach to Process...
  • Attach to the other copy of BDS.exe. (If you can't tell which is which, it's pretty easy: you can't attach to your own process, so it's the one that it'll let you connect to.) This will attach the debugger to the other copy of Delphi.
    • If it doesn't automatically break to the debugger, hit Pause.
  • Switch to the main thread and check out the call stack. If you don't find anything useful, check in other threads.
  • If it's not burning lots of CPU, it's probably hung waiting on a lock somewhere. Look for a call to WaitFor<something>Object(s) in the main thread.

From there, have fun debugging! That's all the help I can give you based on the information available, but it should be enough to get you started.

Upvotes: 10

Related Questions