Project

General

Profile

Actions

Emulator Issues #8910

closed

D3D11 backend crashes very often on Intel drivers

Added by waddlesplash about 9 years ago. Updated almost 9 years ago.

Status:
Fixed
Priority:
Immediate
Assignee:
-
% Done:

0%

Operating system:
Windows
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

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 .


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #8836: Revision 4.0-6930 crash on SSBMDuplicate

Actions
Actions #1

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.

Actions #2

Updated by MayImilae about 9 years ago

  • Milestone changed from 5.0 to Current
Actions #3

Updated by Anonymous about 9 years ago

crashdump for crashes plz

Actions #4

Updated by Fog about 9 years ago

Is this PR still valid?

Actions #5

Updated by waddlesplash almost 9 years ago

Tested with build 8120. Still valid.

Actions #6

Updated by flacs almost 9 years ago

crashdump for crashes plz

Actions #7

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?

Actions #8

Updated by JMC4789 almost 9 years ago

upload it somewhere.

Actions #9

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.
Actions #10

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
Actions #11

Updated by JosJuice almost 9 years ago

Actions #12

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)?

Actions #13

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.

Actions #15

Updated by waddlesplash almost 9 years ago

Yep, can confirm, this is fixed.

Actions #16

Updated by JosJuice almost 9 years ago

  • Status changed from New to Fixed
Actions

Also available in: Atom PDF