Blur-LIB-Android icon indicating copy to clipboard operation
Blur-LIB-Android copied to clipboard

java.lang.IllegalArgumentException

Open adeldolgov opened this issue 5 years ago • 2 comments

java.lang.IllegalArgumentException: canvas object must be the same instance that was previously returned by lockCanvas at android.view.Surface$HwuiContext.unlockAndPost(Surface.java:834) at android.view.Surface.unlockCanvasAndPost(Surface.java:334) at no.danielzeller.blurbehindlib.opengl.ViewSurfaceTexture.endDraw(ViewSurfaceTexture.kt:55) at no.danielzeller.blurbehindlib.BlurBehindLayout.renderBehindViewToTexture(BlurBehindLayout.kt:254) at no.danielzeller.blurbehindlib.BlurBehindLayout.redrawBlurTexture(BlurBehindLayout.kt:216) at no.danielzeller.blurbehindlib.BlurBehindLayout.access$redrawBlurTexture(BlurBehindLayout.kt:25) at no.danielzeller.blurbehindlib.BlurBehindLayout$frameCallBack$1.doFrame(BlurBehindLayout.kt:234) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:964) at android.view.Choreographer.doCallbacks(Choreographer.java:778) at android.view.Choreographer.doFrame(Choreographer.java:710) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:172) at android.app.ActivityThread.main(ActivityThread.java:6590) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

<no.danielzeller.blurbehindlib.BlurBehindLayout
            android:foreground="#ADFFFFFF"
            android:visibility="gone"
            android:id="@+id/blurBehindLayout"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_marginBottom="8dp"
            app:blurRadius="10.0"
            app:updateMode="continuously"
            app:useTextureView="false"
            app:blurTextureScale="0.27"
            app:useChildAlphaAsMask="false">

I have fragment with recyclerview, then if i press 'home' btn and go to app again, i got that error

adeldolgov avatar Feb 21 '20 16:02 adeldolgov

I unfortunately don't have time to look into this one, feels free to make a PR if you figure it out :)

danielzeller avatar Feb 24 '20 09:02 danielzeller

@danielzeller i fixed this by changing updateMode to "onScroll" when im going to fragment with recyclerview. But when i go out from app, then go back i have gray colored layout instead of blur

adeldolgov avatar Feb 24 '20 14:02 adeldolgov