oliexdev / openScale

Open-source weight and body metrics tracker, with support for Bluetooth scales
GNU General Public License v3.0
1.7k stars 296 forks source link

Cannot add reference user, app crashes. #827

Closed felindash closed 2 years ago

felindash commented 2 years ago

I'm getting this error consistently, both on dev and stable versions. My device is Poco x3 and Mi Scale 2

`Build version: 2.4.5-dev_8b12ecdb_2022-01-26 Build date: 1981-01-01 01:01:02 Current date: 2022-02-10 17:40:59 Device: Xiaomi M2102J20SI OS version: Android 11 (SDK 30)

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.ListView.getCheckedItemPosition()' on a null object reference at com.health.openscale.gui.MainActivity$10.onClick(MainActivity.java:487) at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:174) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7665) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) `

oliexdev commented 2 years ago

Currently I can't reproduce this error. Do you can reproduce this error everytime? Which step do you do from a clean installation to get this error?

felindash commented 2 years ago

https://user-images.githubusercontent.com/96837488/163632001-a6fed567-2522-4b1d-b107-3c83026f029b.mp4

To get this error, I just need to press the Bluetooth icon. Updating my device and downloading newest version (dev and stable) fresh has same result

oliexdev commented 2 years ago

Thanks should be fixed now, please try out the latest dev version. You need at least two users for assisting weighing. The other user is for reference which the weight is subtracted.