BUG: AV May Occur When _ATL_DEBUG_INTERFACES Is Defined in ATL Provider

Article ID: 304417 - View products that this article applies to.
This article was previously published under Q304417
Expand all | Collapse all

SYMPTOMS

An access violation (AV) may occur in the OLE DB Services layer whenever the _ATL_DEBUG_INTERFACES macro is defined within an Active Template Library (ATL) provider. When this occurs, the following error message is usually reported from the OLE DB client application:
"catastrophic failure"

CAUSE

Defining _ATL_DEBUG_QI and _ATL_DEBUG_INTERFACES when writing an ATL provider causes a QIThunk object to be created for each interface requested by way of a QueryInterface() call. The code in the OLE DB services causes the QIThunk to be freed prematurely, and any attempt to use that freed object results in an access violation.

RESOLUTION

Remove the _ATL_DEBUG_XXX definitions from any custom ATL provider that uses the OLE DB services.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

REFERENCES

For additional information on using the OLE DB Provider Templates, see the Platform SDK documentation.

Properties

Article ID: 304417 - Last Review: August 15, 2005 - Revision: 1.4
APPLIES TO
  • Microsoft Visual Studio 6.0 Enterprise Edition
Keywords: 
kbbug kbpending KB304417

Give Feedback