shadps4-emu / shadPS4

PS4 emulator for Windows,Linux,MacOS
https://shadps4.net/
GNU General Public License v2.0
8.97k stars 470 forks source link

[CUSA03173] Bloodborne freezes on death / warping #687

Open Julioevm opened 2 weeks ago

Julioevm commented 2 weeks ago

Hey there,

I've been following the development and testing different builds. The game gets in-game and as of current builds (bb-hacks) also with this build its quite playable. However, theres an issue that keeps happening consistently. Everytime I die, or try to warp to the hunters dream the loading screen freezes. It seems to be always in the same moment, with a list of '[Core.Linker] linker.cpp:InitTlsForThread:358: TLS user malloc called, using std::malloc' errors in the log.

I have to kill the process, it doesn't really crash. And curiously, I can warp from hunters dream to the Yarnham after the hunter first goes to the hunters dream.

I have both AMD cpu and gpu: RX 6650 XT and Ryzen 7 7800X3D.

image image Logs: shad_log.txt

voguelike commented 2 weeks ago

just here to corroborate the report. regardless build or permutations of mods, game files, and configurations, dying or warping causes the game to freeze until the process is manually aborted.

i'm also running amd everything (5700x3d, 6750xt)

jerseydevil1box1 commented 2 weeks ago

im also getting crash on warp but with AMD Ryzen 7 and NIVIDIA Geforce RTX 2060

MaxStive commented 2 weeks ago

I am also get this freeze but on AMD ryzen 7 and Nvidia Geforce RTX 3060ti, maybe, this freeze bound with Ryzen 7

AnimatedG commented 2 weeks ago

Same problem here with AMD ryzen 7 1700x + Gtx 1080ti

mussolitz commented 2 weeks ago

same happens for me on Ryzen 7 3060ti

Ishikudeska commented 2 weeks ago

anytime you warp/die it freezes and crashes. it's due to: [Debug] <Critical> liverpool.cpp:ProcessGraphics:180: Unreachable code! invalid PM4 type 0 So it isn't your hardware. It's a code-based issue (someone please correct me if I'm wrong)

Foul-Tarnished commented 2 weeks ago

Use this build instead https://github.com/rafael-57/bb-hacks-pino/actions/workflows/windows-qt.yml

voguelike commented 2 weeks ago

Use this build instead https://github.com/rafael-57/bb-hacks-pino/actions/workflows/windows-qt.yml

this only helps if your issue is a crash. if you would pay attention to the title of this issue you would see that this is about a freeze on death/warp not a crash which that build unfortunately does not fix. at least not for me.

Foul-Tarnished commented 2 weeks ago

ah well this is a memory corruption or race condition or some more complex issue. Improving accuracy and fixing the emu in general should hopefuly solve this

Le dim. 1 sept. 2024, 00:00, voguelike @.***> a écrit :

Use this build instead https://github.com/rafael-57/bb-hacks-pino/actions/workflows/windows-qt.yml

this only helps if your issue is a crash. if you would pay attention to the title of this issue you would see that this is about a freeze on death/warp not a crash which that build unfortunately does not fix. at least not for me.

— Reply to this email directly, view it on GitHub https://github.com/shadps4-emu/shadPS4/issues/687#issuecomment-2323053512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZVYVBXYPAWA6VK3DMDTUODZUI4GNAVCNFSM6AAAAABNNYUYPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGA2TGNJRGI . You are receiving this because you commented.Message ID: @.***>

rafael-57 commented 1 week ago

I've collected log + call stack, I don't think it's much useful because I don't know where to put breakpoints for this bb_warp_hang.txt

vigor-c commented 1 week ago

I also had the freeze on death and couldn't make it work with the bb-hacks build. But with this other one it works perfectly and I actually get more fps: https://github.com/kotn3l/shadPS4/actions/runs/10583347853.

Julioevm commented 1 week ago

I also had the freeze on death and couldn't make it work with the bb-hacks build. But with this other one it works perfectly and I actually get more fps: https://github.com/kotn3l/shadPS4/actions/runs/10583347853.

And do you have the issue too with newer builds of that user? I have the issue with bb-8, maybe I can try again with bb-5 and check...

vigor-c commented 1 week ago

I also had the freeze on death and couldn't make it work with the bb-hacks build. But with this other one it works perfectly and I actually get more fps: https://github.com/kotn3l/shadPS4/actions/runs/10583347853.

And do you have the issue too with newer builds of that user? I have the issue with bb-8, maybe I can try again with bb-5 and check...

I just tried and it works fine with bb-8. Have you went through this guide: https://docs.google.com/document/d/17WixYgtwTdTeqL0NFKEqVrzCWu7Wr-x7/edit ?

I've also seen that people suggest using this driver version: https://www.amd.com/en/resources/support-articles/release-notes/RN-RAD-WIN-AFMF2-TECH-Preview.html

Another person had it working with the 24.5.1 version.

I also used this mod to add working sounds: https://www.nexusmods.com/bloodborne/mods/34

Julioevm commented 1 week ago

I also had the freeze on death and couldn't make it work with the bb-hacks build. But with this other one it works perfectly and I actually get more fps: https://github.com/kotn3l/shadPS4/actions/runs/10583347853.

And do you have the issue too with newer builds of that user? I have the issue with bb-8, maybe I can try again with bb-5 and check...

I just tried and it works fine with bb-8. Have you went through this guide: https://docs.google.com/document/d/17WixYgtwTdTeqL0NFKEqVrzCWu7Wr-x7/edit ?

I've also seen that people suggest using this driver version: https://www.amd.com/en/resources/support-articles/release-notes/RN-RAD-WIN-AFMF2-TECH-Preview.html

Another person had it working with the 24.5.1 version.

I also used this mod to add working sounds: https://www.nexusmods.com/bloodborne/mods/34

Yes I've tried that, except for those specific driver versions. Might be worth a shot. Thanks.

adjonesey commented 1 week ago

I caught this issue with a debugger attached today - it looks like a deadlock. The game spawns a number of threads while reloading a level (CSCloth among others) and they will randomly hang waiting for mutexes to unlock

image

Julioevm commented 1 week ago

Finally not having issues on death or warph with this build: https://github.com/Foul-Tarnished/shadPS4/actions/runs/10753285567

Foul-Tarnished commented 1 week ago

Yep this build fully fix the random deadlock during loading screen

Le sam. 7 sept. 2024, 23:19, Julio @.***> a écrit :

Finally not having issues on death or warph with this build: https://github.com/Foul-Tarnished/shadPS4/actions/runs/10753285567

— Reply to this email directly, view it on GitHub https://github.com/shadps4-emu/shadPS4/issues/687#issuecomment-2336455041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZVYVBUAXYXAETGAQKY4YTLZVNUVBAVCNFSM6AAAAABNNYUYPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGQ2TKMBUGE . You are receiving this because you commented.Message ID: @.***>

adjonesey commented 6 days ago

The workaround being used for this in hack builds forces reuse of the existing thread pool threads - it's not something we can merge into main. The root cause of the issue appears to be a missed cleanup when the threads are exiting.