baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.86k stars 1.33k forks source link

Intel driver crash displaying window, on hybrid Intel/Dedicated system #1428

Closed pouleyKetchoupp closed 5 years ago

pouleyKetchoupp commented 5 years ago

Description

Looks like accessing corrupted memory. Exception thrown: Access violation reading location 0x00000000ABCDDCC8.

Here's the callstack when opening the capture with local context:

renderdoc.dll!WGLPlatform::SwapBuffers(GLWindowingData context) Line 87 C++ renderdoc.dll!GLReplay::SwapBuffers(GLWindowingData ctx) Line 3345 C++ renderdoc.dll!GLReplay::FlipOutputWindow(unsigned int64 id) Line 211 C++ renderdoc.dll!ReplayOutput::Display() Line 659 C++ qrenderdoc.exe!CustomPaintWidget::paintEvent::l7::(IReplayController r) Line 94 C++ [External Code] qrenderdoc.exe!ReplayManager::run(int proxyRenderer, const QString & capturefile, std::function<void cdecl(float)> progress) Line 480 C++ qrenderdoc.exe!ReplayManager::OpenCapture::l2::() Line 55 C++

And a different callstack when using remote context on an android device:

renderdoc.dll!WrappedIDXGISwapChain4::Present(unsigned int SyncInterval, unsigned int Flags) Line 542 C++ renderdoc.dll!D3D11Replay::FlipOutputWindow(unsigned int64 id) Line 411 C++ renderdoc.dll!ReplayProxy::FlipOutputWindow(unsigned int64 id) Line 233 C++ renderdoc.dll!ReplayOutput::Display() Line 659 C++ qrenderdoc.exe!CustomPaintWidget::paintEvent::l7::(IReplayController * r) Line 94 C++ [External Code] qrenderdoc.exe!ReplayManager::run(int proxyRenderer, const QString & capturefile, std::function<void cdecl(float)> progress) Line 480 C++ qrenderdoc.exe!ReplayManager::OpenCapture::__l2::() Line 55 C++

Repro steps

Local context:

  1. Open this capture file: android_capture.zip
  2. Select local context
  3. Switch to Mesh Viewer tab
  4. Observe crash (100% repro rate)

Remote context:

  1. Connect an android device
  2. Open this capture file: android_capture.zip
  3. Select remote context and connect to android device
  4. Switch to Mesh Viewer tab
  5. Observe crash (100% repro rate)

Environment

baldurk commented 5 years ago

Can you enable Show External Code in Visual Studio and double check that the callstacks are definitely complete? This looks a lot like a driver crash I've seen recently but you're missing the stack frames in the external DLLs (because VS has 'helpfully' hidden it).

It seems more likely than a bug in both the GL window presentation and D3D11 presentation code, since in both locations it's calling into the system not doing any work inside RenderDoc.

pouleyKetchoupp commented 5 years ago

I've enabled external code and here's the full callstack for the local one:

igd10iumd64.dll!00007ffa1cdb21e1()  Unknown
d3d11.dll!00007ffa3d4634d3()    Unknown
dxgi.dll!00007ffa3f512b3f() Unknown
dxgi.dll!00007ffa3f4e84de() Unknown
dxgi.dll!00007ffa3f4c9b56() Unknown
dxgi.dll!00007ffa3f4b49df() Unknown
nvoglv64.dll!0000000065ea8948() Unknown
nvoglv64.dll!0000000065ed2eb1() Unknown
nvoglv64.dll!0000000065eb3c15() Unknown
nvoglv64.dll!0000000065ed43d3() Unknown
nvoglv64.dll!0000000065fc203d() Unknown
nvoglv64.dll!0000000065fcd6cf() Unknown
nvoglv64.dll!0000000065fe2543() Unknown
nvoglv64.dll!0000000065e7801e() Unknown
nvoglv64.dll!0000000065fa4442() Unknown
nvoglv64.dll!0000000065f842bd() Unknown
nvoglv64.dll!0000000065f83b87() Unknown
nvoglv64.dll!0000000065e89266() Unknown
nvoglv64.dll!0000000065e893d5() Unknown
nvoglv64.dll!0000000065e891be() Unknown
nvoglv64.dll!0000000065e88cb6() Unknown
nvoglv64.dll!0000000065e71fec() Unknown
opengl32.dll!00007ffa23822e9b() Unknown
gdi32full.dll!00007ffa40ae4e0e()    Unknown
    renderdoc.dll!WGLPlatform::SwapBuffers(GLWindowingData context) Line 87 C++
