Project

General

Profile

Actions

Emulator Issues #10975

closed

Mario Kart Wii Crashes GPU Driver on DX11, Gives Shader Cache Error (or something)

Added by TheDimensioner almost 6 years ago. Updated over 4 years ago.

Status:
Won't fix
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?

Mario Kart Wii (Currently)

Game ID?

RMCE01

MD5 Hash?

It's a WBFS, so I guess it doesn't count... a6223d2ea931f0da589a04bcd75cd2d7

What's the problem? Describe what went wrong.

So, it's been a long time since I've fully used Dolphin, but I have been keeping up with new features and such. But for about 6 months now, Mario Kart Wii has been crashing my video driver... Sure enough, my GPU is ancient, but that is not happening with other games in the newest builds, although it did happen in older ones, just after ubershaders released.

Before, it would simply give me an error message on some games, saying it couldn't compile shaders on both DX11 and OGL. Then OGL got fixed, and some time later there was a D3D fix, and it was cool. Then I saw the Hybrid XFB report, which is kinda huge, because some of my favourite games required XFB FMVs, and now I could play them with XFB in a faster manner... But Mario Kart Wii just became a "shut in" and now refuses to load in every new build, simply crashing the GPU driver. In the maiden days of hybrid XFB, when I tried to boot it, it would give me a magenta flash (like the one explained on the report), and then crash the driver. The coloring stuff must've been removed on some newer build, 'cause now it simply crashes. It also gives 2 "alert" messages on Windows' Event Viewer, saying "nvlddmkm" stopped responding and recovered. Then there's the error window with the message "DXTexture failed on DXTexture.cpp line 118: Create backing DXTexture".

OGL is working "fine" on current builds, aside from my own GPU not having the current requirements (it goes up to OGL 3.3 only). That's pretty much it.

What steps will reproduce the problem?

Just launching the game on any newer build using DX11...

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

5.0-6789

Is the issue present in the latest stable version?

No

If the issue isn't present in the latest stable version, which is the first broken version?

And as I presumed, it started on a D3D shader related build... 5.0-5417 ShaderGen: Output uint when logic op is enabled for D3D ubershaders (PR 6026)

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

AMD Athlon II X2 240 2.8GHz
NVIDIA GeForce 9600GT 1GB, driver version: 342.01 (2016.12.14, yeah, ancient)
Windows 8.1 Pro
5GB DDR2 RAM

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

Testing some different versions gives a different "line" in the "DXTexture.cpp" error (67 on the earliest)... I don't like to keep crashing my GPU, since it's old and might actually die by doing that XD.


Files

Mario Sunshide crash shaders.7z (14.4 KB) Mario Sunshide crash shaders.7z Shaders of "Sirena Beach" goo shock crash TheDimensioner, 05/01/2019 01:53 AM
Dolphin 2019 04 30 23 00 32 61.mp4 (1.16 MB) Dolphin 2019 04 30 23 00 32 61.mp4 TheDimensioner, 05/01/2019 02:07 AM
Actions #1

Updated by TheDimensioner almost 6 years ago

Forgot to mention, but on the event viewer there's also a Dolphin Application Error, with a "ucrtbase.DLL" as the failed module in the error description. Hope that helps!

Actions #2

Updated by TheDimensioner almost 6 years ago

It's happening on Twilight Princess (GC) as well, but this time it's just the error window right after the camera zooms in on Link and Epona on the start screen... Man, I love Dolphin, and I played most of my favourite GC and Wii games on it, but it's just sad that it's refusing to work properly on this PC once more XD.

Actions #3

Updated by mstreurman almost 6 years ago

The 9600GT doesn't support DX11, and some time ago it became a hard requirement.

Actions #4

Updated by TheDimensioner almost 6 years ago

I see, so it doesn't fallback to DX10 anymore, huh? Well, than nothing can be done regarding this issue XD... I love Dolphin, but I sincerely dislike its politics of "moving with the times", and simply discarding the old. I know it's for a cleaner experience, and I do believe that, because looking at other branches, I saw what a mess it could become if every idea that was ever implemented was kept without much regard. Anyways, thank you for (finally) replying.

Actions #5

Updated by Stenzek almost 6 years ago

  • Assignee set to Stenzek

Wild guess, it's probably the logic op implementation for the D3D backend, which requires both D3D11.1 and WDDM1.2.

