TASEmulators / desmume

DeSmuME is a Nintendo DS emulator
http://desmume.org
GNU General Public License v2.0
3k stars 548 forks source link

Crash when run within VS #322

Closed IceflowRE closed 4 years ago

IceflowRE commented 4 years ago

Exception thrown at 0x00007FFB885D3C16 (nvd3dumx.dll) in DeSmuME-VS2019-x64-Debug.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

nvd3dumx.dll!00007ffb885d3c16()
nvd3dumx.dll!00007ffb885d3ede()
nvd3dumx.dll!00007ffb885d49dd()
nvd3dumx.dll!00007ffb88589bff()
nvd3dumx.dll!00007ffb8858baa3()
ddraw.dll!00007ffb996f6152()
ddraw.dll!00007ffb996ee766()
ddraw.dll!00007ffb996ee0f3()
ddraw.dll!00007ffb996fe33a()
DeSmuME-VS2019-x64-Debug.exe!DD_FillRect(IDirectDrawSurface7 * surf, int left, int top, int right, int bottom, unsigned long color) Line 287
at desmume\desmume\src\frontend\windows\display.cpp(287)
DeSmuME-VS2019-x64-Debug.exe!DD_DoDisplay() Line 538
at desmume\desmume\src\frontend\windows\display.cpp(538)
DeSmuME-VS2019-x64-Debug.exe!DoDisplay() Line 725
at desmume\desmume\src\frontend\windows\display.cpp(725)
DeSmuME-VS2019-x64-Debug.exe!displayProc() Line 598
at desmume\desmume\src\frontend\windows\display.cpp(598)
DeSmuME-VS2019-x64-Debug.exe!displayThread(void * arg) Line 622
at desmume\desmume\src\frontend\windows\display.cpp(622)
DeSmuME-VS2019-x64-Debug.exe!thread_wrap(void * data_) Line 145
at desmume\desmume\src\libretro-common\rthreads\rthreads.c(145)
[External Code]

This happens only when i run it from within Visual Studio.

Windows 10 1909 Visual Studio 16.5.3 Nvidia 445.75

zeromus commented 4 years ago

clearly bugs in your GPU driver. You can't expect them to support directdraw very well. Change config > display method if it's frustrating your debugging. There's also possibly a very old lurking bug (in desmume or bug in driver that's brought out by quirks in desmume's opengl renderer) which can destabilize the gpu driver. So this problem might go away if you change to softrasterizer. Tip: set softrasterizer cpp file to optimized even in debug mode and you can avoid the speed hit (of course the CPU emulation is still super slow)

IceflowRE commented 4 years ago

Changing Display method to OpenGL, solves this crash.