I am not sure how to track down the following crash:
It happens when Unloading a Designtime Package that is used in-house at my company. It is our code, thu
I debugged the designtime package crash in the following manner:
As already noted above, set up Delphi to run itself, using Run Parameters, in the Host Application, the path is c:\path-to-delphi-install\bin\bds.exe
.
Set a breakpoint in the line in function ThreadProc in System.pas.
Open windows.pas, and around line 30,000-33,000 there is a line like this:
function CreateThread; external kernel32 name 'CreateThread';
Set a breakpoint on the line above with F8. Now when anything in the code being debugged invokes that Win32 function, whether via TThread or not, you'll get a breakpoint.