Skip to content

RDKEMW-19892: [RDKEMW] [BCM Rogers Monarch IUI V2] Linear trick play (FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.#180

Open
ALSAMEEMA wants to merge 26 commits into
developfrom
feature/RDKEMW-19892

Conversation

@ALSAMEEMA

Copy link
Copy Markdown

No description provided.

…(FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.

Signed-off-by: ALSAMEEMA <alsameema4@gmail.com>
@ALSAMEEMA
ALSAMEEMA requested a review from a team as a code owner June 22, 2026 06:21
Copilot AI review requested due to automatic review settings June 22, 2026 06:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Widevine multi-key regression where cenc:default_KID (UUID string form from DASH manifests) was not being matched against 16-byte binary Key IDs parsed from PSSH, leading to wrong-key selection during trick play and downstream failures.

Changes:

  • Update WidevineDrmHelper::setDefaultKeyID() to also accept UUID strings (hyphenated / case variants) by decoding them to 16-byte binary before matching.
  • Add/adjust fallback + logging behavior in WidevineDrmHelper::getKey()/setDefaultKeyID().
  • Add a new unit-test suite covering default key selection scenarios, including multi-key selection via UUID.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
drm/helper/WidevineDrmHelper.cpp Implements UUID-to-binary matching for setDefaultKeyID() and adjusts fallback/logging in key selection.
test/utests/tests/DrmTests/DrmHelperTests.cpp Adds unit tests intended to validate correct default key selection across multiple input formats and key counts.

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

Comment thread drm/helper/WidevineDrmHelper.cpp Outdated
Comment thread drm/helper/WidevineDrmHelper.cpp
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Copilot AI review requested due to automatic review settings June 22, 2026 06:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment thread drm/helper/WidevineDrmHelper.cpp
Comment thread drm/helper/WidevineDrmHelper.cpp Outdated
Comment thread drm/helper/WidevineDrmHelper.cpp
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Copilot AI review requested due to automatic review settings June 22, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Comment thread drm/helper/WidevineDrmHelper.cpp Outdated
@ALSAMEEMA
ALSAMEEMA force-pushed the feature/RDKEMW-19892 branch from 50390d0 to fcc2f4d Compare June 22, 2026 07:05
ALSAMEEMA and others added 4 commits June 22, 2026 12:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…(FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.
…(FF/RW/Seek) leads to blank screen, device hang, followed by automatic reboot. Multiple critical processes (gmem, WPENetworkProce, WorkerPoolType: etc.) crash were observed.

Signed-off-by: ALSAMEEMA <alsameema4@gmail.com>
Copilot AI review requested due to automatic review settings June 22, 2026 07:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread drm/helper/WidevineDrmHelper.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 22, 2026 07:17
ALSAMEEMA and others added 4 commits June 22, 2026 12:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread drm/helper/WidevineDrmHelper.cpp
Comment thread drm/helper/WidevineDrmHelper.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 22, 2026 07:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Comment thread drm/helper/WidevineDrmHelper.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 06:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread drm/helper/WidevineDrmHelper.cpp
Comment on lines +262 to 266
else if (!mKeyIDs.empty())
{
keyID = this->mKeyIDs.at(0);
MW_LOG_WARN("mDefaultKeySlot(%d) not found in mKeyIDs, falling back to first entry", mDefaultKeySlot);
keyID = mKeyIDs.begin()->second;
}
Copilot AI review requested due to automatic review settings July 10, 2026 06:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread drm/helper/WidevineDrmHelper.cpp Outdated
Comment thread drm/helper/WidevineDrmHelper.cpp Outdated
Comment on lines 255 to 257
std::string keyStr = PlayerLogManager::getHexDebugStr(keyPair.second);
MW_LOG_DEBUG("Key ID [%d]: %s", keyPair.first, keyStr.c_str());
}
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 07:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 07:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Comment thread test/utests/tests/DrmTests/DrmHelperTests.cpp
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
ASSERT_TRUE(DrmHelperEngine::getInstance().hasDRM(drmInfo));
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
ASSERT_NE(widevineHelper, nullptr);
ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));
Copilot AI review requested due to automatic review settings July 15, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@@ -212,22 +250,29 @@ void WidevineDrmHelper::createInitData(std::vector<uint8_t>& initData) const
void WidevineDrmHelper::getKey(std::vector<uint8_t>& keyID) const
{
MW_LOG_WARN("WidevineDrmHelper::getKey defaultkey: %d mKeyIDs.size:%zu", mDefaultKeySlot, mKeyIDs.size());
Comment on lines 226 to +228
mDefaultKeySlot = it.first;
MW_LOG_WARN("setDefaultKeyID : %s slot : %d", PlayerLogManager::getHexDebugStr(defaultKeyID).c_str(), mDefaultKeySlot);
MW_LOG_WARN("setDefaultKeyID : %s slot : %d", PlayerLogManager::getHexDebugStr(it.second).c_str(), mDefaultKeySlot);
break;
Copilot AI review requested due to automatic review settings July 20, 2026 06:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (6)

test/utests/tests/DrmTests/DrmHelperTests.cpp:623

  • psshDataPtr is freed only at the end of the test, but ASSERT_TRUE(parsePssh(...)) will abort the test early on failure and skip the free(), leaking the decode buffer. Free the buffer before asserting by storing the parse result in a local bool (and nulling the pointer so the existing cleanup stays safe).
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

test/utests/tests/DrmTests/DrmHelperTests.cpp:656

  • psshDataPtr is freed only at the end of the test, but ASSERT_TRUE(parsePssh(...)) will abort early on failure and skip the free(). Free the decode buffer before asserting to keep this test leak-free even when it fails.
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

test/utests/tests/DrmTests/DrmHelperTests.cpp:709

  • ASSERT_TRUE(parsePssh(...)) can abort the test before the trailing free(psshDataPtr) runs, leaking the base64 decode buffer when the assertion fails. Prefer freeing immediately after parsing (and null the pointer so the existing cleanup remains safe).
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

test/utests/tests/DrmTests/DrmHelperTests.cpp:772

  • This test frees psshDataPtr at the end, but ASSERT_TRUE(parsePssh(...)) will return early on failure and skip cleanup. Free the decode buffer before the assertion to avoid leaks in failing runs.
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

test/utests/tests/DrmTests/DrmHelperTests.cpp:823

  • psshDataPtr cleanup can be skipped if ASSERT_TRUE(parsePssh(...)) fails (ASSERT aborts the test). Free the buffer before asserting so this test stays clean under failure/sanitizers.
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

test/utests/tests/DrmTests/DrmHelperTests.cpp:865

  • As written, ASSERT_TRUE(parsePssh(...)) can abort the test before the final free(psshDataPtr) executes, leaking the decode buffer on failure. Free psshDataPtr immediately after parsing and assert on the saved result.
	std::shared_ptr<DrmHelper> widevineHelper = DrmHelperEngine::getInstance().createHelper(drmInfo);
	ASSERT_NE(widevineHelper, nullptr);
	ASSERT_TRUE(widevineHelper->parsePssh(psshDataPtr, (uint32_t)psshDataLen));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants