PhotoEditor: SurfaceFlinger: Failed to find layer & Applying effect in wrong GL context
...document, PID: 664
java.lang.RuntimeException: Applying effect in wrong GL context!
at android.media.effect.EffectContext.assertValidGLState(EffectContext.java:109)
at android.media.effect.FilterEffect.beginGLEffect(FilterEffect.java:64)
at android.media.effect.SingleFilterEffect.apply(SingleFilterEffect.java:68)
at ja.burhanrashid52.photoeditor.ImageFilterView.applyEffect(ImageFilterView.java:263)
at ja.burhanrashid52.photoeditor.ImageFilterView.onDrawFrame(ImageFilterView.java:100)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1571)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)
Does this library support all the android version above 5.0 i am using 8.1.0
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 16 (3 by maintainers)
I’v solved it add the lib as module in the project, update on ImageFilterView class the update is in this section of code if (!mInitialized) { //Only need to do this once mEffectContext = EffectContext.createWithCurrentGlContext(); mTexRenderer.init(); loadTextures(); mInitialized = true; }
the solution is : remove the mInitialized condition and let the code in it run without this condition (remove the role of mInitialized)
Check this comment on issue #242