renderdoc.dll!GLReplay::SwapBuffers(GLWindowingData * ctx) Line 3345    C++
renderdoc.dll!GLReplay::FlipOutputWindow(unsigned __int64 id) Line 211  C++
renderdoc.dll!ReplayOutput::Display() Line 659  C++
qrenderdoc.exe!CustomPaintWidget::paintEvent::__l7::<lambda>(IReplayController * r) Line 94 C++
qrenderdoc.exe!std::_Invoker_functor::_Call<void <lambda>(IReplayController *) &,IReplayController *>(CustomPaintWidget::paintEvent::__l7::void <lambda>(IReplayController *) & _Obj, IReplayController * && <_Args_0>) C++
qrenderdoc.exe!std::invoke<void <lambda>(IReplayController *) &,IReplayController *>(CustomPaintWidget::paintEvent::__l7::void <lambda>(IReplayController *) & _Obj, IReplayController * && <_Args_0>)  C++
qrenderdoc.exe!std::_Invoker_ret<void,1>::_Call<void <lambda>(IReplayController *) &,IReplayController *>(CustomPaintWidget::paintEvent::__l7::void <lambda>(IReplayController *) & <_Vals_0>, IReplayController * && <_Vals_1>)    C++
qrenderdoc.exe!std::_Func_impl_no_alloc<void <lambda>(IReplayController *),void,IReplayController *>::_Do_call(IReplayController * && <_Args_0>)    C++
qrenderdoc.exe!std::_Func_class<void,IReplayController *>::operator()(IReplayController * <_Args_0>)    C++
qrenderdoc.exe!ReplayManager::run(int proxyRenderer, const QString & capturefile, std::function<void __cdecl(float)> progress) Line 480 C++
qrenderdoc.exe!ReplayManager::OpenCapture::__l2::<lambda>() Line 55 C++
qrenderdoc.exe!std::_Invoker_functor::_Call<void <lambda>(void) &>(ReplayManager::OpenCapture::__l2::void <lambda>(void) & _Obj)    C++
qrenderdoc.exe!std::invoke<void <lambda>(void) &>(ReplayManager::OpenCapture::__l2::void <lambda>(void) & _Obj) C++
qrenderdoc.exe!std::_Invoker_ret<void,1>::_Call<void <lambda>(void) &>(ReplayManager::OpenCapture::__l2::void <lambda>(void) & <_Vals_0>)   C++
qrenderdoc.exe!std::_Func_impl_no_alloc<void <lambda>(void),void>::_Do_call()   C++
qrenderdoc.exe!std::_Func_class<void>::operator()() C++
qrenderdoc.exe!LambdaThread::process() Line 281 C++
qrenderdoc.exe!QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl LambdaThread::*)(void)>::call(void(LambdaThread::*)() f, LambdaThread * o, void * * arg) Line 136   C++
qrenderdoc.exe!QtPrivate::FunctionPointer<void (__cdecl LambdaThread::*)(void)>::call<QtPrivate::List<>,void>(void(LambdaThread::*)() f, LambdaThread * o, void * * arg) Line 170   C++
qrenderdoc.exe!QtPrivate::QSlotObject<void (__cdecl LambdaThread::*)(void),QtPrivate::List<>,void>::impl(int which, QtPrivate::QSlotObjectBase * this_, QObject * r, void * * a, bool * ret) Line 121   C++
Qt5Core.dll!0000000067e850e1()  Unknown
Qt5Core.dll!0000000067cd1f2f()  Unknown
Qt5Core.dll!0000000067cd6cd1()  Unknown
kernel32.dll!00007ffa422f7974() Unknown
ntdll.dll!00007ffa4479a271()    Unknown

Let me know if there's anything I can investigate to help you.

baldurk commented 5 years ago

Yes I'm almost certain this is the driver bug I've been seeing. If you resolve symbols for d3d11.dll and dxgi.dll I expect you'll see something like this (this callstack is from a D3D11 crash so it's slightly different as it doesn't have stack frames going through nvidia's driver):

    igd10iumd64.dll!00007ff8ec0d1f41()
>   d3d11.dll!NDXGI::CDevice::WaitForFence()
    dxgi.dll!CDXGISwapChain::PrepareWindowedBltCrossAdapterSurface(void)
    dxgi.dll!CDXGISwapChain::PresentImplCore(...)
    dxgi.dll!CDXGISwapChain::PresentImpl()
    dxgi.dll!CDXGISwapChain::Present()

The solution is to update your Intel graphics drivers, as older drivers seem to have a bug that causes crashes with this cross-device present from the nvidia GPU. It's unfortunately not a bug that can be fixed or worked around from RenderDoc's side.

pouleyKetchoupp commented 5 years ago

Thanks! I can confirm it's fixed after updating Intel graphics drivers.