Skip to content

Commit 442e306

Browse files
authored
Merge pull request rdkcentral#5866 from hgfell683/24Q4_sprint_SERXIONE-6067
SERXIONE-6067: WPEFramework crash
2 parents ef0974f + f234166 commit 442e306

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

DisplaySettings/DisplaySettings.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,11 @@ namespace WPEFramework {
582582
m_service = service;
583583
m_service->AddRef();
584584

585-
m_sendMsgThread = std::thread(sendMsgThread);
585+
try {
586+
m_sendMsgThread = std::thread(sendMsgThread);
587+
} catch (const std::system_error& e) {
588+
LOGERR("Failed to start m_sendMsgThread: %s", e.what());
589+
}
586590
m_timer.connect(std::bind(&DisplaySettings::onTimer, this));
587591
m_AudioDeviceDetectTimer.connect(std::bind(&DisplaySettings::checkAudioDeviceDetectionTimer, this));
588592
m_ArcDetectionTimer.connect(std::bind(&DisplaySettings::checkArcDeviceConnected, this));
@@ -4755,7 +4759,12 @@ namespace WPEFramework {
47554759
try
47564760
{
47574761
LOGWARN("creating worker thread for initAudioPortsWorker ");
4758-
std::thread audioPortInitThread = std::thread(initAudioPortsWorker);
4762+
std::thread audioPortInitThread;
4763+
try {
4764+
audioPortInitThread = std::thread(initAudioPortsWorker);
4765+
} catch (const std::system_error& e) {
4766+
LOGERR("Failed to start initAudioPortsWorker: %s", e.what());
4767+
}
47594768
audioPortInitThread.detach();
47604769
}
47614770
catch(const std::system_error& e)

0 commit comments

Comments
 (0)