Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APP BUG]: Checking for updates crashes in a version installed with scoop.sh #1988

Open
1 of 2 tasks
clin1234 opened this issue Dec 31, 2024 · 10 comments
Open
1 of 2 tasks

Comments

@clin1234
Copy link

clin1234 commented Dec 31, 2024

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 clicking on the "Check for updates" button, the program hangs for a few seconds, then crashes.

Reproduction Steps

  1. Click on "Check for updates"

Expected Behavior

No response

Specify OS Version

Windows 11

@Xphalnos
Copy link
Collaborator

Have you tried running it as administrator?

@clin1234
Copy link
Author

Still crashes.

@Missake212
Copy link

Tested on my end and it works as intended

@DanielSvoboda
Copy link
Contributor

Here it is working normally, it must be something specific on your computer.
It could be the lack of visual c++ redistributable, or maybe some antivirus blocked, unsynchronized time.

@clin1234
Copy link
Author

clin1234 commented Jan 1, 2025

If it helps, I installed it via scoop, and ver shows Microsoft Windows [Version 10.0.27764.1000]

@vladmikhalin
Copy link
Collaborator

If it helps, I installed it via scoop, and ver shows Microsoft Windows [Version 10.0.27764.1000]

Installed what exactly?

@vladmikhalin
Copy link
Collaborator

If it helps, I installed it via scoop, and ver shows Microsoft Windows [Version 10.0.27764.1000]

Okay, it does help. We did not add it to the scoop repository and were not notified that someone did so this is not tested.

@vladmikhalin vladmikhalin changed the title [APP BUG]: Checking for updates crashes in 0.5.0 [APP BUG]: Checking for updates crashes in a version installed with scoop.sh Jan 1, 2025
@vladmikhalin
Copy link
Collaborator

One question - did you install shadps4 or shadps4-dev?

@clin1234
Copy link
Author

clin1234 commented Jan 1, 2025

shadps4

@Resharcc
Copy link

Resharcc commented Jan 4, 2025

Just to add onto this - I discovered this problem on a fork and took a quick look into it.

This is due to the updateChannel value having no default value (https://github.com/shadPS4-emu/shadPS4/blob/main/src/common/config.cpp#L46). When a new config file is generated on a fresh install, it's generated without this default value. See the file diff below:

$ diff -r broken-install/ working-install/
Only in working-install/user: addcont
diff -r broken-install/user/config.toml working-install/user/config.toml
9,11d8
< isPS4Pro = false
< BGMvolume = 50
< logFilter = ""
12a10,12
> logFilter = ""
> BGMvolume = 50
> isPS4Pro = false
14,16d13
< isTrophyPopupDisabled = false
< enableDiscordRPC = false
< logType = "async"
18c15,17
< updateChannel = ""
---
> logType = "async"
> enableDiscordRPC = false
> updateChannel = "PartBB"
21a21
> isTrophyPopupDisabled = false
50,53d49
< installDirs = ["F:\\Documents\\Emulators\\ISOs\\PS4"]
< addonInstallDir = "F:\\Documents\\Emulators\\ISOs\\PS4"
< emulatorLanguage = "en"
< mw_width = 1280
55c51
< mw_height = 720
---
> mw_width = 1280
56a53,55
> geometry_x = 276
> gameTableMode = 0
> sliderPosGrid = 0
57a57
> mw_height = 720
59,61c59,60
< sliderPosGrid = 0
< geometry_x = 323
< gameTableMode = 0
---
> installDirs = ["F:\\Documents\\Emulators\\ISOs\\PS4"]
> addonInstallDir = "F:\\Documents\\Emulators\\ps4-back\\user\\addcont"
63c62
< geometry_y = 139
---
> geometry_y = 103
67a67
> emulatorLanguage = "en"

I was able to replicate the problem by deleting a working user config and then generating a new one. You can fix it by clicking "Apply", which will resave the settings with the currently selected Update Channel.

This seems to be because the function which would set this value (https://github.com/shadPS4-emu/shadPS4/blob/main/src/common/config.cpp#L46) is only called when you hit the "Restore Defaults" button.

I'm unsure what the default behaviour here should be - it might be worthwhile to call SetDefaultValues if the file doesn't exist on the file load (https://github.com/shadPS4-emu/shadPS4/blob/main/src/common/config.cpp#L549)? That appears to be where the new config is generated if it doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants