Droidcon-Boston / conference-app-android

Official conference app for Droidcon Boston
http://www.droidcon-boston.com/
Apache License 2.0
98 stars 25 forks source link

App crashes when not logged in, tapping feedback stars and then Back instead of log in #189

Closed fetching closed 5 years ago

fetching commented 5 years ago

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:

  1. User is not logged in
  2. Navigate to any talk detail view
  3. Tap the stars to provide feedback
  4. Google SignIn is presented
  5. Tap the hardware Back button to skip logging in
  6. 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) 
fetching commented 5 years ago

I'm no longer seeing this crash so I'm going to close this Issue. There is a question about the flow if I hit Back but I will submit that separately.