Please enable JavaScript to view this site.

Thread Validator Help

 

Waiting for a program

 

Waiting for a program is essentially the same as injection except that instead of injecting into a running program, Thread Validator watches for the process starting up and then injects.

 

noteIf the process is a service, Thread Validator won't be able to attach to it as services can't have process handles opened by third party applications, even with Administrator privileges.

 

Wait for Application can be accessed by one of these methods:

 

menu File menu instructionStep Wait for Application... instructionStep shows the Wait for application wizard or dialog below

 

Or click on the Wait (timer) icon on the session toolbar.

 

 toolbar-wait

 

Or use the shortcut:

 

 b_f2  Wait for application

 

 

Administrator privileges

 

The following applies only if you did not start Thread Validator in administrator mode.

 

When choosing the 'wait for program' method described in this topic, a restart of Thread Validator with administrator privileges will be required to proceed.

 

This is the case whether you are in Wizard or Dialog user interface mode.

 

wait-admin-privileges-in-any-mode

 

 

Waiting for a service?

 

If your process is a service, Thread Validator won't be able to attach to it.

 

Services can't have process handles opened by third party applications, even with Administrator privileges.

 

In order to work with services, you can use the NT service API and monitor the service

 

 

User interface mode

 

There are two interface modes used while starting a program:

 

Wizard mode guides you through the tasks in a linear fashion
 

Dialog mode has all options contained in a single dialog
 

All the options are the same - just located in slightly different places.

 

In this section we'll cover the Wizard mode first and the Dialog mode later.

 

 

The wait for application wizard

 

The first page of the wizard lets you specify the application or choose one that you've waited for previously.

 

start-wait-wizard-application

 

Choose the process and click Next >> for the next page of the wizard.

 

 

Page 1: Choosing the process

 

Application to wait for instructionStep type or Browse to set the application name to launch

 
You can also choose a batch file and the first executable started in the batch file will be launched.

 

Full path instructionStep shows the full path to the process executable in the list
 

Image Name instructionStep shows the short program name without path

 

Reset instructionStep clears the list

 

 

Page 2: Data collection

 

The second page controls when to start collecting information.

 

start-wait-wizard-collect

 

Depending on your application, and what you want to test, you may want to start collecting data as soon as injection has happened, or do it later.

 

If your program has a complex start-up procedure, initialising lots of data, it may be much faster not to collect data until the program has launched.

 

Collect data from application instructionStep if it's the startup Thread you want to monitor, then obviously start collecting data from launch
 

start-application-wizard-collect

 

seeAlsoSee the section on controlling data collection for how to turn collection on and off after launch.

 

 

Summary and starting your program

 

The second page confirms the application and prompts you to start waiting:

 

Wait for Process... instructionStep starts waiting and then injects Thread Validator into the specified process, showing progress status

 

The button changes to show Stop Waiting. Click this to abandon the wait.

 

 

What could go wrong?

 

The program you're waiting for might already be running, in which case you'll be given the option to cancel or attach to the existing process:

 

already-running

 

Timing issues are inherit with injecting into a program as it starts up.

 

This could cause the injection to fail in unpredictable ways and you may see dialogs like that below:

 

inject-into-process-failed1

 

One case when this dialog can occur is if the program needs to run at an elevated privilege and is waiting for the user to give permission via the UAC dialog.

 

Injection may fail for different reasons and you might see the following information dialog showing:

 

messages relating to the specific failure

a selection of reasons why failure might be occurring

some possible solutions to the problem

 

inject-into-process-failed

 

Sometimes retrying a few times might catch a better moment for attaching to the process.

 

seeAlsoIn the general questions see Why might Inject or Launch fail? for troubleshooting launch problems.

 

 

Dialog mode

 

In Dialog mode, all the settings are in one dialog which looks similar to the first page of the wizard above.

 

The option of when to start collecting data, and whether to collect function and line times is at the top, as is the Wait For Process button

 

start-wait-dialog