Jump to content

DX11 crash, no callstack to help


photo
Go to solution Solved by silent,

Recommended Posts

Hi,

I have an engine crash with no helpful call stack. This only happens when the app is launched with -video_app dx11

image.png.b5374bd6377780762b0899f20fdfadb7.png image.png.9d5405961743e583740a669925e7cd72.png

It works fine with DX12. The crash happens both in debug and release compiled version. Engine DLL is Development.

I tried to add -video_debug 1, but I get a warning: D3D11Ext::init(): debug mode is not supported (why would that be?)

We're surely doing something incorrect, but I can't trace it down, nor find anything suspect on our side. How can you help? (note: SDK 2.18.1 with all your hot fixes). Installed plugins are IG, Syncker, CIGIConnector. The crash happens when a new node is spawn. The content of the node may be important, but I can't find the significant part...

 

EDIT: It looks like the crash is caused by the material graph mesh_blade of the ig_aviation add-on. But why? and why only with DX11? We have no error in the console.

Edited by Amerio.Stephane
Link to comment

Hi Stephane,

The material itself is quite simple and should not cause any crashes. At least we can't reproduce it with fresh 2.18.1 IG project and 2.18.1 Aviation addon.

Also video_debug works just fine (even with development build inisde Editor). I'm not quite sure, but maybe a proper development environment is required for that (installed Visual Studio + Windows SDK).

Here's video_debug output inside the Editor:
image.png

It would be nice to get a small reproduction scene so we can try on our end and confirm that behavior and provide a fix.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

This may indeed may independant of this specific material. Strangely, it appears to be working on another PC. But suddenly, this other PC crashed too:

D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: Index buffer has not enough space! [ EXECUTION WARNING #359: DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL]
ID3D11DeviceContext::DrawIndexed.
	Index buffer has not enough space!
ID3D11DeviceContext::DrawIndexed.
	Index buffer has not enough space!
D3D11 ERROR: ID3D11Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format. [ STATE_CREATION ERROR #192: CREATEPIXELSHADER_INVALIDSHADERBYTECODE]
D3D11 ERROR: ID3D11Device::CreatePixelShader: Shader is corrupt or in an unrecognized format. [ STATE_CREATION ERROR #192: CREATEPIXELSHADER_INVALIDSHADERBYTECODE]

I have no idea how I could debug that :(

EDIT: with DX12, there is no crash, but an endless stream of this message:

ID3D12CommandList::DrawIndexedInstanced.
        The depth stencil sample desc does not match that specified by the current pipeline state.(pipeline state = count 1 quality 0, depth stencil view = count 4 quality 0, ID3D12Resource* = 0x0000017501962EE0:'Multisampled SRAA depth buffer')

EDIT2: How do you set up the debug mode within the editor?  (C++ project) I tried adding -video_debug 1 in the launch script of the editor, but I don't see any Debug info in the editor console, nor in the Engine features list:

---- Engine ----
Version: 2.18.0.1 ver-2.18.0.0-c8fc49a Apr 19 2024
Binary: Windows 64-bit Visual C++ 1900 Release
Engine features: OpenGL4.5 Direct3D11 Direct3D12 Vulkan OpenAL VR OpenVR Varjo Microprofile CustomProxy QuadBuffer Geodetic DoubleCoords HalfTexCoords Development

Edited by Amerio.Stephane
Link to comment
Quote

EDIT2: How do you set up the debug mode within the editor?  (C++ project) I tried adding -video_debug 1 in the launch script of the editor, but I don't see any Debug info in the editor console, nor in the Engine features list:

Yep, basically that's all I did, just added -video_debug 1 to the launch_editor.bat inside the project dir.

These errors unfortunately doesn't really help without a stable reproduction. They are mostly useful as an indicator of that we are found the same error. So far I've tried to load nodes in 2.18.1 from Aviation addon and there is no crashes or whatsoever. Probably I'm missing something crucial here.

 

Quote

ID3D12CommandList::DrawIndexedInstanced.
        The depth stencil sample desc does not match that specified by the current pipeline state.(pipeline state = count 1 quality 0, depth stencil view = count 4 quality 0, ID3D12Resource* = 0x0000017501962EE0:'Multisampled SRAA depth buffer')
 

SRAA is not working in 2.18.x/2.19.x with DX12 / Vulkan APIs. You need to adjust anti-aliasing settings and disable it.

 

Quote

D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: Index buffer has not enough space! [ EXECUTION WARNING #359: DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL]
ID3D11DeviceContext::DrawIndexed.
    Index buffer has not enough space!
ID3D11DeviceContext::DrawIndexed.
    Index buffer has not enough space!
D3D11 ERROR: ID3D11Device::CreatePixelShader: Pixel Shader is corrupt or in an unrecognized format. [ STATE_CREATION ERROR #192: CREATEPIXELSHADER_INVALIDSHADERBYTECODE]
D3D11 ERROR: ID3D11Device::CreatePixelShader: Shader is corrupt or in an unrecognized format. [ STATE_CREATION ERROR #192: CREATEPIXELSHADER_INVALIDSHADERBYTECODE]

That's looks like corrupted shader, but no ideas why. Try to delete shader cache completely and update GPU driver to the latest (Game Ready is recommended). Also that may indicate that memory is being corrupted (also no ideas why). A stable repro would definitely help there.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

This is really hard to track down... So, please pardon in advance if this seems tedious to help us on this too, I understand how hard it can be to walk in the dark here.

So, first, I managed to have the editor run with -video_debug 1 (stupid oversight from me, there was another -video_debug 0 farther in the command line).

In DX11, we have this continuous stream of error with a specific material with AlphaBlend+TwoSided+MultipleEnvironmentProbes. At the moment I can work around it by deactivating the latter.

ID3D11DeviceContext::OMSetRenderTargets[AndUnorderedAccessViews].
	Forcing PS shader resource slot 11 to NULL.

 In DX12, can you explain what can be the cause of the next message. This error is not a continuous flow, but it looks like it is related to the bug  with the material with AlphaBlend+TwoSided+MultipleEnvironmentProbes.

ID3D12Device::CreateGraphicsPipelineState.
        The depth stencil unit or pixel shader expects a Depth Stencil View, but the PSO indicates that none will be bound.
        This is OK, as reads of an unbound Depth Stencil View are defined to return 0; and writes are discarded.
        It is also possible the developer knows the data will not be used anyway.
        This is only a problem if the developer actually intended to bind a Depth Stencil View here.

 

As suggested, I removed all caches and rebuilt all shaders... I can no longer reproduce the crashes, let's cross fingers.

About SRAA+Dx12: is it a known incompatibility of DX12 with SRAA itself, or a bug/limitation in the engine?

 

Link to comment
  • Solution

SRAA is already working in the internal branch and scheduled for 2.19.0.2 / 2.19.1 maintenance release :)

The new two warnings are harmless and you can safely ignore them (the DX12 warning is not really a warning) - they can't really cause crashes or instability.

 

Quote

As suggested, I removed all caches and rebuilt all shaders... I can no longer reproduce the crashes, let's cross fingers.

Yeah, fingers crossed xD

  • Thanks 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...