[GH-ISSUE #2099] [APP BUG]: Pthread creation errors in Windows 11. #726

Closed
opened 2026-02-27 21:07:48 +03:00 by kerem · 20 comments
Owner

Originally created by @asp28x on GitHub (Jan 8, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2099

Checklist

  • I have searched for a similar issue in this repository and did not find one.
  • I am using an official build obtained from releases or updated one of those builds using its in-app updater.

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

pthread cpp_err

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

Originally created by @asp28x on GitHub (Jan 8, 2025). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2099 ### Checklist - [X] I have searched for a similar issue in this repository and did not find one. - [X] I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater. ### 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] <Critical> pthread.cpp:operator():292: Assertion Failed! Failed to create thread with error -1073741790** [shad_log.txt](https://github.com/user-attachments/files/18350241/shad_log.txt) ![pthread cpp_err](https://github.com/user-attachments/assets/7b06bfdb-4cbf-454f-a53a-c5e4b9cc29bd) ### 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
kerem 2026-02-27 21:07:48 +03:00
Author
Owner

@Hermiten commented on GitHub (Jan 8, 2025):

Can this be cause by the kernel rewrite ?

<!-- gh-comment-id:2578855342 --> @Hermiten commented on GitHub (Jan 8, 2025): Can this be cause by the kernel rewrite ?
Author
Owner

@Tay232 commented on GitHub (Jan 9, 2025):

Also having the same exact issue on any version besides 0.4.0 as well.

<!-- gh-comment-id:2579368032 --> @Tay232 commented on GitHub (Jan 9, 2025): Also having the same exact issue on any version besides 0.4.0 as well.
Author
Owner

@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?

Screenshot 2025-01-11 145632

Same hardware fwiw, 7800X3D and 4070 Super. Had this happen on both 23H2 and 24H2.

<!-- gh-comment-id:2585281656 --> @StepanTaz commented on GitHub (Jan 11, 2025): Last working build for me is [c019b54](https://github.com/shadps4-emu/shadps4-binaries-Windows/releases/tag/Pre-release-shadPS4-2024-12-04-c019b54) and this error pops up in every build since [15ae7a0](https://github.com/shadps4-emu/shadps4-binaries-Windows/releases/tag/Pre-release-shadPS4-2024-12-05-15ae7a0). Likely culprit would be [unity pt1 pr](https://github.com/shadps4-emu/shadPS4/pull/1659), i think? ![Screenshot 2025-01-11 145632](https://github.com/user-attachments/assets/152fd620-8676-4bdb-a8ac-203bf7531679) Same hardware fwiw, 7800X3D and 4070 Super. Had this happen on both 23H2 and 24H2.
Author
Owner

@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.

<!-- gh-comment-id:2597513235 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2600944531 --> @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.
Author
Owner

@TylerJaacks commented on GitHub (Jan 19, 2025):

The only documented solution (excluding reverting shadPS4 back to builds where #1659 was not merged) is to downgrade Windows. Recent versions broke the way we create threads.

Is there a planned code solution?

<!-- gh-comment-id:2600958940 --> @TylerJaacks commented on GitHub (Jan 19, 2025): > The only documented solution (excluding reverting shadPS4 back to builds where [#1659](https://github.com/shadps4-emu/shadPS4/pull/1659) was not merged) is to downgrade Windows. Recent versions broke the way we create threads. Is there a planned code solution?
Author
Owner

@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.

<!-- gh-comment-id:2600962348 --> @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.
Author
Owner

@TylerJaacks commented on GitHub (Jan 19, 2025):

@polybiusproxy what would you need to test, I could do that?

<!-- gh-comment-id:2601037885 --> @TylerJaacks commented on GitHub (Jan 19, 2025): @polybiusproxy what would you need to test, I could do that?
Author
Owner

@xamionex commented on GitHub (Jan 20, 2025):

I'm not willing to upgrade due to personal reasons.

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)

<!-- gh-comment-id:2603084265 --> @xamionex commented on GitHub (Jan 20, 2025): > I'm not willing to upgrade due to personal reasons. 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](https://www.microsoft.com/en-us/software-download/windows11) (I use [vmware](https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion) but if you don't want an account go with [virtualbox](https://www.virtualbox.org/wiki/Downloads?))
Author
Owner

@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

<!-- gh-comment-id:2603088731 --> @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](https://softwareupdate.vmware.com/cds/vmw-desktop/ws)
Author
Owner

@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.

<!-- gh-comment-id:2603091571 --> @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.
Author
Owner

@polybiusproxy commented on GitHub (Jan 20, 2025):

@polybiusproxy what would you need to test, I could do that?

You would have to reverse engineer and debug the kernel to check where things start going wrong.

<!-- gh-comment-id:2603093401 --> @polybiusproxy commented on GitHub (Jan 20, 2025): > [@polybiusproxy](https://github.com/polybiusproxy) what would you need to test, I could do that? You would have to reverse engineer and debug the kernel to check where things start going wrong.
Author
Owner

@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

<!-- gh-comment-id:2603260788 --> @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
Author
Owner

@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.

<!-- gh-comment-id:2603291923 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2603355920 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2603359319 --> @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.
Author
Owner

@TylerJaacks commented on GitHub (Jan 20, 2025):

You will have to remove CFG mitigations on the binary.

<!-- gh-comment-id:2603361002 --> @TylerJaacks commented on GitHub (Jan 20, 2025): You will have to remove CFG mitigations on the binary.
Author
Owner

@Tay232 commented on GitHub (Jan 21, 2025):

You will have to remove CFG mitigations on the binary.

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.

<!-- gh-comment-id:2603413349 --> @Tay232 commented on GitHub (Jan 21, 2025): > You will have to remove CFG mitigations on the binary. 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.
Author
Owner

@asp28x commented on GitHub (Jan 21, 2025):

I have installed Kaspersky, but CFG in Defender was still enabled as by default.

<!-- gh-comment-id:2604838745 --> @asp28x commented on GitHub (Jan 21, 2025): I have installed Kaspersky, but CFG in Defender was still enabled as by default.
Author
Owner

@Hermiten commented on GitHub (Feb 12, 2025):

@asp28x can you tell me if it's still revelant on lastest nigthly build ?

<!-- gh-comment-id:2653642153 --> @Hermiten commented on GitHub (Feb 12, 2025): @asp28x can you tell me if it's still revelant on lastest nigthly build ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#726
No description provided.