Project

General

Profile

Actions

Emulator Issues #12229

open

Paper Mario TTYD Periodically Crashes with DX12

Added by teconmoon about 4 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Paper Mario: The Thousand-Year Door

Game ID? (right click the game in the game list, Properties, Info tab)

G8ME01

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

db9a997a617ee03bbc32336d6945ec02

What's the problem? Describe what went wrong.

Occasionally during battle when attacking or being attacked, the game will crash with a DX12 DXTexture error. In fullscreen mode, the error does not properly display.

What steps will reproduce the problem?

This issue consistently occurs over time, but there's not a specific enemy or move you can perform to consistently cause this crash. I've had this occur in the first battle after loading my save or 10 fights later. The crash always occurs right as an attack lands, whether that's Mario or a partner attacking or you being attacked.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, latest development version is 5.0-12481

Is the issue present in the latest stable version?

The issue doesn't appear to be present in 5.0 stable, although that build was over 4 years ago and a lot has changed. I also tested the last few beta versions (5.0-12247 and 5.0-11991) which also exhibited this issue.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

Unknown

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

N/A

What are your PC specifications? (CPU, GPU, Operating System, more)

CPU: Intel Core i7-3930k
GPU: NVIDIA GeForce GTX 770 (Drivers up-to-date)
OS: Windows 10 Enterprise 2019 LTSC (OS up-to-date)
RAM: 16GB

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Screenshots attached


Files

Crash.PNG (601 KB) Crash.PNG Screenshot of error teconmoon, 08/27/2020 05:02 PM
Crash2.PNG (602 KB) Crash2.PNG Fullscreen example teconmoon, 08/27/2020 06:01 PM
paper mario ttyd dolphin bug.png (1.74 MB) paper mario ttyd dolphin bug.png Same error as above, just adding to show it's the same nextstone, 10/08/2020 01:53 AM
clipboard-202302190845-q7drf.png (1.22 MB) clipboard-202302190845-q7drf.png Wehzuri, 02/19/2023 07:45 AM
vs_console_output.txt (442 KB) vs_console_output.txt pokechu22, 02/20/2023 02:09 AM
Actions #1

Updated by teconmoon about 4 years ago

I have tested all the beta builds listed on the downloads page back to 5.0-11333 and am experiencing the same problem with all the builds. Other back ends don't appear to exhibit this problem, further testing is needed to confirm.

I would just switch to another back end, but I use Parsec to stream my gaming setup and DX12 offers the smoothest performance. All other backends occasionally stutter, but this doesn't appear to be related to shader compilation.

Actions #2

Updated by Techjar about 4 years ago

That is really odd, I don't know how a texture create would fail in this very specific case. Does it happen in any other games?

Actions #3

Updated by teconmoon about 4 years ago

I have not personally experienced this issue with any other title, all my other games chug along quite nicely.

I noticed issue 12227 posted has Skyward Sword crashing with the same error, but the circumstances appear to be a little more duplicatable.

https://bugs.dolphin-emu.org/issues/12227

Actions #4

Updated by nextstone about 4 years ago

Currently using version 5.0-12729, and this issue still occurs very often and in exactly the same cases as described. I came here to report this bug and saw that an issue was already opened, so I figure I'd throw in an update.

Luckily, I quickly learned that when this happens, you can save state right where you are, restart the game, and load the state and it will resume the game normally right where you left off, and then you can save your game to the memory card at the next save block and fully save your data. Obviously it's not a perfect solution, but for the moment it is really nice when you want to make sure you don't lose any progress if you haven't saved in a while.

Actions #5

Updated by Techjar about 4 years ago

Yeah, this is weird though because the Skyward Sword issue only occurs on AMD. I'm not sure it's the same bug. My question is why don't you just use any other video backend in the meantime? All backends should perform equally well for this game, as it doesn't use a lot of draw calls. I personally use Vulkan is my primary backend.

Actions #6

Updated by ZephyrSurfer over 2 years ago

Can you please test this again on the latest Beta?

If that doesn't work then can you test this version below. This is when D3D12 was re-implemented into Dolphin.

5.0-9878 -> https://dolphin-emu.org/download/dev/a2a4694497e71dbe4e033b6bd5f6224bf0af637e/

