Windows HLK "DXGI Gamma Ramps" test crashes

Aliaksei Kaziukovich 0 Reputation points
2023-01-25T08:45:44.4633333+00:00

Hello everyone.

I have a problem running "DXGI Gamma Ramps" test with Windows HLK Studio to test my display miniport driver. When I run it, DXGIGammaVM.exe, which contains tests, crashes with Access Violation (0xc0000005). I can also see the following error in HLK log just before crash log:

clsDXGISwapChain::InitBBViaClear: Clear failed with error 0x0.

However, the WoW64 version of this test ("DXGI Gamma Ramps (WoW64)") completes successfully, and there is no InitBBViaClear error line for it, too. Also, the same issue can be reproduced with "VirtualBox Graphics Adapter (WDDM)" driver, which is installed with Guest Additions (tested under VirtualBox version 7.0.4), and with display miniport driver sample, too

I was able to run DXGIGammaVM.exe with the same flags as HLK Studio does (-LogClean -WHQL -NoCapture) under WinDbg and acquired the following info from exception:

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff6891fb64c (DXGIGammaVM!CBaseOutputTestGroup::SetDefaultGammaControl+0x0000000000000020)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 00000283ed59aafc
Attempt to read from address 00000283ed59aafc
FAULTING_THREAD:  0000132c
PROCESS_NAME:  DXGIGammaVM.exe
READ_ADDRESS:  00000283ed59aafc 
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
EXCEPTION_CODE_STR:  c0000005
EXCEPTION_PARAMETER1:  0000000000000000
EXCEPTION_PARAMETER2:  00000283ed59aafc
STACK_TEXT:  
000000ba`9f1b68b0 00007ff6`891fe054     : 000000ba`9f1bca38 00000000`00000000 00000000`00000000 00000000`ffffffff : DXGIGammaVM!CBaseOutputTestGroup::SetDefaultGammaControl+0x20
000000ba`9f1b68f0 00007ff6`891fd6ca     : 00007ff6`89272e80 000000ba`9f1bca70 000000ba`9f1bca70 000000ba`9f1bca70 : DXGIGammaVM!CGammaCurveTestGroup::TestCurve+0x80
000000ba`9f1bc9e0 00007ff6`8923554e     : 00008e03`00000001 00000000`00000002 0000027f`eb7f3e50 00000000`00000000 : DXGIGammaVM!CGammaCurveTestGroup::ExecuteTestCase+0x1ea
000000ba`9f1bca30 00007ff6`8923256d     : 00000000`00000001 00007ff6`892b1390 000000ba`9f1bcbf0 00000000`00000000 : DXGIGammaVM!CWGFTestFramework::IterateTestCase+0xba
000000ba`9f1bca70 00007ff6`8924cba3     : 00007ff6`892b1390 000000ba`9f1bcb34 0000027f`ed596650 0000027f`ed596650 : DXGIGammaVM!CWGFTestFramework::ExecuteTestCase+0x13d
000000ba`9f1bcaf0 00007ff6`8923aa0d     : 00000000`00000000 00007ff6`892b1390 00000000`00000000 00000000`00000000 : DXGIGammaVM!CWGFTestUIShell::Update+0x633
000000ba`9f1bd000 00007ff6`8923240c     : ffffffff`fffffffe 00007ff6`892b1390 00000000`00000000 00000000`00000000 : DXGIGammaVM!CWGFTestFramework::Update+0x1d
000000ba`9f1bd030 00007ff6`892494fd     : 000000ba`9f1bd080 000000ba`9f1bf638 0000027f`eb783f87 00000000`00000000 : DXGIGammaVM!CWGFTestFramework::Execute+0x38
000000ba`9f1bd060 00007ff6`89200818     : 0000027f`eb783f85 00000000`00000000 00000000`00000000 00000000`00000000 : DXGIGammaVM!WinMain+0x3d
000000ba`9f1bf8a0 00007fff`4f197614     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : DXGIGammaVM!__mainCRTStartup+0x1a0
000000ba`9f1bf960 00007fff`502426a1     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KERNEL32!BaseThreadInitThunk+0x14
000000ba`9f1bf990 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
STACK_COMMAND:  ~0s ; .cxr ; kb
SYMBOL_NAME:  DXGIGammaVM!CBaseOutputTestGroup::SetDefaultGammaControl+20
MODULE_NAME: DXGIGammaVM
IMAGE_NAME:  DXGIGammaVM.exe
FAILURE_BUCKET_ID:  INVALID_POINTER_READ_c0000005_DXGIGammaVM.exe!CBaseOutputTestGroup::SetDefaultGammaControl

For my tests I am using Windows 10 version 2004 VHLK as a controller and Windows 10 Enterprise Evaluation build 19041 as a client.

Are there any methods to analyze this issue further? Right now I have 2 ideas: either DXGIGammaVM.exe x64 has some kind of bug, or, if backbuffer is initialized with driver, there is some problem with allocating this buffer. But it is not clear for me how it is allocated

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,734 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,525 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 43,926 Reputation points
    2023-01-25T17:02:27.21+00:00

    Hello Aliaksei Kaziukovich

    The error c0000005 is specific to a memory access violation by the application that may depend on different factors. From one side, there could be an unlikely issue of memory corruption or hardware issue (such as faulty ram or low power supply) but likely is a software related. In this case, there is a useful article that explains how to troubleshoot the c0000005 errors in applications, by using the tool DebugDiag:

    https://learn.microsoft.com/en-us/previous-versions/troubleshoot/visualstudio/foxpro/c0000005-error-troubleshoot

    --If the reply is helpful, please Upvote and Accept as answer--


  2. Aliaksei Kaziukovich 0 Reputation points
    2023-01-27T14:23:38.1566667+00:00

    For the future searchers: this issue is known to Microsoft and can be bypassed with HLK Filters.

    0 comments No comments