Error upon opening application (UWP version)
Hi,
After installing the most recent update (version 3.0.0) through the Microsoft Store I am encountering an error
when trying to start the application.
I have deleted local files, reinstalled the app and restarted my computer, and the problem persists. I am running Windows 10 (Education edition, managed by IT department).
From the log file:
System.ArgumentOutOfRangeException: Value to add was out of range. Parameter name: value at System.DateTime.Add(Double value, Int32 scale) at SunCalcNet.Utils.DateTimeUtils.FromJulian(Double j) at SunCalcNet.SunCalc.GetSunPhases(DateTime date, Double lat, Double lng) at WinDynamicDesktop.SunriseSunsetService.GetSunPhases(DateTime date, String lat, String lng) at WinDynamicDesktop.SunriseSunsetService.GetSolarData(DateTime date) at WinDynamicDesktop.WallpaperChangeScheduler.RunScheduler(Boolean forceImageUpdate) at WinDynamicDesktop.ThemeDialog.applyButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.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) System.ArgumentOutOfRangeException: Value to add was out of range.
The error does not appear until I try setting my location, after doing a fresh install.
This seems like it is a location-specific issue related to the library I am using for solar calculations. Since it works for my location, would you be able to give me a location to put in that causes this error? If you want to keep your specific location private I understand, but if you get the same error when you put in the name of a big city near you that would be helpful for me to know.
Hi,
That seems to have worked. I live in Trondheim, Norway, and changing the location to Oslo, Norway seems to have fixed it. Thank you!
Reopening this because the location should not matter, I believe this is a bug and want to investigate it further.
What do you use suncalc for?
@FantasiaChan WinDynamicDesktop uses the SunCalc library to calculate the times of day when the sun is at specific angles. This is how the app knows which images to show when based on your location. You can see more specifically how it is used here in the code.
uh. How about DateTime.NowI.toLocalTime UPD: or use this: https://docs.microsoft.com/ru-ru/dotnet/api/system.timezoneinfo.converttime?view=netframework-4.7.2
(I recently reinstalled Windows and can't do anything now)
It's most likely unrelated, but I can add that the experimental lock screen changer feature does not work for me either.
I am using the newest UWP version and have changed the settings.conf file setting to true.
I also want to add that I just tried setting the location back to the original one, and it accepted the change without throwing any errors.
Closing this since the original issue was resolved and there is now a new issue to track problems with the experimental lock screen changer feature (#101).