dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
878 stars 45 forks source link

What's new dialog always displaying at launch / settings not saving #275

Closed TheWrathKing closed 10 months ago

TheWrathKing commented 10 months ago

Hello, when the new version (0.7.0) is launched, the "What's new in 0.7.0" dialog box is displayed each time without the possibility to disable it.

Tested in W10.

P.S. Are hints for the toolbar buttons planned with this new Fyne version ?

dweymouth commented 10 months ago

Editing for visibility:

This issue has been resolved on main by periodically saving settings while the app is running and will be in the next release. If you are running into this issue with version 0.7.0, read below for the workaround on how to permanently dismiss the "What's New" dialog.


Hmm... what this is suggesting to me is that Supersonic is not exiting normally. When it quits it saves all its settings, including the last app version number that ran. On startup, if it sees that the settings file lists an old app version (or didn't list it at all, since it's a new config setting), it shows the dialog.

Are you quitting Supersonic by killing it from the Task Manager or something similar by any chance? Do other settings not save properly? (eg switch from grid to list view on the Playlists page and quit - it should remember the setting when it's launched again)

As far as tool tips for the buttons, I would love to add them but unfortunately Fyne still does not support them. You can follow issue #116 for updates, and also the underlying Fyne feature request is linked in there too - feel free to go over and give it a thumbs-up. If it goes too long without getting support in Fyne I'll have to build something custom, but that's a low priority for now.

Edit: You could also check your config file manually - it should be at C:\Users\yourname\AppData\Roaming\supersonic\config.toml. It should start with something like this:

[Application] WindowWidth = 1224 WindowHeight = 877 LastCheckedVersion = 'v0.7.0' LastLaunchedVersion = 'v0.7.0' EnableSystemTray = true CloseToSystemTray = false

TheWrathKing commented 10 months ago

Hello, Thanks for the quick answer.

I quit Supersonic by a click on the windows X button in the title bar.

The settings are not saved anymore whatever the changes are made in the settings dialog. The config.toml is not modified.

I also noticed a ".lock" empty file in the session directory alongside the config file.

Here is the begining of this file :

[Application] WindowWidth = 1239 WindowHeight = 1158 LastCheckedVersion = 'v0.6.0' EnableSystemTray = false CloseToSystemTray = false StartupPage = 'Albums' SettingsTab = 'General' AllowMultiInstance = false MaxImageCacheSizeMB = 50 FontNormalTTF = '' FontBoldTTF = ''

dweymouth commented 10 months ago

That .lock file is definitely indicative of Supersonic not exiting normally (it should only be there when the app is running and deleted on exit), so I'll try to debug on a Windows machine to see if I can reproduce this. But in the meantime, to suppress the dialog, you can manually add LastLaunchedVersion = 'v0.7.0' to your config file, and also bump LastCheckedVersion to v0.7.0 because otherwise it will keep telling you an update is available.

dweymouth commented 10 months ago

I also might add periodic saving of the settings while the app is running, so if it crashes or doesn't exit normally, settings can still be saved. That would close this issue as well

TheWrathKing commented 10 months ago

I did write both 'v0.7.0' settings in the config file and now it's ok, the dialog box is not there anymore but I still can not modify any settings, the config file is not updated anymore. Each time I close the program, the .lock file remains in the session folder.

I did not have this behaviour with any of the previous versions.

dweymouth commented 10 months ago

I cannot reproduce an abnormal exit happening all the time on Windows, but I can get it sometimes, depending on the timing of other background actions. So #277 would solve this completely, but you can also manually edit the settings file if you need to in the meantime. Also launching Supersonic from the command line could capture some debugging logs or crash stack trace.

dweymouth commented 10 months ago

This is resolved by #277 for the upcoming release