Emulator Issues #4509
closed
Using real XFB emulation with the DX9 renderer causes an integer division by zero (since r7519)
Added by lemuel2010 over 13 years ago.
Relates to performance:
No
Relates to maintainability:
No
Description
What's the problem?
In the DX9 enable XFB CRASH(only DX9).I think from r7486 there is this problem.
Operating system and version:
32-bit or 64-bit:
R7546 Win 7 64bit.
I can reproduce this crash (exception C0000094, division by 0?) using Mamario's Win32 build of r7547 on Windows 7 x86.
To reproduce it (hopefully): run Dolphin, open the GFX configuration window's "Hacks" tab, use Real XFB emulation, close the GFX window, open any game. Or just enable real XFB emulation while a game is running.
I don't think it's the option that crashes it, it seems to be the real XFB emulation code that does it. Thus, it may not really be caused by r7486.
- Status changed from New to Accepted
- Category set to gfx
Okay, I have narrowed down the problem to r7519. Mamario's Win32 build of r7518 does not exhibit that crash, whereas the r7519 build does.
Using a compiled Debug build of r7547, I have the following info:
DX9::FramebufferManager::CopyToRealXFB() calls Dx9::TextureConverter::EncodeToRamYUYV(), which calls DX9::TextureConverter::EncodeToRamUsingShader() with the readStride parameter set to 0. Because of this, the local variable srcRowsPerBlockRow is set to 0. Then it crashes in line 301 of file TextureConverter.cpp in line 301, when it tries an integer division by zero.
- Status changed from Accepted to Work started
- Status changed from Work started to Fixed
I love how helpful lemuel's bug reports are. Too bad we can't ban people from Google Code...
Not tested, but since we don't (and won't, concluding from past experience) receive any feedback, closing as fixed.
Hey, at least this time, he did a good job at catching a regression in Dolphin that was quite easy to reproduce, as opposed to a game issue. I then provided the info that was required for this issue to be narrowed down and fixed... :P
Anyway, I can confirm the crash to be gone as of r7553 (using Mamario's Win32 build).
Also, as far as I tested, the fix doesn't appear to cause additional issues with real XFB emulation in Harry Potter: Chamber of Secrets (although virtual XFB emulation is enough to take care of the flickering). To me, it seems to work as well as before.
Also available in: Atom
PDF