gawindx / WinNUT-Client

This is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
GNU General Public License v3.0
386 stars 70 forks source link

Crash on start if delay set to 0 #127

Open alx1k opened 2 years ago

alx1k commented 2 years ago

WinNUT Bug Report Os Version : 6.2.9200.0 WinNUT Version : 2.1.7740.35837

WinNUT Parameters : { "Delay": 0, "AutoReconnect": "False", "MinInputVoltage": 210, "MaxInputVoltage": 270, "FrequencySupply": 0, "MinInputFrequency": 40, "MaxInputFrequency": 60, "MinOutputVoltage": 210, "MaxOutputVoltage": 250, "MinUPSLoad": 0, "MaxUPSLoad": 100, "MinBattVoltage": 6, "MaxBattVoltage": 18, "MinimizeToTray": "False", "MinimizeOnStart": "False", "CloseToTray": "False", "StartWithWindows": "False", "UseLogFile": "False", "Log Level": 0, "ShutdownLimitBatteryCharge": 30, "ShutdownLimitUPSRemainTime": 120, "ImmediateStopAction": "False", "Follow_FSD": "False", "TypeOfStop": 0, "DelayToShutdown": 15, "AllowExtendedShutdownDelay": "False", "ExtendedShutdownDelay": 15, "VerifyUpdate": "False", "VerifyUpdateAtStart": "False", "DelayBetweenEachVerification": 2, "StableOrDevBranch": 0, "LastDateVerification": "" }

Error Message : Exception type: System.ArgumentOutOfRangeException Exception message: Verdien 0 er en ugyldig verdi for intervallet. Intervallet må være større enn 0. Parameternavn: Interval Exception stack trace: ved System.Windows.Forms.Timer.set_Interval(Int32 value) ved WinNUT_Client.WinNUT.WinNUT_Load(Object sender, EventArgs e) ved System.EventHandler.Invoke(Object sender, EventArgs e) ved System.Windows.Forms.Form.OnLoad(EventArgs e) ved System.Windows.Forms.Form.OnCreateControl() ved System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) ved System.Windows.Forms.Control.CreateControl() ved System.Windows.Forms.Control.WmShowWindow(Message& m) ved System.Windows.Forms.Control.WndProc(Message& m) ved System.Windows.Forms.ScrollableControl.WndProc(Message& m) ved System.Windows.Forms.Form.WmShowWindow(Message& m) ved System.Windows.Forms.Form.WndProc(Message& m) ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Last Events : 07.03.2022 17:44:58 Pid: 4216 WinNUT : Initialisation Globals Variables Complete 07.03.2022 17:44:58 Pid: 4216 WinNUT : Initialisation Params Complete 07.03.2022 17:44:58 Pid: 4216 WinNUT : Loaded Params Complete 07.03.2022 17:44:58 Pid: 4216 WinNUT : NotifyIcons Initialised 07.03.2022 17:44:58 Pid: 4216 WinNUT : Windows 10 Toast Notification Not Available. Too Old Windows Version

dropsfjs commented 2 years ago

i have the same problem

Exception type: System.ArgumentOutOfRangeException Exception message: Value '0' is not a valid value for Interval. Interval must be greater than 0. Parameter name: Interval Exception stack trace: at System.Windows.Forms.Timer.set_Interval(Int32 value) at WinNUT_Client.WinNUT.WinNUT_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

DejanBukovec commented 2 years ago

I have same issue. What value and where I need to change it to fix this issue?

gbakeman commented 2 years ago

I believe this is related to #76 . Are you able to access the config? This value should be in the main settings. If you can't access it, you can delete the registry key HKEY_CURRENT_USER\SOFTWARE\WinNUT which will reset all application settings.