Choosing feedback stars when not logged in and then choosing not to log in will crash the app.
Here are the steps to see the issue:
User is not logged in
Navigate to any talk detail view
Tap the stars to provide feedback
Google SignIn is presented
Tap the hardware Back button to skip logging in
The app will crash with the stack trace below
Note: If the user choose to proceed and log in the feed back stars are presented. Very nice! 👍 💯
Here is the crash stack trace:
2019-03-23 17:55:27.141 2240-2240/com.mentalmachines.droidcon_boston E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mentalmachines.droidcon_boston, PID: 2240
java.lang.RuntimeException: Unable to resume activity {com.mentalmachines.droidcon_boston/com.mentalmachines.droidcon_boston.views.MainActivity}: kotlin.KotlinNullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3873)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3914)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1709)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Caused by: kotlin.KotlinNullPointerException
at com.mentalmachines.droidcon_boston.views.rating.RatingDialog.initializeViewModel(RatingDialog.kt:46)
at com.mentalmachines.droidcon_boston.views.rating.RatingDialog.onCreateView(RatingDialog.kt:34)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
at androidx.fragment.app.FragmentController.execPendingActions(FragmentController.java:391)
at androidx.fragment.app.FragmentActivity.onResume(FragmentActivity.java:517)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1277)
at android.app.Activity.performResume(Activity.java:7142)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3850)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3914)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1709)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Choosing feedback stars when not logged in and then choosing not to log in will crash the app.
Here are the steps to see the issue:
Note: If the user choose to proceed and log in the feed back stars are presented. Very nice! 👍 💯
Here is the crash stack trace: