Emulator Issues #6923
closedMario Kart Wii crashes on D3D with EFB2Ram on during lense flare effect
0%
Description
Game Name?
Mario Kart Wii
Game ID?
RMCE01
What's the problem? Describe what went wrong in few words.
Crashes because of sun flair effect.
What did you expect to happen instead?
Stability
What steps will reproduce the problem?
[Don't assume we have ever played the game and know any level names. Be as
specific as possible.]
- Start Leaf Cup (mirrored) > DS Desert Hills
- Dolphin crashes before you get to the first turn
Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
4.0-595
Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
I'm sure this wasn't a problem before.
What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
Win 8 x64, Geforce 660
Are you using the 32 or the 64 bit version of Dolphin?
64
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
[Upload big files to a hosting service and post links here!]
- Works fine in OGL since this effect is not emulated.
- Tried turning off EFB>CPU but the effect remained.
[Do not attach files to this issue. Upload them to another site and
link here. Use imgur.com for images and pastie.org for logs.]
Updated by skidau almost 11 years ago
Does crash occur if you are using EFB 2 Texture?
Updated by JMC4789 almost 11 years ago
- Status changed from New to Questionable
1: The sun flare effect works in OpenGL just fine.
2: It doesn't crash for me in either backend. The sun flare works and there is no crash.
I'm thinking this is highly questionable.
Core i5 3570K, Geforce GTX 760, Windows 7 x64.
btw, the flare effects need EFB2Ram to work, which is probably why it isn't showing up in OGL for you.
Updated by WesaMcDaniel almost 11 years ago
It's an issue, trust me. I know what I'm doing here.
But you're right about OGL, I must have had it set to EFB>Texture when I checked there. And I guess somehow when I went to check EFB>Texture in DX I did something wrong because that DOES turn off the effect and prevents the crash.
Here's what I just did:
Download x64 package from official site
Unpack
Launch Mario Kart (pure defaults)
Navigate to Mirror Grand Prix > Leaf Cup > DS Desert Hills
Start and play race just fine (no sun flair)
Stop emulation
Switch to EFB>Ram
Relaunch game and repeat
Crash at the exact same spot every single time
I'm surprised no one else is seeing this. Let me know what more information I can provide.
Updated by JMC4789 almost 11 years ago
I agree, D3D doesn't seem entirely stable. Skid said it was, and I thought back and remembered something happening to me at one point when playing on my laptop long ago...
Either way, I don't think OGL will crash, I've played a lot of Mario Kart on Wifi + did recording for the Dolphin 4.0 video with EFB2Ram on.
It seems random though, I haven't had an issue yet today. What do I need to do? Is one race enough?
(If you have an issue with the name change just let me know when you update us. Thanks!)
Updated by JMC4789 almost 11 years ago
err, I should say that skid_au is the one who said the behavior would be unpredictable. That was very, very poor wording on my part. I thought D3D worked fine from my testing/playing late last year.
Updated by WesaMcDaniel almost 11 years ago
OGL does not crash with/without EFB>Ram. DX crashes only with EFB>Ram active (sun flair/other effects on).
Happens seconds after you start a race on Mirrored DS Desert Hills. At this exact point: http://imageshack.us/photo/my-images/208/d3zm.png/
Updated by JMC4789 almost 11 years ago
- Status changed from Questionable to Accepted
- Category set to gfx
- Operating system Windows added
Absolutely 100% confirmed. For what its worth, I wasn't using mirror mode, and I think that was my problem.
I really didn't realize the mirrored part was important, I had to use cheats to unlock it.
Updated by JMC4789 almost 11 years ago
Here appears to be the culprit, this panic handler comes up if you do it in vs mode instead of grand prix.
DX11::PSTextureEncoder::EncodeFailed in PSTextureEncoder.cpp at line 1170: map staging buffer
Updated by JMC4789 almost 11 years ago
more info: EFB: Poke Z not implemented (tried to poke z value at (44,16))
Updated by JMC4789 almost 11 years ago
I tried this about a dozen more times. There are indeed multiple error messages.
new one
DX11::PSTextureEncoder::EncodeFailed in PSTextureEncoder.cpp at line 110: map staging buffer (0x887a0005)
Sorry about the delay, I really thought the new message was the EFB Poke one.
Updated by NeoBrainX almost 11 years ago
- Category deleted (
gfx)
0x887a0005 = DXGI_ERROR_DEVICE_REMOVED
Given that the error makes no sense and the error message seems to differ between builds for no reason, something bad is going on here :|
(also btw, Component-Gfx made no sense at all here)
Updated by spenserwhaley almost 11 years ago
I've been told my random crashes with Dolphin (latest build) are related to this issue. I get random freeze/crashes in most of the game I've tried to run. This includes Mario Kart Double Dash. Though I haven't seen a particular effect cause it. (the lens flare effects in Double Dash seem to work fine for me)
On crash, I've seen the map stating buffer error before. I think I got that in Golden Eye 007. I get a different error for GameCube games/in DX9 mode.
Updated by JMC4789 almost 11 years ago
this isn't a new problem, so this isn't related to any of your other crashes, afaik.
Updated by JMC4789 over 10 years ago
Issue 7352 has been merged into this issue.
Updated by spenserwhaley over 10 years ago
After upgrading to a new video card that supports DX11 (my old card only supported DX10) the issue has since gone away.
Updated by JMC4789 over 10 years ago
Issue 7407 has been merged into this issue.
Updated by darknessknightes almost 10 years ago
Invalid Write to 0x50303118, PC= 0x80511544 (infinite code)
Updated by JMC4789 over 9 years ago
Issue 8288 has been merged into this issue.
Updated by JMC4789 over 9 years ago
I think this is the issue you meant to put yourself on :)
Updated by JMC4789 over 9 years ago
I'm setting this to current because it's a pretty big problem when Mario Kart Wii requires EFB Copies to RAM for some effects to work, and on D3D it just crashes.
I wonder if this has something to do with EFB Peeks/Pokes being offset in D3D?
Updated by rodolfoosvaldobogado over 9 years ago
the error is happening because sometimes dx11 is writing to memory a incorrect amount of bytes and that is corrupting the gc/wii memory. I still have to discover where is the error in the algorithm.
Updated by mimimi over 9 years ago
There's a source rectangle with the following dimensions:
left: 304, right: 308, top: 1020, bottom: 1024
In d3d, the rectangle is clamped to the efb size:
correctSrc.ClampUL(0, 0, EFB_WIDTH, EFB_HEIGHT);
which results in height being 492 instead of 4, resulting in that crash.
Thanks rodolfo for tracking it down to writing an incorrect amount of bytes, from there it was easy to find out what's wrong.
Updated by rodolfoosvaldobogado over 9 years ago
:) nice catch I was going to look at that this weekend you save me the work :)
Updated by mimimi over 9 years ago
Now the question is: Can we just remove that?
// Clamp srcRect to 640x528. BPS: The Strike tries to encode an 800x600
// texture, which is invalid.
So i wonder if this "BPS: The Strike" works right now in OpenGL using efb2ram.
Updated by rodolfoosvaldobogado over 9 years ago
Good question we have to found someone with the game to get some testing
Updated by magumagu9 over 9 years ago
See https://github.com/dolphin-emu/dolphin/pull/2169 . I'm not sure clamping is correct, but that fixes the part where clamping increases the height of a rectangle.
Updated by rodolfoosvaldobogado over 9 years ago
you are rigth, it fixes the issue but i don't know if clamping is the correct way to go here i think a hardware test will really help here
Updated by JMC4789 over 9 years ago
- Status changed from Accepted to Fixed
No idea if this is a proper fix, but it's no longer crashing of 4.0-5819 -> https://dolphin-emu.org/download/dev/5dc23a93b6513918f9619990856010de7245c915/