[GH-ISSUE #2398] [APP BUG]: Check for Update crashes the application on a fresh config file #806

Closed
opened 2026-02-27 21:08:15 +03:00 by kerem · 2 comments
Owner

Originally created by @Resharcc on GitHub (Feb 10, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2398

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

As requested here.

On a fresh install, the "Check for Update" button will cause a crash due to the updateChannel value being blank.

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"

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.

Mitigation Steps

You can fix this by opening the settings and clicking "Apply". As an update channel is selected by default, it will save the config file with the selected value (instead of being blank).

Reproduction Steps

  1. Delete your existing config file.
  2. Open the application.
  3. Click the "Check for Updates" button

Expected Behavior

The config file is generated with a default value for the updateChannel value.

Specify OS Version

Windows 10

Originally created by @Resharcc on GitHub (Feb 10, 2025). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2398 ### 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 As requested [here](https://github.com/shadps4-emu/shadPS4/issues/1988#issuecomment-2628884668). On a fresh install, the "Check for Update" button will cause a crash due to the `updateChannel` value being blank. 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" ``` 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. ### Mitigation Steps You can fix this by opening the settings and clicking "Apply". As an update channel is selected by default, it will save the config file with the selected value (instead of being blank). ### Reproduction Steps 1. Delete your existing config file. 2. Open the application. 3. Click the "Check for Updates" button ### Expected Behavior The config file is generated with a default value for the `updateChannel` value. ### Specify OS Version Windows 10
kerem closed this issue 2026-02-27 21:08:15 +03:00
Author
Owner

@georgemoralis commented on GitHub (Feb 10, 2025):

reading the log you posted you are using a fork of shadPS4 (PartBB) , your bug can not be reproduced on main emu so i suggest you use the official builds.

<!-- gh-comment-id:2649209909 --> @georgemoralis commented on GitHub (Feb 10, 2025): reading the log you posted you are using a fork of shadPS4 (PartBB) , your bug can not be reproduced on main emu so i suggest you use the official builds.
Author
Owner

@Resharcc commented on GitHub (Feb 10, 2025):

Whoops - my bad. I thought I had double checked to make sure this was reproducible on the latest pre-release version back when I first made my comment.

I should've also double checked to make sure that it was still applicable on the newest release (this was done about a month ago, after all).

<!-- gh-comment-id:2649306272 --> @Resharcc commented on GitHub (Feb 10, 2025): Whoops - my bad. I thought I had double checked to make sure this was reproducible on the latest pre-release version back when I first made my comment. I should've also double checked to make sure that it was still applicable on the newest release (this was done about a month ago, after all).
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#806
No description provided.