QuantumPhysique / trale

trale – a simple body weight diary app respecting your privacy
GNU Affero General Public License v3.0
60 stars 8 forks source link

Adding measurements with specific date (today) breaks database, resulting in blank screen and infinite loading animation #70

Closed Toasty2004 closed 3 months ago

Toasty2004 commented 3 months ago

Describe the bug The database breaks the app if it contains measurements on March 30 and March 31, resulting in no charts and the app not starting.

To Reproduce Steps to reproduce the behavior:

  1. Download trale version 0.6.1 from F-Droid
  2. Click through introduction
  3. Add measurement on 31.3.2024
  4. Add measurement on 30.3.2024
  5. Go to tab "Start"
  6. See a white rectangle instead on nice chart
  7. Close the app completely
  8. Start the app again
  9. See infinte loading animation

Expected behavior Nice charts and quick starts

Screenshots I attached a video of the full replication process below.

User Information (please complete the following information):

Additional context I suspect it could have something to do with the change to daylight savings time this night. I'm in Germany in case the time zone is relevant. PS: I love the app, thank you guys so much! BTW I couldn't find the donate button yet.

https://github.com/QuantumPhysique/trale/assets/86314723/6b9854b2-f57e-4308-bf2e-faa8ba83cb22

braniii commented 3 months ago

@Toasty2004 I am sorry that you are facing this issue. But I guess you just found the error source of #65, so thx a lot :)

gwosd commented 3 months ago

@Toasty2004 I am also sorry for the inconvenience. And thx for identifying a bug :)

Apparently we had some leakage of an animationcontroller ticker (see #75). If the assumption proves to be true, the bugfix should be released soon.

danikuci1 commented 3 months ago

+1 I'm having this same issue on 0.6.1

LinuxFella commented 3 months ago

I've been enjoying this app the past 90 days, or so. Yep, I'm having the same issue: "blank screen and infinite loading animation"

gwosd commented 3 months ago

Unfortunately, the animation controller ticker leak does not seem to be the cause of the observed bug. Apparently, it has something to do with the newly introduced interpolation... so I think it would be best if @braniii could give it a try. In the meantime I tried a quick-and-dirty bugfix (app-arm64-v8a-release.apk.zip). The apk is taken from https://github.com/QuantumPhysique/trale/actions/runs/8555591995. And at least on my device it was able to fix the bug. So I would be interested to see if it helps you too.

gwosd commented 3 months ago

@LinuxFella, @danikuci1 I am sorry for the inconvenience.

And just in case my bugfix doesn't help, would it be interesting if the bug appeared immediately after upgrading to 0.6.1 or after adding a measurement?

danikuci1 commented 3 months ago

I believe but am not positive the bug appeared immediately after upgrading

LinuxFella commented 3 months ago

@LinuxFella, @danikuci1 I am sorry for the inconvenience.

And just in case my bugfix doesn't help, would it be interesting if the bug appeared immediately after upgrading to 0.6.1 or after adding a measurement?

I did the update through F-Driod to 0.6.1 and prior to that all was fine. I've not had the chance to enter new weight, the 'bug animation' happened right after the update. It's a brilliant app indeed and I hope to see it working again soon.

braniii commented 3 months ago

apks_fix_issue70.zip

As @gwosd pointed out, it is me to blame for this issue. Refactoring the interpolation code, it seems that I've introduced this issue. However, I am sadly not able to reproduce this issue. Inserting the same measurements as shown by @Toasty2004 the app works flawless :thinking: . So I've cleaned up some code which (as far as I can guess) causes this issue. It would be helpful if some of you @danikuci1 @LinuxFella @Toasty2004 could give me feedback if the provided APK solves the issue.

steko commented 3 months ago

I was affected by the bug, too. I can confirm that the attached apk works well.

Toasty2004 commented 3 months ago

I can also confirm that the attached APK fixes the issue. Thanks for the effort!

To give a bit more detail in case you still need it: I was updating to the provided APK while the previously installed version was in error state (infinite starting animation). After updating, it worked flawless, the app started and showed the chart with the same database that was giving trouble earlier.

braniii commented 3 months ago

Glad to hear. I will push later a new version to github (and fdroid). If someone does not want to wait up to one week for the fdroid build, feel free to upgrade from the release page. The signing key is the same, so switching between fdroid and github should work flawless.

LinuxFella commented 2 months ago

I've not tried the apk. But if the update / correction will be available on F-Droid in a week or so, I can wait until then.