Skip to content

Commit ab851c7

Browse files
committed
Fix crash in presentation time implementation
Summary: Something in Audio Trip triggers this bug when running the display at 90Hz. Setting the display panel to 72Hz makes Audio Trip work, but setting it to 90Hz causes it to crash with an error in native_window_set_buffers_timestamp. The error occurs because the surface's window value is null. A simple fix is to check for this and error out, which solves the problem and allows the app to work despite the error. The true root cause of the issue is unknown. Test: Successful Build on master branch Bug: b/369698627 Change-Id: Ib5ccc8bde07e44cb6ebac5b58d370a23b57ff020 Signed-off-by: Abdelrahman Daim <adaim@meta.com>
1 parent 12016e2 commit ab851c7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

opengl/libs/EGL/egl_platform_entries.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,6 +2111,10 @@ EGLBoolean eglPresentationTimeANDROIDImpl(EGLDisplay dpy, EGLSurface surface,
21112111
}
21122112

21132113
egl_surface_t const* const s = get_surface(surface);
2114+
if (!s->getNativeWindow()) {
2115+
setError(EGL_BAD_SURFACE, EGL_FALSE);
2116+
return EGL_FALSE;
2117+
}
21142118
native_window_set_buffers_timestamp(s->getNativeWindow(), time);
21152119

21162120
return EGL_TRUE;

0 commit comments

Comments
 (0)