OpenSeizureDetector / Android_Pebble_SD

The main OpenSeizureDetector Android App, that is published on the Android Play Store.
http://openseizuredetector.org.uk
GNU General Public License v3.0
9 stars 11 forks source link

Crash report seizure when not logged in #112

Closed AroonPro closed 6 months ago

AroonPro commented 1 year ago

The object with the function has been nulled. Precede the function with a null check and notify the user.

OpenSeizureDetector Crash Report by Graham Jones (using UCE Error handler by Rohit Surwase)

***** DEVICE INFO Brand: samsung Device: a53x Model: SM-A536B Manufacturer: samsung Product: a53xnaeea SDK: 33 Release: 13

***** APP INFO Version: 4.2.4g Installed On: 2022-11-22 01:24:27 Updated On: 2023-06-29 20:47:16 Current Date: 2023-07-04 08:18:54

***** ERROR LOG java.lang.NullPointerException: Attempt to invoke virtual method 'boolean uk.org.openseizuredetector.WebApiConnection.isLoggedIn()' on a null object reference at uk.org.openseizuredetector.ReportSeizureActivity.initialiseServiceConnection(ReportSeizureActivity.java:161) at uk.org.openseizuredetector.ReportSeizureActivity.waitForConnection(ReportSeizureActivity.java:145) at uk.org.openseizuredetector.ReportSeizureActivity.access$000(ReportSeizureActivity.java:43) at uk.org.openseizuredetector.ReportSeizureActivity$1.run(ReportSeizureActivity.java:151) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

END OF LOG

jones139 commented 6 months ago

Fixed in V4.2.x - forgot to tag which commit dealt with it, but now if you are not logged in a message box is displayed when you try to report a seizure.