RDKEMW-13271: Fix for crash when calling readEDID in STB#18
Conversation
There was a problem hiding this comment.
Pull request overview
Fix intended to prevent a crash when calling ReadEDID on STB by broadening exception handling around EDID retrieval/encoding.
Changes:
- Changed
ReadEDIDexception handler fromcatch (const device::Exception& err)tocatch (...).
| int id; | ||
|
|
||
| LOGERR("ReadEDID: In predebug"); | ||
| try { |
There was a problem hiding this comment.
LOGERR("ReadEDID: In predebug") looks like a temporary debug trace and is logged at error level even on the success path. This will pollute error logs and can confuse monitoring/operations; please remove it or downgrade to an appropriate non-error log level (and same for the later "edidvec predebug" log).
|
|
||
| vector<uint8_t> edidVec({ 'u', 'n', 'k', 'n', 'o', 'w', 'n' }); | ||
|
|
||
| LOGERR("ReadEDID: edidvec predebug"); |
There was a problem hiding this comment.
LOGERR("ReadEDID: edidvec predebug") is emitted unconditionally on the success path at error level and appears to be leftover debugging. Consider removing it or changing to a debug/info-level log gated behind a build/runtime flag.
| LOGERR("ReadEDID: edidvec predebug"); |
| LOGERR("ReadEDID: edidvec predebug"); | ||
| try { | ||
| vector<uint8_t> edidVec2; | ||
| LOGERR("getEDIDBytesInfo predebug"); | ||
| device::HdmiInput::getInstance().getEDIDBytesInfo(id, edidVec2); |
There was a problem hiding this comment.
These LOGERR("...predebug") statements around getEDIDBytesInfo() will produce ERROR-level noise in normal operation and the messages are not actionable. Recommend removing them (or converting to debug-level logs with useful context like portId/id only when needed).
| success = false; | ||
| return Core::ERROR_GENERAL; | ||
| } catch (...) { | ||
| LOGERR("ReadEDID: Caught exception"); |
There was a problem hiding this comment.
In the catch (...) block, the log message is very generic. Since what() is not available here, consider at least logging the portId/id so operational logs can identify which input triggered the failure.
| LOGERR("ReadEDID: Caught exception"); | |
| LOGERR("ReadEDID: Caught exception for portId: %s, id: %d", portId.c_str(), id); |
Reason for change: Fix for crash when calling readEDID in STB
Test Procedure : compiled and verified
Version : Minor
Risks: Low