mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[GH-ISSUE #2099] [APP BUG]: Pthread creation errors in Windows 11. #726
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#726
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @asp28x on GitHub (Jan 8, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2099
Checklist
Describe the Bug
When launching ANY game on QT 0.5.0+ application always crashes with the SAME critical "pthread.cpp"error and after while exits to OS. Note: Running version QT 0.4.0 with same games on the same desktop works without crashes.
Reproduction Steps
from 0.5.0 always the same output error:
[Debug] pthread.cpp:operator():292: Assertion Failed!
Failed to create thread with error -1073741790
shad_log.txt
Expected Behavior
Please fix pthread CRITICAL error to run games without crashing and exiting to OS like in previous version QT 0.4.0
Specify OS Version
Win 11 24H2 26100.2605 1000.26100.36.0, X670E, R7 7800X3D, RTX 4070 Super, 32 GB 6400
@Hermiten commented on GitHub (Jan 8, 2025):
Can this be cause by the kernel rewrite ?
@Tay232 commented on GitHub (Jan 9, 2025):
Also having the same exact issue on any version besides 0.4.0 as well.
@StepanTaz commented on GitHub (Jan 11, 2025):
Last working build for me is c019b54 and this error pops up in every build since 15ae7a0.
Likely culprit would be unity pt1 pr, i think?
Same hardware fwiw, 7800X3D and 4070 Super. Had this happen on both 23H2 and 24H2.
@TylerJaacks commented on GitHub (Jan 17, 2025):
I have a AMD Ryzen 5950X, 64GB RAM, and a RTX 4090, and I am also having this issue and that this build does indeed work for me.
@polybiusproxy commented on GitHub (Jan 19, 2025):
The only documented solution (excluding reverting shadPS4 back to builds where https://github.com/shadps4-emu/shadPS4/pull/1659 was not merged) is to downgrade Windows. Recent versions broke the way we create threads.
@TylerJaacks commented on GitHub (Jan 19, 2025):
Is there a planned code solution?
@polybiusproxy commented on GitHub (Jan 19, 2025):
First I'd have to look into the cause of the error. All we know is that recent versions of Windows broke thread creation.
I can't reproduce the issue as I'm on an old Windows version and I'm not willing to upgrade due to personal reasons.
@TylerJaacks commented on GitHub (Jan 19, 2025):
@polybiusproxy what would you need to test, I could do that?
@xamionex commented on GitHub (Jan 20, 2025):
You probably shouldn't as win11 is just win10 with a coat of paint and more issues (imho)
You should just run a vm with win11 (I use vmware but if you don't want an account go with virtualbox)
@thecatontheceiling commented on GitHub (Jan 20, 2025):
You can get VMWare rather easily without an account using their update endpoint
Here's the latest version for Windows for example:
https://softwareupdate.vmware.com/cds/vmw-desktop/ws/17.6.2/24409262/windows/core/VMware-workstation-17.6.2-24409262.exe.tar
You can view the entire directory tree here
@StevenMiller123 commented on GitHub (Jan 20, 2025):
Regardless of your feelings on the matter, Windows 10 hits end of life later this year. As a result, any typical end user should upgrade to Windows 11 to make sure their device remains secure.
Of course, not meaning this to specifically target anyone on 10. If you've got a reason to stay and know what you're doing, then stay.
@polybiusproxy commented on GitHub (Jan 20, 2025):
You would have to reverse engineer and debug the kernel to check where things start going wrong.
@frxffr commented on GitHub (Jan 20, 2025):
i can confirm i have the same exact issue, i'm on 23h2
may i ask what is the latest version who didn't break thread creation so i can downgrade?
tried downgrading to 22h2 but no luck, gonna try 21h2
@TylerJaacks commented on GitHub (Jan 20, 2025):
if the user who mentioned that the https://github.com/shadps4-emu/shadPS4/pull/1659 is the culprit, that would make sense as there are various pthread changes in this merge. I'm going to try to compile this version and see what is happening.
@TylerJaacks commented on GitHub (Jan 20, 2025):
So I was looking at this https://github.com/winsiderss/phnt/blob/master/ntpsapi.h and there are some changes with 24H2, but I don't think they would make a difference. So the result of this
return NtCreateThread(&native_handle, THREAD_ALL_ACCESS, nullptr, GetCurrentProcess(), &clientId, &ctx, &teb, false);is 0xC0000022 which is an NTSTATUS of STATUS_ACCESS_DENIED, {Access Denied} A process has requested access to an object but has not been granted those access rights.@TylerJaacks commented on GitHub (Jan 20, 2025):
So I fixed, this issue, so it appears that it has to do with a Windows Security migitation that was probably triggered by using the raw Windows NtCreateThread syscall.
@TylerJaacks commented on GitHub (Jan 20, 2025):
You will have to remove CFG mitigations on the binary.
@Tay232 commented on GitHub (Jan 21, 2025):
Man, you're a lifesaver. After weeks of troubleshooting, I removed CFG mitigations for the shadps4.exe, specifically in Windows Defender, and it works like a charm.
@asp28x commented on GitHub (Jan 21, 2025):
I have installed Kaspersky, but CFG in Defender was still enabled as by default.
@Hermiten commented on GitHub (Feb 12, 2025):
@asp28x can you tell me if it's still revelant on lastest nigthly build ?