Since Stack Overflow is not a personal debugging service, I'm not going to look too closely at your code. Instead, I'm going to explain how to debug this yourself. That way, this answer will be useful to other people, too, and the question won't have to get closed a "too localized."
To debug this, as you debug anything, use the debugger. This is design-time code, though, and your program isn't even running, so where does the debugger come into play? In this case, the program running your code is the IDE, so attach the debugger to the IDE.
Run Delphi, and open the package project that contains your component. Set the project options so that the "host program" is delphi32.exe, or whatever the EXE name of your Delphi version happens to be.
Run your package project. A second copy of Delphi will start running. In that second copy, reproduce the problem you're trying to solve. (I.e., make the second instance of Delphi hang.) Use the first copy to debug the second copy. Pause execution, look at the call stack, check variables, set breakpoints, and generally do whatever you'd normally do to debug a problem.
You'll be a bit crippled in this job because you don't have the source code or debugging symbols for the internal Delphi code. For the purposes of this task, though, it's best to assume the problem you're seeking is in your code anyway, so the missing code shouldn't be too big a problem.