NickvisionApps / Denaro

Manage your personal finances
https://flathub.org/apps/details/org.nickvision.money
MIT License
575 stars 38 forks source link

Crash when select current month #779

Closed cassiogomes00 closed 8 months ago

cassiogomes00 commented 8 months ago

Descriprion

Sometimes, click on the "Select Current Month" button makes the app crash with the following exception:

UnhandledException - unhandled exception: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
   at System.DateOnly..ctor(Int32 year, Int32 month, Int32 day)
   at NickvisionMoney.GNOME.Views.AccountView.OnDateRangeEndYearChanged() in /run/build/org.nickvision.money/NickvisionMoney.GNOME/Views/AccountView.cs:line 1318
   at NickvisionMoney.GNOME.Views.AccountView.<.ctor>b__70_28(Object sender, NotifySignalArgs e) in /run/build/org.nickvision.money/NickvisionMoney.GNOME/Views/AccountView.cs:line 252
   at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, ValueData[] paramValuesData, IntPtr invocationHint, IntPtr userData)

How to reproduce

Expected behaviour

Filter transaction by the month selected in the calendar widget

System Info

Hardware Information:

Software Information:

App Information

JoseBritto commented 8 months ago

Thanks for reporting this bug.

Reproducing consistently:

  1. Click show current month when on February 2024
  2. Change end year from 2024 Feb 29 to 2023 Feb 29 (impossible date)
  3. Crash!
cassiogomes00 commented 8 months ago

I found another way to reproduce it consistently:

  1. Go to a February 2024 day
  2. Click "Select Current Month"
  3. Click "Reset To Today"
  4. Click "Select Current Month"
  5. Crash

It doesn't crash if, in the first step, a day of another month is selected (but clicking on reset to today works as a first step too)

JoseBritto commented 8 months ago

Seems like that one too is the same bug. It's not happening on #780 branch. If possible would you be able to confirm the pr fixes it?

nlogozzo commented 8 months ago

Probably going to release the hot fix since this is probably affecting everyone

nlogozzo commented 8 months ago

https://github.com/NickvisionApps/Denaro/releases/tag/2024.2.0

Will be available through Flathub in 20 minutes