nextcloud / talk-android

📱😀 Video & audio calls through Nextcloud on Android
Other
550 stars 248 forks source link

NullPointerException after leaving an errored call with the backbutton #1233

Closed nickvergessen closed 3 years ago

nickvergessen commented 3 years ago

Steps to reproduce

  1. Try a call
  2. No one joins
  3. See message about 45s being over blabla
  4. Press back button
  5. App crashes

Expected behaviour

Chat is shown

Actual behaviour

2021-05-10 12:47:15.482 5019-5019/com.nextcloud.talk2.qa E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.nextcloud.talk2.qa, PID: 5019
    java.lang.RuntimeException: Unable to destroy activity {com.nextcloud.talk2.qa/com.nextcloud.talk.activities.MagicCallActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.widget.RelativeLayout.findViewById(int)' on a null object reference
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5111)
        at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5140)
        at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.widget.RelativeLayout.findViewById(int)' on a null object reference
        at com.nextcloud.talk.controllers.CallController.initGridAdapter(CallController.java:520)
        at com.nextcloud.talk.controllers.CallController.removeMediaStream(CallController.java:1800)
        at com.nextcloud.talk.controllers.CallController.lambda$endPeerConnection$1$CallController(CallController.java:1789)
        at com.nextcloud.talk.controllers.-$$Lambda$CallController$kR9MNCpaawldSklsH7niEF_Uu0M.run(Unknown Source:4)
        at android.app.Activity.runOnUiThread(Activity.java:7068)
        at com.nextcloud.talk.controllers.CallController.endPeerConnection(CallController.java:1789)
        at com.nextcloud.talk.controllers.CallController.hangup(CallController.java:1554)
        at com.nextcloud.talk.controllers.CallController.onHangupClick(CallController.java:850)
        at com.nextcloud.talk.controllers.CallController.onDestroy(CallController.java:1091)
        at com.bluelinelabs.conductor.Controller.performDestroy(Controller.java:1146)
        at com.bluelinelabs.conductor.Controller.removeViewReference(Controller.java:1045)
        at com.bluelinelabs.conductor.Controller.destroy(Controller.java:1173)
        at com.bluelinelabs.conductor.Controller.activityDestroyed(Controller.java:906)
        at com.bluelinelabs.conductor.Router.onActivityDestroyed(Router.java:616)
        at com.bluelinelabs.conductor.ActivityHostedRouter.onActivityDestroyed(ActivityHostedRouter.java:62)
        at com.bluelinelabs.conductor.internal.LifecycleHandler.destroyRouters(LifecycleHandler.java:220)
        at com.bluelinelabs.conductor.internal.LifecycleHandler.onDestroy(LifecycleHandler.java:162)
        at android.app.Fragment.performDestroy(Fragment.java:2765)
        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1456)
        at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581)
        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642)
        at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3052)
        at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:3032)
        at android.app.FragmentController.dispatchDestroy(FragmentController.java:250)
        at android.app.Activity.performDestroy(Activity.java:8244)
        at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344)
        at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5096)
PVince81 commented 3 years ago

just saw this as well while traversing the log, version v12.0.0 Alpha 15