flxapps / DetoxDroid

Use your phone rather than letting your phone use you.
GNU General Public License v3.0
306 stars 16 forks source link

App crashes with NullPointerException when opening certain apps. #56

Closed baschi29 closed 2 years ago

baschi29 commented 2 years ago

Happens for me for example with the Infusion Tea Timer from fdroid.

Android 11, Detox Droid 1.2.0

Stack trace:

FATAL EXCEPTION: main
Process: com.flx_apps.digitaldetox, PID: 14905
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
    at com.flx_apps.digitaldetox.DetoxAccessibilityService.handleScrollEvent(DetoxAccessibilityService.kt:160)
    at com.flx_apps.digitaldetox.DetoxAccessibilityService.onAccessibilityEvent(DetoxAccessibilityService.kt:104)
    at android.accessibilityservice.AccessibilityService$2.onAccessibilityEvent(AccessibilityService.java:2081)
    at android.accessibilityservice.AccessibilityService$IAccessibilityServiceClientWrapper.executeMessage(AccessibilityService.java:2284)
    at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:44)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:233)
    at android.app.ActivityThread.main(ActivityThread.java:8010)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
flxapps commented 2 years ago

Should be fixed with v1.2.1. Thanks for reporting!