You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2019-12-16 16:59:39.216 21890-21890/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myapp, PID: 21890
java.lang.RuntimeException: Unable to destroy activity {com.myapp.BlurActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewTreeObserver android.view.View.getViewTreeObserver()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4707)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4730)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
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:1947)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7037)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewTreeObserver android.view.View.getViewTreeObserver()' on a null object reference
at com.ms_square.etsyblur.BlurringView.onDetachedFromWindow(BlurringView.java:105)
at android.view.View.dispatchDetachedFromWindow(View.java:20067)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3987)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5588)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5559)
at android.view.ViewGroup.removeView(ViewGroup.java:5490)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:973)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2659)
at androidx.fragment.app.FragmentManagerImpl.dispatchDestroyView(FragmentManagerImpl.java:2638)
at androidx.fragment.app.Fragment.performDestroyView(Fragment.java:2805)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:954)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2659)
at androidx.fragment.app.FragmentManagerImpl.dispatchDestroy(FragmentManagerImpl.java:2644)
at androidx.fragment.app.FragmentController.dispatchDestroy(FragmentController.java:329)
at androidx.fragment.app.FragmentActivity.onDestroy(FragmentActivity.java:366)
at androidx.appcompat.app.AppCompatActivity.onDestroy(AppCompatActivity.java:210)
at android.app.Activity.performDestroy(Activity.java:7681)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1306)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4692)
After adding a BlurredView, my App crashes when I go to another screen.
Note that I don't call
blurView.blurredView(View)
yet.The layout:
The fragment:
The stack trace:
The source:
EtsyBlur/lib/src/main/java/com/ms_square/etsyblur/BlurringView.java
Line 105 in b51c9e8
The text was updated successfully, but these errors were encountered: