New stops
We just released a new version of Application Verifier. As part of this release, we added a number of stops to Print Verifier. Unfortunately, we neglected to document these stops in the recent release of App Verifier. By the time we discovered this mistake, it was too late for the doc writers to update the documentation. We will definitely get this rectified in the next release. But in the meantime, we thought we’d publish the documentation for the new stops here.
A020
Application Verifier break message
Async Notify handle returned by RegisterForPrintAsyncNotifications was not released properly
Probable cause
Handle allocated by RegisterForPrintAsyncNotifications function had not been released until the program exited. Most likely, it needs to be released by calling UnRegisterForPrintAsyncNotifications() before exiting.
Troubleshooting Steps
To troubleshoot this stop:
o Determine the routine that called winspool to allocate the handle on its behalf by using the second parameter of this verifier stop.
o Dump the initialization stack trace using the dps command in the debugger.
o Find the first non-winspool and non-vfPrint module name that called vfPrint!VfHookRegisterForPrintAsyncNotifications. This routine is typically found in the 3rd stack frame.
Information displayed by Application Verifier
Parameter 1 - Handle value.
Parameter 2 - Initialization stack trace. Use dps to dump the stack trace if it is not NULL.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A020
Stop code: 032
Severity: Warning
One-time error: no
Error report: None
Log to file: yes
Create backtrace: yes
A021
Application Verifier break message
Attempt to use an invalid handle in UnRegisterForPrintAsyncNotifications.
Probable cause
The handle was not opened by the RegisterForPrintAsyncNotifications Win32 API function.
Troubleshooting Steps
To troubleshoot this stop, view the stack trace of the routine that attempted this action using the 'k' command in the debugger.
Information displayed by Application Verifier
Parameter 1 - Handle value.
Parameter 2 - Not used.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A021
Stop code: 033
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
A022
Application Verifier break message
Attempt to use a closed handle in UnRegisterForPrintAsyncNotifications API function.
Probable cause
An async notify handle was used after it has been closed.
Troubleshooting Steps
To troubleshoot this stop:
o Use the 'k' command in the debugger to view the current stack trace. This will indicate the routine that tried to use the closed handle.
o Use the 'dps' debugger command on the second parameter of the stop to view the stack trace of the routine that closed the handle.
Information displayed by Application Verifier
Parameter 1 - Handle value.
Parameter 2 - Stack trace of the closing. Use dps to dump the stack trace if it is not NULL.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A022
Stop code: 034
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
A023
Application Verifier break message
Third-party function reports failure but increases reference count for input interface.
Probable cause
A third-party method receives interface pointer as input. When such method returns a failure code, the interface reference count should remain the same. But in this case the reference count was increased.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: The %lS method returns %x error code but increases ref count of %lS parameter.
Parameter 1 - Called interface pointer. If NULL, called function is static.
Parameter 2 - Input interface pointer.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A023
Stop code: 035
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
A024
Application Verifier break message
Windows API function reports failure but increases reference count for input interface.
Probable cause
An API method receives interface pointer as input. When such method returns fail code, interface ref count should remain the same. But in this case reference count was increased. Please report this error to Microsoft because it could be a problem in API code.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Parameter 1 - Called interface pointer. If NULL, called function is static.
Parameter 2 - Input interface pointer.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A024
Stop code: 036
Severity: Warning
One-time error: no
Error report: None
Log to file: yes
Create backtrace: yes
A025
Application Verifier break message
IPrintAsyncNotifyChannel contract violation by the operating system.
Probable cause
The platform implementation of IPrintAsyncNotifyChannel violated part of the special contract implied or defined by IPrintAsyncNotifyChannel. IPrintAsyncNotifyChannel has special exceptions to AddRef and Release. This requires that the platform calls OnEventNotify and ChannelClosed with the same pointer value as the channel was created with. Please report this error to Microsoft.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: %s was called with the wrong interface pointer.
Parameter 1 - Actual interface pointer.
Parameter 2 - Expected interface pointer.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A025
Stop code: 037
Severity: Warning
One-time error: no
Error report: None
Log to file: yes
Create backtrace: yes
A026
Application Verifier break message
IPrintAsyncNotifyChannel contract violation by channel consumer.
Probable cause
On bidirectional channels, calling SendNotification, CloseChannel, or making the final Release on the interface pointer relinquishes 'ownership'. After creating the channel and sending the first notification, you cannot call Release until your callback's OnEventNotify is invoked. If either you invoke CloseChannel or get a ChannelClosed notification, then you must not perform the final Release call.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: %s was called, but channel 'ownership' currently belongs to print spooler
Parameter 1 - IPrintAsyncNotifyChannel interface pointer.
Parameter 2 - Not used.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A026
Stop code: 038
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
A027
Application Verifier break message
Race detected during closing of IPrintAsyncNotifyChannel.
Probable cause
This stop indicates that a notification arrives _during_ the call to CloseChannel. If this condition occurs, it may be imposible for the consumer to correctly release the channel.
This stop should not be frequently encountered. It can be prevented by always ensuring a listener is available before a bidirectional channel is created, AND/OR ensuring that no listener can be started before attempting closing a channel that has already sent a notification but not recieved the callback.
Please report this error to Microsoft.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: In function %s, a call is already in progress on a different thread. See help for more info.
Parameter 1 - IPrintAsyncNotifyChannel interface pointer.
Parameter 2 - Thread id of member function called.
Parameter 3 - Thread id of callback event function.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A027
Stop code: 039
Severity: Warning
One-time error: no
Error report: None
Log to file: yes
Create backtrace: yes
A028
Application Verifier break message
Calling a print API that makes network calls on a GUI thread. This can lead to unbound in time UI hangs.
Probable cause
A print API was called that makes network calls on a GUI thread. This can lead to unbound in time UI hangs. Typically such APIs need to be called on a worker thread, with no message pumps.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: %s was called on a thread that is a GUI thread. This can lead to unbound in time UI hangs.
Parameter 1 - HWND of the top-level visible window.
Parameter 2 - Current thread ID.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A028
Stop code: 040
Severity: Warning
One-time error: no
Error report: None
Log to file: yes
Create backtrace: yes
A029
Application Verifier break message
Calling an API that will pop up user interface is Session0.
Probable cause
A call was made to an API that will pop up user interface is Session0.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace using the 'k' command in the debugger.
Information displayed by Application Verifier
Format: The illegal-to-call in Session0 API: %s
Parameter 1 - Not used.
Parameter 2 - Not used.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintAPI
Stop ID: 0000A029
Stop code: 041
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
D02A
Application Verifier break message
A print driver called ExitThread.
Probable cause
A print driver module called ExitThread. When a print driver module calls ExitThread, the thread is exited before any destructors can be called or any other automatic cleanup can be performed. This can lead to undefined behavior. Therefore, print drivers should always return from their thread function.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace by using the 'k' command in the debugger to identify the print driver module and routine that invoked ExitThread.
Information displayed by Application Verifier
Parameter 1 - Not used.
Parameter 2 - Not used.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintDriver
Stop ID: 0000D02A
Stop code: 042
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes
D02B
Application Verifier break message
A print driver called TerminateThread.
Probable cause
A print driver module called TerminateThread. TerminateThread is used to cause a thread to exit. When this occurs, the target thread has no chance to execute any user-mode code. DLLs attached to the thread are not notified that the thread is terminating. The system frees the thread's initial stack. TerminateThread is a dangerous function that should only be used in the most extreme cases.
For example, TerminateThread can result in the following problems:
o If the target thread owns a critical section, the critical section will not be released.
o If the target thread is allocating memory from the heap, the heap lock will not be released.
o If the target thread is executing certain kernel32 calls when it is terminated, the kernel32 state for the thread's process could be inconsistent.
o If the target thread is manipulating the global state of a shared DLL, the state of the DLL could be destroyed, affecting other users of the DLL.
Troubleshooting Steps
To troubleshoot this stop, view the current stack trace by using the 'k' command in the debugger to identify the print driver module and routine that invoked TerminateThread.
Information displayed by Application Verifier
Parameter 1 - Not used.
Parameter 2 - Not used.
Parameter 3 - Not used.
Parameter 4 - Not used.
Additional information
Test Layer: PrintDriver
Stop ID: 0000D02B
Stop code: 043
Severity: Error
One-time error: no
Error report: Break
Log to file: yes
Create backtrace: yes