Home
Delphi
 

Cry about...
Delphi Troubleshooting


Thread Error: The handle is invalid (6)


Symptom:

When developing a Delphi multi-threaded application the following error is generated when a thread object is first created:

Project XXXX.exe raised exception class EThread with message 'Thread Error: The handle is invalid (6)'.

Cause:

The constructor for TThread is not being called.

Remedy:

In the constructor for your thread class include the line:

inherited Create( True );

or

inherited Create( False );


These notes are believed to be correct for Delphi 6, but may apply to other versions as well.