onaio / steps-app

WHO STEPS App
Apache License 2.0
2 stars 2 forks source link

Crash App on Setting Screen #161

Closed owais-vd closed 2 years ago

owais-vd commented 2 years ago

Following the steps below, you can crash the app when going to the Setting screen.

Open ODK Collect app. Open Steps app. Kill the ODK app from recent. Kill the Steps app from recent. Open again the steps app. Go to the Setting screen.

java.lang.RuntimeException: Unable to resume activity {com.onaio.steps/com.onaio.steps.activities.SettingsActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void org.odk.collect.android.injection.config.AppDependencyComponent.inject(org.odk.collect.android.external.FormsProvider)' on a null object reference
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3784)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void org.odk.collect.android.injection.config.AppDependencyComponent.inject(org.odk.collect.android.external.FormsProvider)' on a null object reference
        at android.os.Parcel.createException(Parcel.java:1956)
        at android.os.Parcel.readException(Parcel.java:1918)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
        at android.content.ContentProviderClient.query(ContentProviderClient.java:163)
        at android.content.ContentProviderClient.query(ContentProviderClient.java:146)
        at android.content.ContentProviderClient.query(ContentProviderClient.java:136)
        at com.onaio.steps.model.ODKForm.ODKBlankForm.get(ODKBlankForm.java:76)
        at com.onaio.steps.activities.SettingsActivity.prepareAvailableFormList(SettingsActivity.java:210)
        at com.onaio.steps.activities.SettingsActivity.onResume(SettingsActivity.java:69)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
        at android.app.Activity.performResume(Activity.java:7292)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816) 
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51) 
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6669) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)