WinDynamicDesktop icon indicating copy to clipboard operation
WinDynamicDesktop copied to clipboard

Error upon opening application (UWP version)

Open bacillusmet opened this issue 7 years ago • 9 comments

Hi,

After installing the most recent update (version 3.0.0) through the Microsoft Store I am encountering an error windynamicdesktop_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.

bacillusmet avatar Jan 16 '19 14:01 bacillusmet

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.

t1m0thyj avatar Jan 16 '19 14:01 t1m0thyj

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!

bacillusmet avatar Jan 17 '19 08:01 bacillusmet

Reopening this because the location should not matter, I believe this is a bug and want to investigate it further.

t1m0thyj avatar Jan 22 '19 03:01 t1m0thyj

What do you use suncalc for?

MD-DeCode avatar Jan 22 '19 15:01 MD-DeCode

@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.

t1m0thyj avatar Jan 22 '19 15:01 t1m0thyj

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

MD-DeCode avatar Jan 22 '19 15:01 MD-DeCode

(I recently reinstalled Windows and can't do anything now)

MD-DeCode avatar Jan 22 '19 15:01 MD-DeCode

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.

bacillusmet avatar Jan 23 '19 14:01 bacillusmet

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).

t1m0thyj avatar Feb 25 '19 14:02 t1m0thyj