microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
6k stars 2.02k forks source link

Weird Issue while recording and executing command list #803

Closed cpyburn closed 1 year ago

cpyburn commented 1 year ago

While recording a command list in game.cpp render() method, all the command list code works, no issues that I know of, but I hit a limit where if I add one more line of code in recording the command list the game crashes. If I leave in the line that was added that made the game crash, and remove a line of code above it the game runs fine. I have tested this when several varieties of command lists and the same thing happens every time. Have you seen this behavior or know what the issue is? If I off load the command list recording to another class, it works without crashing. Here is the console output when it happens. I am wondering if I upgrade to VS 2022 if the issue will go away? I have tried this on multiple machines as well.

The thread 0x4890 has exited with code 0 (0x0). Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: _com_error at memory location 0x000000D6708F8D90. Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: _com_error at memory location 0x000000D6708F9108. Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: _com_error at memory location 0x000000D6708F9ED0. Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: _com_error at memory location 0x000000D6708FA2F0. Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: DX::com_exception at memory location 0x000000D6708FAC98. Exception thrown at 0x00007FF9C59FCD29 in TestGame.exe: Microsoft C++ exception: DX::com_exception at memory location 0x000000D6715FDB70. TerrainManagerPhysx taskTerrain exception 0: 0 onecore\windows\feedback\core\werdll\lib\reportstore.cpp(618)\wer.dll!00007FF9C31ACD7F: (caller: 00007FF9C31FAB5A) LogHr(1) tid(5078) 80004001 Not implemented Msg:[CReportStore::Prune: MaxReportCount=500 MaxSizeInMb=0] [CReportStore::Prune]

cpyburn commented 1 year ago

Figured out that the issue was with multithreading