Since 191 Fan control does not load settings anymore
Nrde opened this issue · 20 comments
Describe the bug
When Fan control starts up with the machine there's a message Could not load configuration. An unexpected error has occurred and has been added to the log file.
The error started with version 191, never occurred before. I have several saved configurations and all of them when loaded, give the same error or are empty.
The fan speed seem to work though when configuration manages to load the controls.
The speeds boxes are visible but had been hidden before.
Is there a log.txt file next to FanControl.exe with recent date entries?
yes, with message:
21.5.2024 17.20.00: System.BadImageFormatException: Duplicate type with name 'Microsoft.Win32.TaskScheduler.��' in assembly 'Microsoft.Win32.TaskScheduler, Version=2.10.1.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da'.
at FanControl.Domain.WindowsSettings.GetRegisterInStartup(TimeSpan& delay)
at FanControl.ViewModels.WindowSettingsViewModel.Restore(SerializableMainWindow state)
at FanControl.ViewModels.MainWindowViewModel.<>c__DisplayClass146_0.<RestoreApplicationState>b__0()
Relevant hardware specs and setup
Gigabyte B550 Elite v2, ryzen 5800x3d
Did you update through the normal updater or did you update manually by extracting files onto your existing folder?
System.BadImageFormatException: usually means there is a mismatch in the dll files.
Did you update through the normal updater or did you update manually by extracting files onto your existing folder?
So far I have only updated when the app says there's a new version. So using the updater.
I'll try downloading the latest version and updating manually.
@Rem0o I'm having profile issues too. It doesn't load the last profile I used; instead, it loads the one I previously used. I also noticed that it switches profiles normally if I right-click the tray icon. However, if I load a profile using the app dashboard (3 dots > Load configuration), it asks if I want to save changes even though I didn't change anything. This prompt appears every single time I try to load another configuration, regardless of the profile I'm trying to switch from.
@brunoherrera if those profiles are old, the newer version of the app might want to serialize new stuff onto your config, or the way it serialize stuff changes and so on. Hard to say without seeing the before/after.
@brunoherrera if those profiles are old, the newer version of the app might want to serialize new stuff onto your config, or the way it serialize stuff changes and so on. Hard to say without seeing the before/after.
https://www.youtube.com/watch?v=cXDFE0kZDrg
I tried a fresh install, but copying my plugins and profiles into it, you can see what the behavior is in that recording
even if I actually make a change like adding a new Mix for example, and save changes, it will still behave the same
@brunoherrera if those profiles are old, the newer version of the app might want to serialize new stuff onto your config, or the way it serialize stuff changes and so on. Hard to say without seeing the before/after.
https://www.youtube.com/watch?v=cXDFE0kZDrg
I tried a fresh install, but copying my plugins and profiles into it, you can see what the behavior is in that recording
even if I actually make a change like adding a new Mix for example, and save changes, it will still behave the same
@Rem0o this are my plugins and config files:
https://drive.google.com/file/d/1IZH29xBTMklNQtZIXn_UXoYuxr_V7iKF/view?usp=sharing
should I open a new issue about this? sorry if I shouldn't have posted this in here
Could you make a text diff of any of your config before and after a save? Just use a text diff online and paste the json content before and after. If it prompts, it means there is a difference.
Could you make a text diff of any of your config before and after a save? Just use a text diff online and paste the json content before and after. If it prompts, it means there is a difference.
amazingly, it isn't happening anymore, probably a reboot fixed it, because I didn't do anything related to fancontrol, the only difference since my last message and reading your request is a few reboots in between, super weird stuff, but I understood your request, if it happens again I will check if there is any difference, thanks for your time!.
Could you make a text diff of any of your config before and after a save? Just use a text diff online and paste the json content before and after. If it prompts, it means there is a difference.
amazingly, it isn't happening anymore
nevermind, is happening again, maybe after a first reboot it works, but once I close dashbaord it starts happening again? anyways, Ill make the diff check now
here:
Previous:
"Sensors": {
"DisabledPlugins": [
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin"
],
After:
"Sensors": {
"DisabledPlugins": [
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin",
"LiquidctlPlugin"
],
I deleted all the extra entries in the profile jsons and it's now working correctly
hmm, if I refresh sensors, it will start duplicating again, so there might be the issue, if I save, and then refresh sensors again the program hangs and doesn't respond anymore, need to force end it with taskmanager
@brunoherrera yeah somehow seems like the plugin is duplicating. I've never seen that and I can't reproduce it with the same plugin myself.
@brunoherrera yeah somehow seems like the plugin is duplicating. I've never seen that and I can't reproduce it with the same plugin myself.
weird, I perfectly can in a "fresh system" (windows sandbox) using the links in the repo description, I'll record that just in case and put the link here
here is the test in windows sandbox, same behavior as in my real pc
https://www.youtube.com/watch?v=D0K585eewWk
also I think I forgot to mention, but if you load profiles by right clicking the tray icon it works fine and doesn't duplicate, the issue only happens when loading from inside the dashboard
@brunoherrera Ah I think I got it. It is related to #2517, which is fixed already, just not released.