Git Product home page Git Product logo

Comments (7)

HokoFly avatar HokoFly commented on August 15, 2024

Have more detailed logs ?

I do not have an Android Pie device. So I just run the project on the simulator. And I just got an UnsatisfiedLinkError.

It seems that when compile the RenderScript code, only x86 platform dynamic libs are generated. But the libhoko_blur.so is built for the x86_64 platform. If the device is running on x86_64 platform, an
UnsatisfiedLinkError will be thrown. Now I fixed the problem.

If your error is not an UnsatisfiedLinkError, please show me the stacktrace. 😀

from hokoblur.

danielzeller avatar danielzeller commented on August 15, 2024

09-27 00:10:21.271 25849-25869/com.example.hokoblurdemo E/OpenGLRenderer: GL error: GL_INVALID_OPERATION 09-27 00:10:21.271 25849-25869/com.example.hokoblurdemo A/OpenGLRenderer: glViewport error! GL_INVALID_OPERATION (0x502) 09-27 00:10:21.271 25849-25869/com.example.hokoblurdemo A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 25869 (RenderThread), pid 25849 (le.hokoblurdemo)

Here is the Stacktrace. I'm using a Pixel 2 XL with Android 9. If you try running it on an emulator with Api level 28, it does'nt crash but the BlurDrawable renders nothing. Talking about the blurred background on MainActivity.

It seems to be related to the GL drawing in ScreenBlurRenderer. If you comment away drawOneDimenBlur(..) and upscale(..) methods from the onDrawFrame it does'nt crash but it naturally does not render anything eiter :)

from hokoblur.

danielzeller avatar danielzeller commented on August 15, 2024

Looks like GLES20.glDrawElements(GLES20.GL_TRIANGLES, drawOrder.length, GLES20.GL_UNSIGNED_SHORT, mDrawListBuffer); makes it crash for some reason

from hokoblur.

HokoFly avatar HokoFly commented on August 15, 2024

If you run the project on the emulator of macOS, the BlurDrawable renders a strange effect. If you use the emulator of Windows, the BlurDrawable works normally. It seems to be related to difference of hardware render between these platforms.

I still cannot figure out just according to the GL_INVALID_OPERATION stacktrace. To solve it , I think I should try to get a device or add more GLError checks before calling glDrawElements method. GPU trace may be helpful.

from hokoblur.

danielzeller avatar danielzeller commented on August 15, 2024

I tried upgrading the shaders to Opengl 3.0, no longer crashes but nothing renders to the screen, works on Android Api level below 28 though 😌

from hokoblur.

HokoFly avatar HokoFly commented on August 15, 2024

Remove the dynamic blur

from hokoblur.

HokoFly avatar HokoFly commented on August 15, 2024

https://github.com/HokoFly/HokoBlurDrawable fix it

from hokoblur.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.