I can't remember if I tested it with a forced 10_0 feature level. When I remember/get a chance, I can look into it. Keep in mind some games do rely on correct logic op behavior, I'm not sure if MKWii is one of them. If it does, it should still work (assuming there isn't a bug here), but may not render correctly on 10_0 hardware.

Actions #6

Updated by TheDimensioner almost 6 years ago

Well, thanks for looking into it (when you get the chance XD). I would love to test the new features Dolphin have had since the hiatus of me not using it... I know my hardware might not "get" everything, but I still enjoy trying to see what this PC can and cannot run!

Actions #7

Updated by JMC4789 almost 6 years ago

  • Status changed from New to Won't fix

It appears that we will not be standing down on the D3D11 version bump. Sorry :(

Actions #8

Updated by TheDimensioner almost 6 years ago

Well, I kinda expected that XD. Guess I'll save the older version of Dolphin that still works on this PC, until I can finally replace this old GPU that had seen better days... Thanks for replying!

Actions #9

Updated by JMC4789 almost 6 years ago

  • Status changed from Won't fix to Work started

While rendering my not be correct, apparently the crash can be fixed.

Actions #10

Updated by Stenzek almost 6 years ago

I tried forcing the feature level to 10_0, and things work as expected. I don't have any old DX10 GPUs handy (I'd have to dig around a lot), so I haven't verified this on older hardware.

However, the main change in the commit you bisected to is the output of integers from the pixel shader. I've created a PR (https://github.com/dolphin-emu/dolphin/pull/6965) which disables this behavior when logic op is not supported. If you're still following the thread, you can try it here: https://dl.dolphin-emu.org/prs/pr-6965-dolphin-latest-x64.7z

Please note that as JMC47 said, the rendering may not be correct, but it might solve the GPU reset.

Actions #11

Updated by TheDimensioner almost 6 years ago

Thanks for reopening this! But I just downloaded and tested D3D, and it still crashes... Twilight Princess also crashes the driver now, instead of just giving an error message. Maybe the issue is "older", since I described that versions prior to the driver crash would also give shader related errors on some games, but then later versions would "fix" those games, before the most recent which simply crash. I'll try to dissect a little further, if it's still of interest to fix this!

Actions #12

Updated by TheDimensioner almost 5 years ago

So, it's been a long time since I submitted this issue. But I've been keeping track of Dolphin's changes, and occasionally testing out the new functions. I was surprised that motion plus emulation got implemented recently, and Skyward Sword being my favorite Zelda game, I had to try it out on PC! But, believe it or not, my main computer is still the same from this issue XD. DX11 still crashed my video driver on that dev build. Then I saw that Stenzek released another dev build which mentioned "level 10" support, which is exactly the problem I had when I made this issue! Sadly, instead of not booting games right away, it just reverted to not being able to create certain shaders...

Aside from Mario Kart Wii, there are certain games with very specific animations / textures, that when that classic "stutter" for creating a shader happens, it simply crashes the whole GPU driver, and Dolphin outright. One good example is Super Mario Sunshine, which crashes when there's a "shock" animation, whether from Sirena Beach's blue & yellow goo, or from Pinna Park's "shocking turtles". I managed to work around those issues by using OGL, which miraculously still runs the game at around 30 FPS. But that's not the case for every game.

While I'm now too lazy to go hunting on which dev build this pesty issue begun, I still nourish some hope that Dolphin and this NVIDIA 9600GT will some day come to terms and once again ride the merry-go-round that it's this old AMD CPU, without any major accidents XD.

Actions #13

Updated by Stenzek almost 5 years ago

If it's failing to compile a shader, it should log the source code to Documents\Dolphin Emulator\Dump\Shaders. Can you attach some of the failed shaders here?

Actions #14

Updated by TheDimensioner almost 5 years ago

Well, in the latest build, it seems there's no time to create a "shaders dump" (folders are empty after the crash), since there's no previous "Dolphin error" before the "Dolphin.exe has stopped working" Windows error. The only shader files I could find are inside the "Cache" folder, which I attached here some of the Super Mario Sunshine Sirena Beach goo crash. And a save state of where it happened, if it interests (dev build 5.0-10101):

http://www.mediafire.com/file/98ci9bmac4646bc/GMSE01.7z/file

I had created a "portable.txt" inside the root folder, because I had several other Dolphin documents files from older versions, so I don't know if it relates. I hope it helps with something...

Actions #15

Updated by TheDimensioner almost 5 years ago

Another "interesting" discovery. After deleting those cache files and loading the save state right on the "Nintendo" logo (guess when shaders are being compiled), there's no driver crash, but then, Mario becomes really jittery after the shock:

https://youtu.be/qrnC2z7awJ8

But, loading the state in the same run, just reverts to crashing on touching the goo XD.

Actions #16

Updated by TheDimensioner over 4 years ago

So, CookiePLMonster fixed my issue XD. I always check new Dolphin builds from time to time, and I always downloaded anything with "D3D" on the title. Turns out this one did the trick: 5.0-10738 (PR#8258)

It's weird, really, cause the discussion mentions "DX11.1" and "Windows 7"... I'm using Windows 8.1 (although fairly outdated XD), and my issue was supposed to be related with DX10. Seems my GPU supports DX11 features after all, and whatever Cookie Monster did, fixed all instances where it made the GPU crash, reported up above on this ol' thread.

So, Mario Kart Wii won't crash on boot, Super Mario Sunshine won't crash when Mario gets electrocuted, and Twilight Princess won't crash right at the beginning anymore. This issue can be safely closed (but I hope the issue doesn't arise later on when Dolphin gets "newer", while this GPU only gets older XDXD).

Actions #17

Updated by JosJuice over 4 years ago

  • Status changed from Work started to Fixed
  • Fixed in set to 5.0-10738

Closing it, then.

Actions #18

Updated by Silent over 4 years ago

Interesting! This PR mainly targets Windows 7, but is in fact OS agnostic and checks for OS/driver support for logic ops. Your case proves checks are correct, as it seems like your GPU doesn't support DX11.1 features set fully.

Actions #19

Updated by JMC4789 over 4 years ago

It also will affect early versions of Windows 8, as noted in the pull request.

Actions #20

Updated by TheDimensioner over 4 years ago

Just noticed the "op logic" and "D3D11.1" mentions on Stenzek's comment above, which matches what's on the PR's discussion. So maybe Stenzek's guess was right all along XD.

Actions #21

Updated by TheDimensioner over 4 years ago

Ok... Ok... I jumped the gun. Like they say here in Brazil: "a poor man's happiness has short duration"... Turns out that those games will only work "sometimes". More specifically, only when Firefox is opened in any webpage. And it seems it's only with Firefox, because I tried other browsers too, but they all crash (Internet Explorer actually shows a little bit of the safety screen on Mario Kart before crashing XD). It reminds me when I was desperate to play the PC versions of the old Resident Evil games, where they would only work at normal speed when Firefox or a video was opened (but this time, it works only with the browser).

And, to my dismay, turns out all those older builds, where it also crashed, work like a charm when Firefox is opened (has to have a webpage loaded). But at least only with the most recent version (I guess it's called "Firefox Quantum"), because I had an older one that crashed anyways. Here's a couple of videos to illustrate what happens:

https://youtu.be/lPSa54kqeeE

Since I can't record the exact moment it crashes when Firefox is not opened (can do software recordings only), here's just after, with the driver and Windows errors messages (just like it always was):

https://youtu.be/ZY8TDfRRYsE

But that's really, really weird. I was on YouTube when I first tested this build and all worked fine. But the moment I finished reporting that and configured Dolphin to my liking, the crashes were back. I re-downloaded the build and started clean again, but it crashed. I thought I was going crazy, really XD. Luckily, I found out soon enough that was Firefox that gave me that small sparkle of happiness...

Actions #22

Updated by JosJuice over 4 years ago

  • Status changed from Fixed to Work started
  • Fixed in deleted (5.0-10738)
Actions #23

Updated by TheDimensioner over 4 years ago

Well, I'm officially going crazy. I repeated the same thing I did on the video up there recorded just last week... And the thing that was happening repeatedly, now doesn't.

So, basically, the "Firefox trick" stopped working. I didn't change anything. The GPU driver definitely didn't get updated, no Windows updates, and no Firefox update. I just downloaded the latest dev build with D3D mentions, but it just crashes, as always. Going back to the build from a week ago was when I discovered the craziness XD. At least there's a different .dll mention on the event viewer: "nvwgf2umx.dll". Must be this ancient, never to be updated again driver's fault once more, but I guess I really don't care.

Well, I guess I officially give up on Dolphin ever running properly on this PC again (aside from older revisions). That's just how it goes, really... I'll simply play Wii and Game Cube games where they were meant to be played: on a heavily modded Wii XD.

Actions #24

Updated by JMC4789 over 4 years ago

  • Status changed from Work started to Won't fix

Alright, good luck to you.

Actions #25

Updated by TheDimensioner over 4 years ago

Thanks. But I still wish the best for Dolphin going forward, 'cause I'll definitely come back in the future!

Actions

Also available in: Atom PDF