Actions #7

Updated by StacyAdam over 2 years ago

ZephyrSurfer wrote:

Can you please test this again on the latest Beta?

If that doesn't work then can you test this version below. This is when D3D12 was re-implemented into Dolphin.

5.0-9878 -> https://dolphin-emu.org/download/dev/a2a4694497e71dbe4e033b6bd5f6224bf0af637e/

I get the same bug in the latest beta, and in 5.0-9878. I actually opened a bug report for it.

Actions #8

Updated by Wehzuri almost 2 years ago


Still occurs in 5.0-18700 at random when dealing or receiving damage

Actions #9

Updated by pokechu22 almost 2 years ago

I was able to reproduce this once, but only on dual core. I used the yoshi stampede attack, and then savestated near the start of the animation (after completing all inputs). Loading that savestate produces nondeterministic results, including unknown opcodes and other things that indicate bad fifo behavior, hangs, and once this message.

Dual core in general interacts poorly with TTYD, and I'm not sure how fixable it would be. My basic, flawed understanding of it is that TTYD has some kind of system to detect hangs and reset the graphics system if that happens, and dual core triggers it repeatedly whenever something takes slightly too long; and when it does get reset, that often breaks what's happening in Dolphin (for some reason). But I don't fully understand how that system works or why dual core breaks it.

If you've run into this DX12 crash in single core, please let me know.

Actions #10

Updated by pokechu22 almost 2 years ago

Here's the log in the Visual Studio console when I experienced this. The pertinent part is near the end:

D3D12: Removing Device.
D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
D3D12: **BREAK** enabled for the previous message, which was: [ ERROR EXECUTION #232: DEVICE_REMOVAL_PROCESS_AT_FAULT ]
38:31:203 VideoBackends\D3DCommon\SwapChain.cpp:241 W[Video]: Swap chain present failed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)
38:31:206 VideoBackends\D3DCommon\SwapChain.cpp:241 W[Video]: Swap chain present failed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)
38:31:213 VideoBackends\D3DCommon\SwapChain.cpp:241 W[Video]: Swap chain present failed: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)
38:31:222 VideoBackends\D3D12\DX12Texture.cpp:119 E[Video]: Warning: An error occurred.

Failed to create D3D12 texture resource: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action. (0x887a0005)
Device removal reason: The GPU will not respond to more commands, most likely because of an invalid command passed by the calling application. (0x887a0006)

  Condition: SUCCEEDED(hr)
  File: d:\Source\Core\VideoBackends\D3D12\DX12Texture.cpp
  Line: 119
  Function: Create

Ignore and continue?
38:31:262 Core\HW\ProcessorInterface.cpp:90 I[PI]: Wrote PI_FIFO_RESET: 00000001
38:31:262 Core\HW\ProcessorInterface.cpp:90 I[PI]: Wrote PI_FIFO_RESET: 00000000

and that it seems like the error occurred in DX12::DXContext::ExecuteCommandList but was not detected later. Unfortunately there aren't timestamps, so I can't tell what "an unreasonable amount of time" actually is.

Actions #11

Updated by Anonymous almost 2 years ago

here is information about TDR https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys
if it's triggered, it's very likely the gpu actually is crashed/hung (and not that it just needs a bit more time)

Actions #12

Updated by Wehzuri almost 2 years ago

pokechu22 wrote in #note-9:

I was able to reproduce this once, but only on dual core. I used the yoshi stampede attack, and then savestated near the start of the animation (after completing all inputs). Loading that savestate produces nondeterministic results, including unknown opcodes and other things that indicate bad fifo behavior, hangs, and once this message.

Dual core in general interacts poorly with TTYD, and I'm not sure how fixable it would be. My basic, flawed understanding of it is that TTYD has some kind of system to detect hangs and reset the graphics system if that happens, and dual core triggers it repeatedly whenever something takes slightly too long; and when it does get reset, that often breaks what's happening in Dolphin (for some reason). But I don't fully understand how that system works or why dual core breaks it.

If you've run into this DX12 crash in single core, please let me know.

If the dual core setting you're talking about is "Settings > General > Enable Dual Core (speedup)" then I already had it off.

Actions

Also available in: Atom PDF