Emulator Issues #8910
closedD3D11 backend crashes very often on Intel drivers
0%
Description
Happens on SMG2 startup, in coin room on Peach's Castle Demo, etc. I bisected and found the change causing the issue is D3D: remove load texture on creation optimization .
Updated by JosJuice about 9 years ago
- Relates to usability changed from Yes to No
"Relates to usability" is for confusing UI and similar things, not crashes and other defects.
Updated by waddlesplash almost 9 years ago
Exporting a dump file via Task Manager produces a 1.2GB file that compresses to ~200MB. Is there any way you could try to reproduce this yourself so I don't have to find a way/place to put that?
Updated by phire almost 9 years ago
I spend a few hours debugging this back before this issue was created.
From memory:
- It only happens on Intel and Microsoft's software renderer. AMD and Nvidia are fine (so chances are it's a bug in our code that AMD/NVidia are working around)
- Stack trace showed the kernel32.dll was panicking when it encountered an invalid heap state during a call to free
- Symbol's for the directx dll suggested it was trying to free a texture at time of the abort.
- Turning on every single memory/heap debugging feature that microsoft supplies didn't reveal any earlier issues that might be corrupting the heap.
Updated by phire almost 9 years ago
Oh, and it appears Intel drivers and the "Microsoft Basic Render Driver" don't crash at the same point.
Here is a stack trace from the crash from SMG2 on startup with Intel. It happens right after the warning screen fades out, before the main title screen shows up.
ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpAnalyzeHeapFailure() Unknown
ntdll.dll!RtlpAllocateHeap() Unknown
ntdll.dll!RtlpAllocateHeapInternal() Unknown
igd10iumd64.dll!00007ffcbfb097eb() Unknown
igd10iumd64.dll!00007ffcbfbf6e30() Unknown
d3d11.dll!CPixelShader::CLS::FinalConstruct(class CContext *,struct CPixelShader::TConstructorArgs const *) Unknown
d3d11.dll!CLayeredObjectWithCLS<class CPixelShader>::FinalConstruct(struct CPixelShader::TConstructorArgs const &,struct _GUID const &,void * *,struct CLayeredObjectWithCLS<class CPixelShader>::SInfo const *) Unknown
d3d11.dll!CLayeredObjectWithCLS<class CPixelShader>::CreateInstance(struct CPixelShader::TConstructorArgs &,void *,void *,struct _GUID const &,void * *,struct CLayeredObjectWithCLS<class CPixelShader>::SInfo const *) Unknown
d3d11.dll!CDevice::CreateLayeredChild(unsigned int,void const *,unsigned __int64,struct ID3D11LayeredUseCounted *,struct _GUID const &,void * *) Unknown
d3d11.dll!NDXGI::CDevice::CreateLayeredChild(unsigned int,void const *,unsigned __int64,struct ID3D11LayeredUseCounted *,struct _GUID const &,void * *) Unknown
d3d11.dll!NOutermost::CDevice::CreateLayeredChild(unsigned int,void const *,unsigned __int64,struct ID3D11LayeredUseCounted *,struct _GUID const &,void * *) Unknown
d3d11.dll!CDevice::CreateAndRecreateLayeredChild<struct SD3D11LayeredPixelShaderCreationArgs>(unsigned int,struct SD3D11LayeredPixelShaderCreationArgs *,struct ID3D11LayeredUseCounted *,struct _GUID const &,void * *,bool) Unknown
d3d11.dll!CDevice::CreatePixelShader_Worker(void const *,unsigned __int64,struct ID3D11ClassLinkage *,void * *,struct _GUID const &,bool) Unknown
d3d11.dll!CDevice::CreatePixelShader(void const *,unsigned __int64,struct ID3D11ClassLinkage *,struct ID3D11PixelShader * *) Unknown
> Dolphin.exe!DX11::D3D::CreatePixelShaderFromByteCode(const void * bytecode, unsigned int len) Line 130 C++
Dolphin.exe!DX11::PixelShaderCache::InsertByteCode(const ShaderUid<pixel_shader_uid_data> & uid, const void * bytecode, unsigned int bytecodelen) Line 588 C++
Dolphin.exe!DX11::PixelShaderCache::SetShader(DSTALPHA_MODE dstAlphaMode) Line 574 C++
Dolphin.exe!DX11::VertexManager::vFlush(bool useDstAlpha) Line 154 C++
Dolphin.exe!VertexManagerBase::Flush() Line 260 C++
Dolphin.exe!LoadXFReg(unsigned int transferSize, unsigned int baseAddress, DataReader src) Line 232 C++
Dolphin.exe!OpcodeDecoder_Run<0>(DataReader src, unsigned int * cycles, bool in_display_list) Line 188 C++
Dolphin.exe!RunGpu() Line 424 C++
Dolphin.exe!CommandProcessor::GatherPipeBursted() Line 345 C++
Dolphin.exe!GPFifo::UpdateGatherPipe() Line 83 C++
000000001ad3d967() Unknown
Here's that same crash with "Microsoft Basic Reference Driver" (I had to restart the driver a few times before I could trigger this, it appears to be more stable than intel)
They both appear to be crashing when allocating memory to compile a shader.
> ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpAllocateHeap() Unknown
ntdll.dll!RtlpAllocateHeapInternal() Unknown
d3d10warp.dll!WarpPlatform::AllocateMemory(unsigned __int64,enum WarpPlatform::AllocationType) Unknown
d3d10warp.dll!TableBaseTempl<unsigned int,0>::SetCapacity(unsigned int,bool) Unknown
d3d10warp.dll!PixelJitOptimizer::RenameVariablesToSSANameSpace(void) Unknown
d3d10warp.dll!PixelJitOptimizer::DoScalarOptimizations(void) Unknown
d3d10warp.dll!PixelJitOptimizer::Run(void) Unknown
d3d10warp.dll!PixelJITProcessor::Initialize(struct ShaderDebugInfo const &) Unknown
d3d10warp.dll!Task_CompileShader(void *,int) Unknown
d3d10warp.dll!Task::ExecuteTask(bool) Unknown
d3d10warp.dll!ThreadPool::WorkCallBack(struct _TP_CALLBACK_INSTANCE *,void *,struct _TP_WORK *) Unknown
ntdll.dll!TppWorkpExecuteCallback() Unknown
ntdll.dll!TppWorkerThread() Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
And a 3rd trace from the same location, this one with Intel again. This time it's trying to allocate a texture
ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpAllocateHeap() Unknown
ntdll.dll!RtlpAllocateHeapInternal() Unknown
d3d11.dll!NOutermost::CDevice::CreateLayeredChild(unsigned int,void const *,unsigned __int64,struct ID3D11LayeredUseCounted *,struct _GUID const &,void * *) Unknown
d3d11.dll!CDevice::CreateTexture2D_Worker(struct D3D11_TEXTURE2D_DESC1 const *,struct D3D11_SUBRESOURCE_DATA const *,int,struct ID3D11Texture2D1 * *,struct SD3D11SharedResourceCreationArgs *,bool,bool,struct ID3D11LayeredUseCounted *) Unknown
d3d11.dll!CDevice::CreateTexture2D(struct D3D11_TEXTURE2D_DESC const *,struct D3D11_SUBRESOURCE_DATA const *,struct ID3D11Texture2D * *) Unknown
d3d11_3SDKLayers.dll!NDebug::CDevice::CreateTexture2D(struct D3D11_TEXTURE2D_DESC const *,struct D3D11_SUBRESOURCE_DATA const *,struct ID3D11Texture2D * *) Unknown
> DolphinD.exe!DX11::TextureCache::CreateTexture(const TextureCache::TCacheEntryConfig & config) Line 171 C++
DolphinD.exe!TextureCache::AllocateTexture(const TextureCache::TCacheEntryConfig & config) Line 1115 C++
DolphinD.exe!TextureCache::Load(const unsigned int stage) Line 643 C++
DolphinD.exe!VertexManagerBase::Flush() Line 217 C++
DolphinD.exe!BPFunctions::FlushPipeline() Line 27 C++
DolphinD.exe!BPWritten(const BPCmd & bp) Line 88 C++
DolphinD.exe!LoadBPReg(unsigned int value0) Line 700 C++
DolphinD.exe!OpcodeDecoder_Run<0>(DataReader src, unsigned int * cycles, bool in_display_list) Line 263 C++
DolphinD.exe!InterpretDisplayList(unsigned int address, unsigned int size) Line 56 C++
DolphinD.exe!OpcodeDecoder_Run<0>(DataReader src, unsigned int * cycles, bool in_display_list) Line 233 C++
DolphinD.exe!RunGpu() Line 424 C++
DolphinD.exe!CommandProcessor::GatherPipeBursted() Line 345 C++
DolphinD.exe!VideoBackendHardware::Video_GatherPipeBursted() Line 247 C++
DolphinD.exe!GPFifo::UpdateGatherPipe() Line 84 C++
DolphinD.exe!GPFifo::CheckGatherPipe() Line 105 C++
DolphinD.exe!GPFifo::Write32(unsigned int value) Line 125 C++
DolphinD.exe!PowerPC::WriteToHardware<2,unsigned int>(unsigned int em_address, const unsigned int data) Line 247 C++
DolphinD.exe!PowerPC::Write_U32(const unsigned int var, const unsigned int address) Line 563 C++
0000000021f2031a() Unknown
And here is a stack trace from peaches castle (At the top of the stairs to the left is the room "How Many Coins?" entering, hitting the box then exiting and repeating usually causes a crash) This one is always appears to be trying to free memory when it crashes.
> ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpLowFragHeapFree() Unknown
ntdll.dll!RtlFreeHeap() Unknown
d3d10warp.dll!WarpPlatform::DestroyPoolAllocator(class MemoryPool * *) Unknown
d3d10warp.dll!DrawQueue::~DrawQueue(void) Unknown
d3d10warp.dll!Task_EndRasterize(void *,int) Unknown
d3d10warp.dll!Task::ExecuteTask(bool) Unknown
d3d10warp.dll!ThreadPool::WorkCallBack(struct _TP_CALLBACK_INSTANCE *,void *,struct _TP_WORK *) Unknown
ntdll.dll!TppWorkpExecuteCallback() Unknown
ntdll.dll!TppWorkerThread() Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
Updated by JosJuice almost 9 years ago
- Has duplicate Emulator Issues #8836: Revision 4.0-6930 crash on SSBM added
Updated by hosode almost 9 years ago
Just a side note, I'm using Intel HD 4600 with the latest drivers on Windows 8.1, and I have not had any crashes with SMG2. Not with latest (November 2015) builds or earlier 2013-2014 builds.
I do believe that there are problems with specific setups, but how much do we know about these crasches circumstance-wise (OS, GPU model, Driver version)?
Updated by waddlesplash almost 9 years ago
phire and I were both testing on Windows 10. I don't recall seeing this problem on Windows 8.1 but I don't have a way to test it anymore.
Updated by JMC4789 almost 9 years ago
This should be fixed by 4.0-8223 -> https://dolphin-emu.org/download/dev/8212f402d4ff827473ad67d1e6a1c8351e505ce0/