SecUSo / privacy-friendly-pedometer

Privacy Friendly App that counts your steps on Android devices.
GNU General Public License v3.0
201 stars 55 forks source link

Crash when trying to edit steps amount #101

Open GoudronViande24 opened 2 years ago

GoudronViande24 commented 2 years ago

The app just crash when I click the button to edit the amount of steps.

Android 10 and latest version of the app downloaded from f-droid

goodevilgenius commented 2 years ago

Same issue. Click on "correct steps" and the app just crashes.

I'm on a Samsung Galaxy S10E, running Android 11. App is v2.4, installed from F-Droid.

g-work commented 2 years ago

Same here. Could this be connected to the way, steps are captured? I use the hardware based capture method on Pixel 5 (Android 12). Today I installed the app and it "imported" all the steps recorded since the day I started using Google Fit (164492 steps). Therefore I thought, steps are somehow stored in the "stepcounter chip" without possibility to be edited. But when I change the capture method, I can't edit them neither. So, no idea..

GoudronViande24 commented 2 years ago

Here too, I tried changing the counter method and it stays.

sleep-yearning commented 2 years ago

Hey, just wanted to let you know that this should be fixed in the current (not yet released) version. The Problem did not have anything to do with the storing method.

Regarding the "importing" of steps, one of Android's step sensors returns all steps since last reboot. So if you first install it, the app does not have a record of those. This might be fixed as well already, not sure at the moment. Since there are unfortunately more problems with saving, the version has not been released yet.

ionum commented 2 years ago

If it helps:

08-13 08:16:15.111 E/AndroidRuntime(9601): android.view.InflateException: Binary XML file line #25 in org.secuso.privacyfriendlyactivitytracker:layout/dialog_correct_steps: Binary XML file line #25 in org.secuso.privacyfriendlyactivitytracker:layout/dialog_correct_steps: Error inflating class android.support.design.widget.TextInputLayout

sleep-yearning commented 1 year ago

Please let us know if this still occurs with 3.0.1 (current version)

nightbrd commented 1 year ago

New to using this app, installed it today, can confirm that it still happens even on the most recent version. Editing the step counter makes the app crash and trying to open the app again after this makes it so the app continuously crashes when opened. EDIT: I'm running the app on Android 13, ColorOS 13.

morckx commented 1 year ago

I am unable to reproduce this problem on 3.0.1. Please post a logcat excerpt to help track the issue.

Lisible commented 1 year ago

I have the bug too using 3.0.1, on LineageOS 20, Android 13. After a fresh install.

Please see the following logs:

10-09 01:27:04.173  8330  8330 E AndroidRuntime: FATAL EXCEPTION: main
10-09 01:27:04.173  8330  8330 E AndroidRuntime: Process: org.secuso.privacyfriendlyactivitytracker, PID: 8330
10-09 01:27:04.173  8330  8330 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'org.secuso.privacyfriendlyactivitytracker.models.StepCount org.secuso.privacyfriendlyactivitytracker.models.ActivityChartDataSet.getStepCount()' on a null object reference
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at org.secuso.privacyfriendlyactivitytracker.fragments.DailyReportFragment.generateReports(DailyReportFragment.java:425)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at org.secuso.privacyfriendlyactivitytracker.fragments.DailyReportFragment.access$100(DailyReportFragment.java:85)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at org.secuso.privacyfriendlyactivitytracker.fragments.DailyReportFragment$7.onClick(DailyReportFragment.java:637)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.view.View.performClick(View.java:7542)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.view.View.performClickInternal(View.java:7519)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:29476)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:942)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7918)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
10-09 01:27:04.173  8330  8330 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

I hope that helps as this is my favorite pedometer app.

Edit: I tried walking a few steps before editing, it happens as well. Edit2: After at least a day it stopped happening. I guess it's because by then a ActivityChartDataSet has been somehow generated (I haven't looked at the code).

fnio5 commented 6 days ago

The same happen to me today, at midnight some steps got moved out of my daily 10k to the new day I don't know why but I went to edit the steps on the new day deleted all numbers closed it but noting changed so opened it again and entered 0 but then it crashed and I can not open the app anymore it seems to be totally corrupted now.

I am on version 3.1.0 from F-Droid Sony Xperia 5 II, Android 12

Screenshot_20241014-023302 some life in the widgets but that is it.