Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when leaving the fragment #1

Open
mstberto opened this issue Jan 11, 2020 · 0 comments
Open

Crashes when leaving the fragment #1

mstberto opened this issue Jan 11, 2020 · 0 comments

Comments

@mstberto
Copy link

I received the below crash when closing a fragment containing the BoxCastVideoView.

Steps to reproduce:

  1. Opened the app
  2. Went to the fragment containing the view
  3. Because we are not currently live, the view was never started
  4. Navigated away from the fragment
  5. Crash

It looks like onDetatchedFromWindow() is assuming the view was started and a timer is present. Perhaps a null check might clear this up?

java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.Timer.cancel()' on a null object reference at com.boxcast.android.view.BoxCastVideoView.cancelIntervalTimer(BoxCastVideoView.java:174) at com.boxcast.android.view.BoxCastVideoView.onDetachedFromWindow(BoxCastVideoView.java:128) at android.view.View.dispatchDetachedFromWindow(View.java:18400) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3769) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3769) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3769) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3769) at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5359) at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5330) at android.view.ViewGroup.removeView(ViewGroup.java:5261) at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:973) at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238) at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:434) at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079) at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869) at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824) at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727) at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant