brodeurlv / fastnfitness

FastNFitness Android app: Body, Cardio and Fitness tracking.
https://play.google.com/store/apps/details?id=com.easyfitness
BSD 3-Clause "New" or "Revised" License
271 stars 359 forks source link

Update to v0.20.5 crashes app instantly #252

Closed chaptergy closed 2 years ago

chaptergy commented 2 years ago

Describe your issue Hello, When updating the app to v0.20.5 and opening it it crashes instantly. The splash screen flashes for a split second but then the app is closed again. Thank you.

To Reproduce Steps to reproduce the behavior:

  1. Have data stored in app version 0.20.4 or earlier
  2. Upgrade to version 0.20.5
  3. Open the app

Expected behavior The app opens

Smartphone (please complete the following information):

Additional context

Crash stack trace ``` FATAL EXCEPTION: main Process: com.easyfitness, PID: 8575 java.lang.NullPointerException: Attempt to invoke virtual method 'int com.easyfitness.DAO.record.Record.getSets()' on a null object reference at com.easyfitness.DAO.DatabaseHelper.copyTemplateValues(DatabaseHelper.java:401) at com.easyfitness.DAO.DatabaseHelper.onUpgrade(DatabaseHelper.java:217) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:416) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:340) at com.easyfitness.DAO.DAOBase.getReadableDatabase(DAOBase.java:24) at com.easyfitness.DAO.DAOProfile.getProfile(DAOProfile.java:92) at com.easyfitness.MainActivity.initActivity(MainActivity.java:1076) at com.easyfitness.MainActivity.onStart(MainActivity.java:348) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455) at android.app.Activity.performStart(Activity.java:8075) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3660) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) ```
zcattacz commented 2 years ago

Same instant crash here on Android 9, F-Droid Build after upgrade from previous version. It's impossible to downgrade, all data is trapped in there.

brodeurlv commented 2 years ago

Thank you for the feedback and the stack trace. I will fix this asap.

brodeurlv commented 2 years ago

Hi guys, thanks to the Stacktrace, I have been able to identify the issue quickly. The new release should be available today on google play. Thank you for the feedback. Let me know if you still have issues with the 0.20.5.1.

themightyoarfish commented 2 years ago

When will this land in F-Droid? Same problem and F-Droid fails downgrading, my phone also says "App not installed" when trying to install the APK manually.

themightyoarfish commented 2 years ago

Which files do i need to save to be able to restore after i uninstall manually?

themightyoarfish commented 2 years ago

I noticed the export unfortunately does not contain the programs, that might be a useful addition.

brodeurlv commented 2 years ago

The program export has been added in the 0.20.5. The crash is fixed in the 0.20.5.1. It is available on the Google play. For F Droid, it is supposed to be automatic. I don't manage this. Best regards,

Charles.

zcattacz commented 2 years ago

the build bot hasn't even discover this new version yet ... https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.easyfitness.yml