D3D11CreateDevice causes a reading access violation

1

The Code & Question

I'm trying out Microsoft's Application Verifier and hitting a read-access violation on the simple code below. Is this my fault? If not, who should I report this to?

#include <D3D11_1.h>
#pragma comment(lib, "d3d11.lib")

void main()
{
    ID3D11Device* device = NULL;
    D3D11CreateDevice(
        NULL,
        D3D_DRIVER_TYPE_HARDWARE,
        NULL,
        0,
        NULL,
        0,
        D3D11_SDK_VERSION,
        &device,
        NULL,
        NULL);
}

Application Verifier Output

Page heap: pid 0x1034: page heap enabled with flags 0x3.
AVRF: D3D11_Fails_AppVerifier.exe: pid 0x1034: flags 0x81643027: application verifier enabled
First-chance exception at 0x00007FFA4EA681B9 (atiuxp64.dll) in D3D11_Fails_AppVerifier.exe: 0xC0000005: Access violation reading location 0x0000009411813000.


=======================================
VERIFIER STOP 0000000000000013: pid 0x1034: First chance access violation for current stack trace. 

0000009411813000 : Invalid address causing the exception.
00007FFA4EA681B9 : Code address executing the invalid access.
000000940FA5B430 : Exception record.
000000940FA5AF40 : Context record.

WinDBG Callstack

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for vrfcore.dll - 
vrfcore!VerifierStopMessageEx+0x6f4:
00007ffa`48d33a00 cc              int     3
0:000> k
Child-SP          RetAddr           Call Site
00000094`0fa5a1b0 00007ffa`48d39d20 vrfcore!VerifierStopMessageEx+0x6f4
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for verifier.dll - 
00000094`0fa5a510 00007ffa`48c5a9d0 vrfcore!VerifierDisableVerifier+0x948
00000094`0fa5a5a0 00007ffa`54b6a743 verifier!VerifierStopMessage+0xa0
*** ERROR: Module load completed but symbols could not be loaded for vfbasics.dll
00000094`0fa5a640 00007ffa`48cc62d9 ntdll!RtlApplicationVerifierStop+0x103
00000094`0fa5a6a0 00007ffa`48cc8246 vfbasics+0x62d9
00000094`0fa5a700 00007ffa`48cc787e vfbasics+0x8246
00000094`0fa5a790 00007ffa`54af5f42 vfbasics+0x787e
00000094`0fa5a7e0 00007ffa`54af4763 ntdll!RtlRestoreContext+0x182
00000094`0fa5a870 00007ffa`54b330aa ntdll!RtlRaiseException+0xe33
00000094`0fa5af40 00007ffa`4ea681b9 ntdll!KiUserExceptionDispatcher+0x3a
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for atiuxp64.dll - 
00000094`0fa5b658 00000094`1170b0f0 atiuxp64!OpenAdapter10_2+0x12525
00000094`0fa5b660 00000094`0fa5b800 0x00000094`1170b0f0
00000094`0fa5b668 00007ffa`4ea5aa93 0x00000094`0fa5b800
00000094`0fa5b670 00007ffa`4ea55dbe atiuxp64!OpenAdapter10_2+0x4dff
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for aticfx64.dll - 
00000094`0fa5b720 00007ffa`4f18120e atiuxp64!OpenAdapter10_2+0x12a
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for d3d11.dll - 
00000094`0fa5b750 00007ffa`4f3a88c1 aticfx64!OpenAdapter10_2+0x13e
00000094`0fa5b780 00007ffa`4f3a8691 d3d11!D3D11CoreCreateLayeredDevice+0x1ba1
00000094`0fa5b8a0 00007ffa`4f3a85db d3d11!D3D11CoreCreateLayeredDevice+0x1971
00000094`0fa5b900 00007ffa`4f387f3d d3d11!D3D11CoreCreateLayeredDevice+0x18bb
00000094`0fa5ba30 00007ffa`4f387e60 d3d11+0x7f3d
00000094`0fa5ba90 00007ffa`4f3a7c6e d3d11+0x7e60
00000094`0fa5bc60 00007ffa`4f3a81fb d3d11!D3D11CoreCreateLayeredDevice+0xf4e
00000094`0fa5c4c0 00007ffa`4f3a80ad d3d11!D3D11CoreCreateLayeredDevice+0x14db
00000094`0fa5c8a0 00007ffa`4f3a6cf9 d3d11!D3D11CoreCreateLayeredDevice+0x138d
00000094`0fa5c8d0 00007ffa`4f3a73cf d3d11!D3D11CoreCreateDevice+0xb09
00000094`0fa5c910 00007ffa`4f3a730b d3d11!D3D11CoreCreateLayeredDevice+0x6af
00000094`0fa5c960 00007ffa`4f3a7295 d3d11!D3D11CoreCreateLayeredDevice+0x5eb
00000094`0fa5c9d0 00007ffa`4f3a6e61 d3d11!D3D11CoreCreateLayeredDevice+0x575
00000094`0fa5caa0 00007ffa`4f3a7573 d3d11!D3D11CoreCreateLayeredDevice+0x141
00000094`0fa5cb40 00007ffa`4f3a5b7f d3d11!D3D11CoreCreateLayeredDevice+0x853
00000094`0fa5f260 00007ffa`4f3a58e4 d3d11!D3D11CreateDeviceAndSwapChain+0x37f
00000094`0fa5f590 00007ffa`4f3a57ec d3d11!D3D11CreateDeviceAndSwapChain+0xe4
00000094`0fa5f650 00007ffa`4f3a576c d3d11!D3D11CreateDevice+0x14c
*** WARNING: Unable to verify checksum for D3D11_Fails_AppVerifier.exe
00000094`0fa5f6c0 00007ff7`a70b1087 d3d11!D3D11CreateDevice+0xcc
00000094`0fa5f770 00007ff7`a70b175d D3D11_Fails_AppVerifier!main+0x77 [c:\_personalprojects\d3d11_fails_appverifier\main.cpp @ 18]
00000094`0fa5f800 00007ff7`a70b188e D3D11_Fails_AppVerifier!__tmainCRTStartup+0x19d [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 536]
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for kernel32.dll - 
00000094`0fa5f870 00007ffa`540113d2 D3D11_Fails_AppVerifier!mainCRTStartup+0xe [f:\dd\vctools\crt_bld\self_64_amd64\crt\src\crtexe.c @ 377]
00000094`0fa5f8a0 00007ffa`54ab5454 kernel32!BaseThreadInitThunk+0x22
00000094`0fa5f8d0 00000000`00000000 ntdll!RtlUserThreadStart+0x34

My PC's Info

  • Windows 8.1 Pro 64-bit (6.3, Build 9600)
  • AMD Radeon (TM) R9 200 Series
  • AMD Catalyst driver (15.7.1) Up to Date (Last checked 10/15/2015 10:16:39 PM)
graphics
driver
direct3d
ati
application-verifier
asked on Stack Overflow Oct 16, 2015 by Chad

1 Answer

0

App-Verifier no longer detects a read violation after using D3D_DRIVER_TYPE_WARP.

I've contacted AMD. Thanks for the suggestion Chuck Walbourn!

answered on Stack Overflow Oct 17, 2015 by Chad • edited Oct 17, 2015 by Chad

User contributions licensed under CC BY-SA 3.0