Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on android device using the latest source codes #2285

Closed
geroge-d opened this issue Mar 26, 2020 · 5 comments · Fixed by #2297
Closed

Crash on android device using the latest source codes #2285

geroge-d opened this issue Mar 26, 2020 · 5 comments · Fixed by #2297
Assignees
Labels
bug Something isn't working opengl Issue/request specific to OpenGL

Comments

@geroge-d
Copy link

Hi guys
I built a debug version using the latest source codes, and ran into a crash

Crash log below:
/Filament: KHR_debug PERFORMANCE: Tracking surface compression isn't performant when decompressing just for an app read
../../filament/backend/src/opengl/OpenGLDriver.cpp:1988: GLsizei filament::OpenGLDriver::getAttachments(std::array<GLenum, 6> &, const filament::OpenGLDriver::GLRenderTarget *, filament::backend::TargetBufferFlags) const: assertion "!defaultFramebuffer" failed

@geroge-d
Copy link
Author

I think it may be casued by the code in view.h:
void setRenderTarget(RenderTarget* renderTarget,
TargetBufferFlags discard = TargetBufferFlags::ALL) noexcept
TargetBufferFlags::ALL = COLOR_ALL | DEPTH | STENCIL

COLOR_ALL combines all the color buffer like COLOR0 | COLOR1 | COLOR2 | COLOR3

@geroge-d
Copy link
Author

Full stacktrace for the crash:
0x281b000041a4
#00 pc 000000000005f608 /system/lib64/libc.so (tgkill+8) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#1 pc 0000000000019cc4 /system/lib64/libc.so (pthread_kill+160) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#2 pc 000000000001b224 /system/lib64/libc.so (raise+28) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#3 pc 0000000000014afc /system/lib64/libc.so (abort+60) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#4 pc 000000000001701c /system/lib64/libc.so (__libc_fatal+128) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#5 pc 0000000000014bd4 /system/lib64/libc.so (__assert2+40) [arm64-v8a::232ca221f0e5e37f634f3a7698b61d7b]
#6 pc 00000000002ef8e0 /arm64/libfilament-jni.so (_ZNK8filament12OpenGLDriver14getAttachmentsERNSt6__ndk15arrayIjLm6EEEPKNS0_14GLRenderTargetENS_7backend17TargetBufferFlagsE+272) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#7 pc 00000000002fd0a8 /lib/arm64/libfilament-jni.so (_ZN8filament12OpenGLDriver15beginRenderPassENS_7backend6HandleINS1_14HwRenderTargetEEERKNS1_16RenderPassParamsE+264) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#8 pc 0000000000319388 /lib/arm64/libfilament-jni.so (ZN8filament7backend6invokeINS_12OpenGLDriverEFvNS0_6HandleINS0_14HwRenderTargetEEERKNS0_16RenderPassParamsEERS2_JS5_S7_EEEDcMT_T0_OT1_DpOT2+216) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#9 pc 000000000031929c /lib/arm64/libfilament-jni.so (_ZN8filament7backend10trampolineIMNS_12OpenGLDriverEFvNS0_6HandleINS0_14HwRenderTargetEEERKNS0_16RenderPassParamsEERS2_NSt6__ndk15tupleIJS5_S7_EEEJLm0ELm1EEEEDcOT_OT0_OT1_NSC_16integer_sequenceImJXspT2_EEEE+156) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#10 pc 00000000003191c4 /lib/arm64/libfilament-jni.so (ZN8filament7backend5applyIMNS_12OpenGLDriverEFvNS0_6HandleINS0_14HwRenderTargetEEERKNS0_16RenderPassParamsEERS2_NSt6__ndk15tupleIJS5_S7_EEEEEDcOT_OT0_OT1+100) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#11 pc 00000000002fcf80 /lib/arm64/libfilament-jni.so (_ZN8filament7backend11CommandTypeIJMNS0_6DriverEFvNS0_6HandleINS0_14HwRenderTargetEEERKNS0_16RenderPassParamsEEEE7CommandIXadL_ZNS2_15beginRenderPassES5_S8_EEE7executeIMNS_12OpenGLDriverEFvS5_S8_ERSF_EEvOT_OT0_PNS0_11CommandBaseEPl+144) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#12 pc 00000000002f7bd4 /lib/arm64/libfilament-jni.so (_ZN8filament7backend18ConcreteDispatcherINS_12OpenGLDriverEE15beginRenderPassERNS0_6DriverEPNS0_11CommandBaseEPl+68) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]
#13 pc 00000000002c7d30 /lib/arm64/libfilament-jni.so (_ZN8filament7backend11CommandBase7executeERNS0_6DriverE+64) [arm64-v8a::f1793d368b9f66ca1a9dcd82e997e7d6]

@romainguy
Copy link
Collaborator

@pixelflinger Mathias, looks like the assert might be too strict when we want to clear FBO 0. That or we should be careful to clear only COLOR0 for the default framebuffer.

@romainguy romainguy added bug Something isn't working opengl Issue/request specific to OpenGL labels Mar 26, 2020
@geroge-d
Copy link
Author

And we found another issue related to clear process. When we render model into a rendertarget,it seams filament not clear the color buffer of render target ,in despite we call view.setClearTarget(true,true,true)

@pixelflinger
Copy link
Collaborator

@geroge-d can you file another issue for the clear error, and please give us as much info as possible.

pixelflinger added a commit that referenced this issue Mar 27, 2020
we now always mask out target bits that don't exist in the render
target before converting them to GLenums.

Fixes #2285
pixelflinger added a commit that referenced this issue Mar 27, 2020
we now always mask out target bits that don't exist in the render
target before converting them to GLenums.

Fixes #2285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working opengl Issue/request specific to OpenGL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants