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

The Config Keeps Freezing #1343

Open
Vizxls opened this issue Mar 16, 2025 · 4 comments
Open

The Config Keeps Freezing #1343

Vizxls opened this issue Mar 16, 2025 · 4 comments

Comments

@Vizxls
Copy link

Vizxls commented Mar 16, 2025

Everytime I open whiskey and all that is fine until i try to open configs option and then it just freezes and sometimes crashes. Does anyone have a solution? Sometimes it doesn't even open the configs area (the ones with the arguments and stuff) and freezings resulting in a crash after.

Note: The app I was trying to config was Steam.

@Vizxls Vizxls changed the title Whiskey Config Problem The Config Keeps Freezing Mar 16, 2025
@UeharaYou
Copy link

Same issue, but not limited to Steam. Whiskey freezes when configuring app startup arguments. Bug persists disregarding restarting Whiskey or rebooting macOS.

Version affected: Whiskey 2.3.4(42)
macOS version: 15.4 Beta (24E5228e)

Image

UeharaYou added a commit to UeharaYou/Whisky that referenced this issue Mar 17, 2025
* Fixes App Freeze on Program Configuration view by removing `.toolbar` method (side effect: Program icon removed from top bar).
 - modifying toolbar inside a NavigationStack somehow causes swiftUI into an infinite update loop.

* Mitigated new SwiftLint rule #5263 (Prefer non-optional UTF8 String <-> Data conversion)
UeharaYou added a commit to UeharaYou/Whisky that referenced this issue Mar 17, 2025
* Fixes App Freeze on Program Configuration view by removing `.toolbar` method (side effect: Program icon removed from top bar).
 - modifying toolbar inside a NavigationStack somehow causes swiftUI into an infinite update loop.

* Mitigated new SwiftLint rule #5263 (Prefer non-optional UTF8 String <-> Data conversion)

* Mitigated new SwiftLint rule #5845 (Optional Data -> String Conversion Violation: Prefer failable `String(bytes:encoding:)` initializer)

)
UeharaYou added a commit to UeharaYou/Whisky that referenced this issue Mar 17, 2025
* Fixes App Freeze on Program Configuration view by removing `.toolbar` method (side effect: Program icon removed from top bar).
 - modifying toolbar inside a NavigationStack somehow causes swiftUI into an infinite update loop.

* Mitigated new SwiftLint rule #5263 (Prefer non-optional UTF8 String <-> Data conversion)

* Mitigated new SwiftLint rule #5845 (Optional Data -> String Conversion Violation: Prefer failable `String(bytes:encoding:)` initializer)

)
@UeharaYou
Copy link

UeharaYou commented Mar 17, 2025

It seems that the an infinite loop will be triggered inside SwiftUI by the ProgramView. The memory usage skyrockets and main thread is blocked every time the bug is triggered.

Image

A way to constantly reproduce this bug is to populate the toolbar of the ProgramView, SwiftUI will freeze at every second update, even when just a simple Text element is added. This might be a bug in latest version of macOS (I've encountered the same issue in other apps). Removing the toolbar modification seems evading the issue.

The PR will reimplement the toolbar modification as a quick mitigation to the freezing issue.

UeharaYou added a commit to UeharaYou/Whisky that referenced this issue Mar 17, 2025
* Fixes App Freeze on Program Configuration view by reimplementing program icon toolbar item.
 - `ToolbarItem` is uniquely identifiable and probably cached by SwiftUI internals, mutating its content / use a conflicting id will cause unexpected problems.
 - Now a new `ToolbarItem` will be created when its content updates.

* Removed thread creation when fetching program icons
 - `.task` itself is async.

* Mitigated new SwiftLint rules
@UeharaYou
Copy link

UeharaYou commented Mar 22, 2025

As a workaround before the app is patched, you can change the config directly in plain text at /Users/<MAC_USERNAME>/Library/Containers/com.isaacmarovitz.Whisky/Bottles/<BOTTLE_ID>/Program%20Settings/<WIN_PROGRAM_NAME>.plist, without using Whiskey's config user interface.

@ssebastianoo
Copy link

ssebastianoo commented Mar 25, 2025

As a workaround before the app is patched, you can change the config directly in plain text at /Users/<MAC_USERNAME>/Library/Containers/com.isaacmarovitz.Whisky/Bottles/<BOTTLE_ID>/Program%20Settings/<WIN_PROGRAM_NAME>.plist, without using Whiskey's config user interface.

can you post a config example? nvm i got it:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>arguments</key>
	<string>-forcesteamupdate -forcepackagedownload -overridepackageurl http://web.archive.org/web/20250306194830if_/media.steampowered.com/client -exitsteam</string>
	<key>environment</key>
	<dict/>
	<key>locale</key>
	<string></string>
</dict>
</plist>

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

3 participants