mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[GH-ISSUE #2581] [APP BUG]: #849
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#849
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 @Pibster on GitHub (Mar 2, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2581
Checklist
Describe the Bug
shadPS4 emulator update feature crashes to desktop
Reproduction Steps
The emulator is set to "check nightly build". It will download the updated zip file, and the new powershell script, but when I hit "ok to update", the emulator crashes with no log files or errors generated.
https://github.com/user-attachments/assets/31a1e440-38a5-4b85-bcf6-840af66e7781
https://github.com/user-attachments/assets/ea1671b6-e808-4618-bc10-347dac956c19
Attached file 1.mp4 shows that temp_download_update.zip and update.ps1 get downloaded to my hard drive.
The script never executes after that.
Attached file 2.mp4 show me running the script manually in powershell and it works.
Expected Behavior
Expected behavior - Click Ok to update should update shadPS4.
I have tried everything I can think of to troubleshoot this:
I have deleted all antivirus software (yes, I rebooted the pc after deletion)
I have turned on all logging within shadPS4. There is no log file generated when it crashes.
I have turned on powershell event logging. No errors are generated. (It looks like the powershell script never gets invoked). There is also no errors of any kind in the Windows event viewer. Anywhere.
I have checked the pc registry to confirm the powershell registry entries are correct.
I have reinstalled powershell just to confirm powershell is installed correctly.
I have upgraded to powershell 7.5 to eliminate powershell itself as the issue. (I have since removed it. It's not the issue.
I have tried changing the execution policy of the PC to allow all scripts and it still fails.
Because the update.ps1 script downloads fresh on every update, I have no way to insert some debug code into the script itself, as it just gets overwritten, so my visibility is limited.
If you watch the first video(file1.mp4), you'll see that the files never get unzipped (the expand-archive cmdlet), but when I do it manually it all works as designed.(see file 2.mp4)
What I need to know is , what exactly is kicked off in the code when I hit "Ok"? I assume it then tries to execute the update.ps1 script.
I'm reporting this here as it looks like a bug to me.
Specify OS Version
Windows 11
@DanielSvoboda commented on GitHub (Mar 2, 2025):
before anything, install this and try again:
https://aka.ms/vs/17/release/vc_redist.x64.exe
IF it doesn't work try to update your Powershell correctly, you can use this command in cmd:
winget install --id Microsoft.Powershell --source wingetDownload this 'action' and set it to 'nightly', and try to update:
https://github.com/DanielSvoboda/shadPS4/actions/runs/13618863790
@Pibster commented on GitHub (Mar 2, 2025):
Daniel,
Step 1. I installed the vc_redist.x64.exe and rebooted. No change.
Step 2. I updated Powershell per your instructions. No change. (see attached powershell screenshot)
Step 3. I don't really understand the ways of Github. I see where you created a fork and modified the update process a bit, but I'm not sure I'm downloading the file correctly.
I clicked on fix_update, and then on the right I clicked on the green code button and selected download zip.
I downloaded shadPS4-fix_update.zip and unzipped it into my current shadps4 install.
Did I botch it or do it correctly?
The end result was no change, but I'm like 90% thinking I did not do this correctly.
@DanielSvoboda commented on GitHub (Mar 3, 2025):
Download it here, you should be able to download it directly: *you can replace or put in a new folder
https://github.com/DanielSvoboda/shadPS4/actions/runs/13618863790/artifacts/2678123108
The only change I made was to change the name of the process, removing the .exe, maybe it will help to find the correct executable...
I really don't know what might be happening, but this is an attempt
@Pibster commented on GitHub (Mar 3, 2025):
I downloaded it, but it did not work.
I'm going to close out this bug report. This is clearly a problem with my pc, and not with shadPS4. I seem to be the only one with the issue. I now have a better understanding of the shadPS4 script kickoff code anyway, so I'll figure this out eventually.
Thanks for all the help.
@DanielSvoboda commented on GitHub (Mar 3, 2025):
OK, do as you prefer.
The script does the following: the emulator saves the ps1 and asynchronously calls the ps1 file with the QProcess::startDetached command, asynchronous because as soon as it is called the emulator is also closed with exit(EXIT_SUCCESS), because the ps1 will change the emulated files, so it has to be closed for this.
Theoretically it should open a powershell screen, but what I see in Win10 is the execution in the emulated console itself, as shown in the image. And in your video you can see that everything is closed, including the emulator console.
The file is being created correctly and works, but the problem may be when closing or calling this script.
@DanielSvoboda commented on GitHub (Mar 3, 2025):
If possible, test running the emulator as an administrator. If the update works, it may be some permission that your PowerShell is requiring. Or maybe changing the policy with this command might solve it:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser@Pibster commented on GitHub (Mar 3, 2025):
I reopened this issue. Sorry for being all over the place. I was convinced this was my PC issue.
I was able to prove that Powershell will open via another program (in this case I used python).
So, it is not my pc after all, although why nobody else has this issue I have no idea.
https://github.com/user-attachments/assets/9d17d136-65a4-4ae4-a261-654dffe46083
I don't believe this is an execution policy issue, as it never gets to the point where the Powershell window opens and says "starting update" (also I changed the execution policy at one point to allow all scripts. no difference)
Probably what I need to confirm where this is going wrong is to have the update process just open a powershell window only. No update script. I just need to confirm a powershell window opens at all.
@DanielSvoboda commented on GitHub (Mar 3, 2025):
Do a test with this one: https://github.com/DanielSvoboda/shadPS4/actions/runs/13642508536/artifacts/2685243566
I set it to open powershell in a separate window so it doesn't close with the emulator, and at the end I force close this window.
@Pibster commented on GitHub (Mar 4, 2025):
https://github.com/user-attachments/assets/9acf0d6e-e0cc-4469-868f-2f4438378762
No good. I'm guessing it must be crashing before it hits the line to open Powershell in a separate window.
@Pibster commented on GitHub (Mar 5, 2025):
Another interesting clue. When trying to upgrade my Nvidia drivers to the latest and greatest, the file unpacks, and then dies and then deletes the temporary folder it unpacked into.
So my conclusion here is that some process on my PC is probably killing it. I'm leaning more and more into this issue with shadPS4 is not a bug, but something on my PC that is killing it.
I'm going to download Sysinternals Suite and see if I can figure this out.
I'll either update again here in a few days, or just close this issue out.
@DanielSvoboda commented on GitHub (Mar 5, 2025):
I also think it's something with your PC and not something with the emulator.
If you use an antivirus or firewall, this may be affecting it.
What I recommend is to try updating Windows, and then the other programs using this command:
winget upgrade --all@Pibster commented on GitHub (Mar 5, 2025):
winget upgrade --all did not fix the issue, but I did upgrade a lot of stuff, so there's that. :)
Anyway, I think I've spent as much time on this as I'm willing to spend. I do have a workaround, which is to put a shortcut to the update.ps1 script on my desktop and occasionally I'll just click on it and go to Run With Powershell.
Thanks for all the help.