Applications Using WPF Crash Unexpectedly

Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

Action

You attempt to run a WPF application, or create/modify a WPF project in Visual Studio 2008 or Expression Blend.

Result

The host application (WPF application, Visual Studio, or Expression Blend) crashes unexpectedly.

Cause

The problem occurs because of a debug break exception being thrown by the debug build of Direct3D (d3d9d .dll). This generally occurs when you have installed the DirectX SDK, and have enabled the "Break on D3D9 Error" option in the DirectX Control Panel.

WPF uses Direct3D for graphical operations. WPF calls the IDirect3D9::GetAdapterIdentifier function from Direct3D to get information about the display adapters present on the system. When using the debug version of Direct3D (d3d9d.dll) and the "Break on D3D9 Error" option is selected, the GetAdapterIdentifier function may intentionally throw a debug break exception under certain conditions. If no debugger is attached to the process, it will crash unexpectedly.

Resolution

You can resolve the issue by disabling the debug version of Direct3D. To do this, select DirectX SDK > DirectX Utilities > DirectX Control Panel, and uncheck the "Use Debug Version of Direct3D" or "Break on D3D9 Error" options. 

DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.


TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Eigenschappen

Artikel-id: 967581 - Laatst bijgewerkt: 5 feb. 2009 - Revisie: 1

Feedback