google / jetpack-camera-app

Apache License 2.0
152 stars 29 forks source link

Crash in ShaderCopy on S24 (non-Ultra) when using HDR in Single-stream mode #241

Closed temcguir closed 3 months ago

temcguir commented 5 months ago

When enabling single-stream and HDR on the Samsung Galaxy S24, we get the following crash:

FATAL EXCEPTION: ShaderCopy
Process: com.google.jetpackcamera, PID: 29604
java.lang.IllegalStateException: Required extension for 10-bit HDR is not supported: EGL_EXT_yuv_surface
    at com.google.jetpackcamera.core.camera.effects.ShaderCopy$initConfig$1.invoke(ShaderCopy.kt:69)
    at com.google.jetpackcamera.core.camera.effects.ShaderCopy$initConfig$1.invoke(ShaderCopy.kt:63)
    at androidx.graphics.opengl.GLThread.obtainEGLManager(GLThread.kt:208)
    at androidx.graphics.opengl.GLThread.requestRenderInternal(GLThread.kt:293)
    at androidx.graphics.opengl.GLThread.requestRender$lambda$19$lambda$18(GLThread.kt:193)
    at androidx.graphics.opengl.GLThread.$r8$lambda$886mosJXDbxspS18XIztAZcQfOA(Unknown Source:0)
    at androidx.graphics.opengl.GLThread$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.os.HandlerThread.run(HandlerThread.java:67)
temcguir commented 5 months ago

The device uses One UI 6.1 (Build Number: UP1A.231005.007.5921BXXU1AXCA)

temcguir commented 5 months ago

The black screen seems to be an issue with the ANGLE driver. It is reproducible on Pixel 7 Pro as well when forcing usage of ANGLE on the device, after we remove the check for EGL_EXT_yuv_surface. It is fixed with r.android.com/3180265.