Skip to content

Conversation

@tpaul627
Copy link
Contributor

@tpaul627 tpaul627 commented Jan 1, 2026

Reason for change: To address the subtec crash seen in Bcom streambox with RDKE
Test Procedure: check for any subtec crash when playing app, subtec sanity tests
Priority: P1
Risks: Low

tpaul627 and others added 2 commits December 29, 2025 07:57
Reason for change: To address the subtec crash seen in Bcom streambox with RDKE
Test Procedure: check for any subtec crash when playing app, subtec sanity tests
Priority: P1
Risks: Low
Signed-off-by: Tony Paul <Tony_Paul@comcast.com>
@tpaul627 tpaul627 requested a review from a team as a code owner January 1, 2026 06:02
@tpaul627 tpaul627 requested a review from sujeeshtp January 1, 2026 09:26
@sujeeshtp sujeeshtp requested a review from Copilot January 5, 2026 15:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a crash in the subtec component when running with SDK22 on Bcom streambox with RDKE. The fix attempts to improve EGL display initialization robustness by using the modern eglGetPlatformDisplayEXT API when available, with a fallback to the legacy eglGetDisplay API.

Key Changes:

  • Conditionally includes EGL/eglext.h when USE_UPSTREAM_WAYLAND is defined to access platform-specific EGL extensions
  • Modifies initRendering() to attempt using eglGetPlatformDisplayEXT before falling back to eglGetDisplay

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +142 to +153
#ifdef USE_UPSTREAM_WAYLAND
#ifdef EGL_PLATFORM_WAYLAND_EXT
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast<PFNEGLGETPLATFORMDISPLAYEXTPROC>(eglGetProcAddress("eglGetPlatformDisplayEXT"));
if (eglGetPlatformDisplayEXT)
m_eglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_WAYLAND_EXT, getDisplay()->getNativeObject(), nullptr);
else
#endif
#endif
if (!m_eglDisplay)
{
m_eglDisplay = eglGetDisplay(getDisplay()->getNativeObject());
}
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The control flow logic is incorrect due to improper placement of preprocessor directives. When both USE_UPSTREAM_WAYLAND and EGL_PLATFORM_WAYLAND_EXT are defined, the 'else' at line 147 pairs with the 'if' at line 145, making the fallback check at line 150 part of the else clause. This means if eglGetPlatformDisplayEXT is not null but returns EGL_NO_DISPLAY (a valid error case), the fallback to eglGetDisplay will never execute because the else clause is skipped. The 'else' keyword at line 147 should be removed so that line 150's check always runs as an independent fallback, regardless of whether eglGetPlatformDisplayEXT was attempted.

Copilot uses AI. Check for mistakes.
@sujeeshtp sujeeshtp merged commit 2772af5 into develop Jan 7, 2026
14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants