hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.79k stars 2.12k forks source link

Closing any game crashes the Win32 Debug build #17786

Open Nemoumbra opened 11 months ago

Nemoumbra commented 11 months ago

Game or games this happens in

Not game-specific

What area of the game / PPSSPP

Steps to reproduce: 1) Load any game (I'm using "break on load", but I think it doesn't matter) 2) Make sure your GPU backend is Direct3D11 or Vulcan 3) Ctrl+W or manually click "Stop" 4) image

When I'm using Direct3D9, it doesn't crash. OpenGL causes PPSSPP to explode and I'll report that separately.

What should happen

For some reason I didn't see anything bad happening in the other 3 possible build scenarios. Of course this one is rather special... I hope someone would investigate this as it kind of makes the emulator not usable at all. By the way, this may be related to https://github.com/hrydgard/ppsspp/issues/17077

Logs

This is the top part of the Direct3D11 stack trace:

_aligned_free_dbg(void * block) Line 1968
_aligned_free(void * block) Line 541
[External code] 
GPUCommonHW::~GPUCommonHW() Line 401
GPU_D3D11::~GPU_D3D11() Line 91
[External code] 
GPU_Shutdown() Line 136
PSP_Shutdown() Line 573
EmuScreen::checkPowerDown() Line 1168
EmuScreen::render() Line 1567

When I'm using the Vulcan backend, the trace is almost exactly the same, the only difference is the destructor call. Here it's

GPU_Vulkan::~GPU_Vulkan() Line 198

Platform

Windows

Mobile phone model or graphics card

AMD Radeon(TM) Graphics

PPSSPP version affected

Self-built version (one of the lastest)

Last working version

No response

Graphics backend (3D API)

Direct3D 11

Checklist

hrydgard commented 10 months ago

Can't reproduce this one. Postponing.

Nemoumbra commented 10 months ago

Reproduced again. That's not funny.

hrydgard commented 10 months ago

Well I don't know how to fix it if I can't repro it since I wasn't able to figure it out via code inspection last I looked at it, and if it works in the x64 build, no big deal, since that's what you're supposed to be using anyway...

Thanks for reporting anyway.