Rem0o / FanControl.HWInfo

FanControl plugin to import HWInfo sensors.
MIT License
186 stars 26 forks source link

Error message every time my computer wakes up from sleep #29

Closed chjohans closed 1 year ago

chjohans commented 1 year ago

I get the error message "An unexpected error has occured and has been added to the log file." every single time my system wakes up from sleep. I think it has always thrown this error, exept it did't use to open the FanControl window and show the error message. Previously (a few versions ago) it would just show the error message the next time I opened the FanControl Window. But now it will maximise the window and show eh error message, see the attached screenshot.

image

This is what is logged in the lof file: 14/9/2022 18:31:11: Unhandled exception in FanControl v1.0.0.0 14/9/2022 18:31:11: System.Exception: HWInfo sensors were changed during operation at FanControl.HWInfo.HWInfoPlugin.Update() in C:\projects\fancontrol-hwinfo\HWInfoPlugin.cs:line 60 at FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Update() at System.Collections.Generic.List1.ForEach(Action1 action) at FanControl.Domain.ComputerAccessLayer.Update() at FanControl.Domain.ApplicationClock.DoActions() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I'm using the HWiNFO plugin. After closing the error message all will work just fine, that is until the next time my computer goes to sleep and wakes up again. At that point, it will throw exactly the same error.

Please consider implementing some sort of "wake up from sleep" handling that will prevent this error situation.

Alternatively, a workaround could be to just throw the error in the log file, and NOT maximize the FanControl window and show an additional error message box.

A compromise could be the have a configurable option, either to show the error message as it's currently doing or to silently log the error message instead.

chjohans commented 1 year ago

@Rem0o Perfect, makes this even more robust, thanks for all your effort with this!!!!!

ItsMeAubey commented 1 year ago

I think we can call this done and close it! No errors for me.