From 40ca385fc33bae7ca21e315bf6bbdf837e66f367 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Mon, 18 May 2026 18:25:25 +0530 Subject: [PATCH 01/13] Adding logs --- Source/core/Proxy.h | 6 ++++++ Source/websocket/JSONRPCLink.h | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 10da88bcb..129cb0b4e 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,6 +1636,9 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { + if(key.find('@') != std::string::npos) { + TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); + } // Oops we do not have such an element, create it... Core::ProxyType newItem; Core::ProxyType::template CreateMove(newItem, 0, *this, std::forward(args)...); @@ -1654,6 +1657,9 @@ POP_WARNING() } } else { + if(key.find('@') != std::string::npos) { + TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); + } result = Core::ProxyType(index->second.first); } diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index fb7ae08f0..c3fd1926a 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -131,8 +131,11 @@ namespace WPEFramework { : BaseClass(5, FactoryImpl::Instance(), callsign, _T("JSON"), query, "", false, false, false, remoteNode.AnyInterface(), remoteNode, 256, -1) , _parent(*parent) { + TRACE_L1("[RM_CRASH] Creating channel for %s for callsign: [%s]", remoteNode.HostAddress().c_str(), callsign.c_str()); + } + ~ChannelImpl() override { + TRACE_L1("[RM_CRASH] Destroying channel for %s for callsign: [%s]", RemoteNode().HostAddress().c_str(), Callsign().c_str()); } - ~ChannelImpl() override = default; public: virtual void Received(Core::ProxyType& jsonObject) override @@ -195,10 +198,13 @@ namespace WPEFramework { : _channel(this, remoteNode, callsign, query) , _sequence(0) { + TRACE_L1("[RM_CRASH] Creating communication channel for remoteNode: %s callsign: [%s]", remoteNode.HostAddress().c_str(), callsign.c_str()); } public: - virtual ~CommunicationChannel() = default; + virtual ~CommunicationChannel() { + TRACE_L1("[RM_CRASH] Destroying communication channel for remoteNode: %s callsign: [%s]", RemoteNode().HostAddress().c_str(), Callsign().c_str()); + } static Core::ProxyType Instance(const Core::NodeId& remoteNode, const string& callsign, const string& query) { static Core::ProxyMapType channelMap; @@ -522,6 +528,7 @@ namespace WPEFramework { , _scheduledTime(0) , _versionstring() { + TRACE_L1("[RM_CRASH] Creating LinkType for callsign: [%s] for localCallsign: [%s]", callsign.c_str(), localCallsign ? localCallsign : "nullptr"); if (localCallsign == nullptr) { static uint32_t sequence; _localSpace = string("temporary") + Core::NumberType(Core::InterlockedIncrement(sequence)).Text(); @@ -556,6 +563,7 @@ namespace WPEFramework { } virtual ~LinkType() { + TRACE_L1("[RM_CRASH] Destroying LinkType for callsign: [%s]", Callsign().c_str()); _channel->Unregister(*this); for (auto& element : _pendingQueue) { @@ -1313,11 +1321,13 @@ namespace WPEFramework { , _eventSubscriber(*this) , _state(UNKNOWN) { + TRACE_L1("[CRASH_RM] Creating Connection for callsign %s", Base::Callsign().c_str()); _monitor.template Assign(_T("statechange"), &Connection::state_change, this); LinkType::Announce(); } ~Connection() override { + TRACE_L1("[CRASH_RM] Destructing Connection for callsign %s", Base::Callsign().c_str()); _monitor.Revoke(_T("statechange")); _eventSubscriber.Stop(); _eventSubscriber.Wait(Core::Thread::STOPPED, Core::infinite); From e6a005c81483d53a7a34082661bf0baca8b87cd8 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Mon, 18 May 2026 19:28:11 +0530 Subject: [PATCH 02/13] Addressing compilation error --- Source/websocket/JSONRPCLink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index c3fd1926a..aee697390 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -131,10 +131,10 @@ namespace WPEFramework { : BaseClass(5, FactoryImpl::Instance(), callsign, _T("JSON"), query, "", false, false, false, remoteNode.AnyInterface(), remoteNode, 256, -1) , _parent(*parent) { - TRACE_L1("[RM_CRASH] Creating channel for %s for callsign: [%s]", remoteNode.HostAddress().c_str(), callsign.c_str()); + TRACE_L1("[RM_CRASH] Creating channelImpl for %s for callsign: [%s] this: %p", remoteNode.HostAddress().c_str(), callsign.c_str(), this); } ~ChannelImpl() override { - TRACE_L1("[RM_CRASH] Destroying channel for %s for callsign: [%s]", RemoteNode().HostAddress().c_str(), Callsign().c_str()); + TRACE_L1("[RM_CRASH] Destroying channelImpl %p", this); } public: From b8e36482e06470377b901b017b4473cd3bb800ad Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Mon, 18 May 2026 19:45:07 +0530 Subject: [PATCH 03/13] Fixing another compilation error --- Source/websocket/JSONRPCLink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index aee697390..0a0954ec0 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -203,7 +203,7 @@ namespace WPEFramework { public: virtual ~CommunicationChannel() { - TRACE_L1("[RM_CRASH] Destroying communication channel for remoteNode: %s callsign: [%s]", RemoteNode().HostAddress().c_str(), Callsign().c_str()); + TRACE_L1("[RM_CRASH] Destroying communication channel for callsign: [%s]", Callsign().c_str()); } static Core::ProxyType Instance(const Core::NodeId& remoteNode, const string& callsign, const string& query) { From b2893e3b61ee6184dc61647b5b555acef2000a75 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Tue, 19 May 2026 10:56:52 +0530 Subject: [PATCH 04/13] Addressing compilation error --- Source/websocket/JSONRPCLink.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index 0a0954ec0..c920b77fc 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -198,12 +198,12 @@ namespace WPEFramework { : _channel(this, remoteNode, callsign, query) , _sequence(0) { - TRACE_L1("[RM_CRASH] Creating communication channel for remoteNode: %s callsign: [%s]", remoteNode.HostAddress().c_str(), callsign.c_str()); + TRACE_L1("[RM_CRASH] Creating communication channel for remoteNode: %s callsign: [%s] this: %p", remoteNode.HostAddress().c_str(), callsign.c_str(), this); } public: virtual ~CommunicationChannel() { - TRACE_L1("[RM_CRASH] Destroying communication channel for callsign: [%s]", Callsign().c_str()); + TRACE_L1("[RM_CRASH] Destroying communication channel this:[%p]", this); } static Core::ProxyType Instance(const Core::NodeId& remoteNode, const string& callsign, const string& query) { @@ -528,7 +528,7 @@ namespace WPEFramework { , _scheduledTime(0) , _versionstring() { - TRACE_L1("[RM_CRASH] Creating LinkType for callsign: [%s] for localCallsign: [%s]", callsign.c_str(), localCallsign ? localCallsign : "nullptr"); + TRACE_L1("[RM_CRASH] Creating LinkType for callsign: [%s] for localCallsign: [%s] this: %p", callsign.c_str(), localCallsign ? localCallsign : "nullptr", this); if (localCallsign == nullptr) { static uint32_t sequence; _localSpace = string("temporary") + Core::NumberType(Core::InterlockedIncrement(sequence)).Text(); @@ -563,7 +563,7 @@ namespace WPEFramework { } virtual ~LinkType() { - TRACE_L1("[RM_CRASH] Destroying LinkType for callsign: [%s]", Callsign().c_str()); + TRACE_L1("[RM_CRASH] Destroying LinkType this: [%p]", this); _channel->Unregister(*this); for (auto& element : _pendingQueue) { @@ -1321,13 +1321,13 @@ namespace WPEFramework { , _eventSubscriber(*this) , _state(UNKNOWN) { - TRACE_L1("[CRASH_RM] Creating Connection for callsign %s", Base::Callsign().c_str()); + TRACE_L1("[CRASH_RM] Creating Connection for callsign %s this: %p", callsign.c_str(), this); _monitor.template Assign(_T("statechange"), &Connection::state_change, this); LinkType::Announce(); } ~Connection() override { - TRACE_L1("[CRASH_RM] Destructing Connection for callsign %s", Base::Callsign().c_str()); + TRACE_L1("[CRASH_RM] Destructing Connection for this: %p", this); _monitor.Revoke(_T("statechange")); _eventSubscriber.Stop(); _eventSubscriber.Wait(Core::Thread::STOPPED, Core::infinite); From 2ddd3b7d610318cb46ef535db62b16f43537945b Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Tue, 19 May 2026 12:46:52 +0530 Subject: [PATCH 05/13] Checking PROXY KEY type before treating it as string --- Source/core/Proxy.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 129cb0b4e..7fc3cb7d7 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,8 +1636,10 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { - if(key.find('@') != std::string::npos) { - TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); + if constexpr (std::is_same::value) { + if(key.find('@') != std::string::npos) { + TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); + } } // Oops we do not have such an element, create it... Core::ProxyType newItem; @@ -1657,8 +1659,10 @@ POP_WARNING() } } else { - if(key.find('@') != std::string::npos) { - TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); + if constexpr (std::is_same::value) { + if(key.find('@') != std::string::npos) { + TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); + } } result = Core::ProxyType(index->second.first); } From 8e0ec6663615834f824cf3fc3e70f0617fcdff28 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Tue, 19 May 2026 13:01:34 +0530 Subject: [PATCH 06/13] making it SFINEA based rather constexpr based --- Source/core/Proxy.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 7fc3cb7d7..39437aa6d 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,11 +1636,7 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { - if constexpr (std::is_same::value) { - if(key.find('@') != std::string::npos) { - TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); - } - } + LogKeyIfAtSign(key, "[CRASH_RM] Creating a new element for key: %s\n"); // Oops we do not have such an element, create it... Core::ProxyType newItem; Core::ProxyType::template CreateMove(newItem, 0, *this, std::forward(args)...); @@ -1659,11 +1655,7 @@ POP_WARNING() } } else { - if constexpr (std::is_same::value) { - if(key.find('@') != std::string::npos) { - TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); - } - } + LogKeyIfAtSign(key, "[CRASH_RM] Reusing existing element for key: %s\n"); result = Core::ProxyType(index->second.first); } @@ -1775,6 +1767,20 @@ POP_WARNING() } private: + template + static typename std::enable_if::value, void>::type + LogKeyIfAtSign(const KEY& key, const char* msg) + { + if (key.find('@') != std::string::npos) { + TRACE_L1(msg, key.c_str()); + } + } + template + static typename std::enable_if::value, void>::type + LogKeyIfAtSign(const KEY&, const char*) + { + } + ContainerMap _map; mutable Core::CriticalSection _lock; }; From e2caa1d536a2cee9889de35db946b83a7459c0a6 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Tue, 19 May 2026 13:22:32 +0530 Subject: [PATCH 07/13] Changing SFINAE function --- Source/core/Proxy.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 39437aa6d..210c74648 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,7 +1636,9 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { - LogKeyIfAtSign(key, "[CRASH_RM] Creating a new element for key: %s\n"); + if (KeyHasAtSign(key)) { + TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); + } // Oops we do not have such an element, create it... Core::ProxyType newItem; Core::ProxyType::template CreateMove(newItem, 0, *this, std::forward(args)...); @@ -1655,7 +1657,9 @@ POP_WARNING() } } else { - LogKeyIfAtSign(key, "[CRASH_RM] Reusing existing element for key: %s\n"); + if (KeyHasAtSign(key)) { + TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); + } result = Core::ProxyType(index->second.first); } @@ -1768,17 +1772,16 @@ POP_WARNING() private: template - static typename std::enable_if::value, void>::type - LogKeyIfAtSign(const KEY& key, const char* msg) + static typename std::enable_if::value, bool>::type + KeyHasAtSign(const KEY& key) { - if (key.find('@') != std::string::npos) { - TRACE_L1(msg, key.c_str()); - } + return (key.find('@') != std::string::npos); } template - static typename std::enable_if::value, void>::type - LogKeyIfAtSign(const KEY&, const char*) + static typename std::enable_if::value, bool>::type + KeyHasAtSign(const KEY&) { + return false; } ContainerMap _map; From 31c5be89bac396ea64d69be05db08809fe563a84 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Tue, 19 May 2026 13:45:35 +0530 Subject: [PATCH 08/13] Addressing compilation error --- Source/core/Proxy.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 210c74648..03b4648db 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,9 +1636,7 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { - if (KeyHasAtSign(key)) { - TRACE_L1("[CRASH_RM] Creating a new element for key: %s\n", key.c_str()); - } + TRACE_L1("[CRASH_RM] Creating a new element for key: %p\n", &key); // Oops we do not have such an element, create it... Core::ProxyType newItem; Core::ProxyType::template CreateMove(newItem, 0, *this, std::forward(args)...); @@ -1658,7 +1656,7 @@ POP_WARNING() } } else { if (KeyHasAtSign(key)) { - TRACE_L1("[CRASH_RM] Reusing existing element for key: %s\n", key.c_str()); + TRACE_L1("[CRASH_RM] Reusing existing element for key: %p\n", &key); } result = Core::ProxyType(index->second.first); } @@ -1771,18 +1769,6 @@ POP_WARNING() } private: - template - static typename std::enable_if::value, bool>::type - KeyHasAtSign(const KEY& key) - { - return (key.find('@') != std::string::npos); - } - template - static typename std::enable_if::value, bool>::type - KeyHasAtSign(const KEY&) - { - return false; - } ContainerMap _map; mutable Core::CriticalSection _lock; From a68229ff0faf23052f0edf69e2e02bb6420ec8b0 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Wed, 20 May 2026 06:40:51 +0530 Subject: [PATCH 09/13] Fixing compilation error --- Source/core/Proxy.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 03b4648db..7a4aa670a 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1655,9 +1655,7 @@ POP_WARNING() } } else { - if (KeyHasAtSign(key)) { - TRACE_L1("[CRASH_RM] Reusing existing element for key: %p\n", &key); - } + TRACE_L1("[CRASH_RM] Reusing existing element for key: %p\n", &key); result = Core::ProxyType(index->second.first); } From 89c89d6f56aaef25fa178f4461decc82ece631a2 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Wed, 20 May 2026 19:14:36 +0530 Subject: [PATCH 10/13] First trial to attempt Channel registry --- Source/websocket/JSONRPCLink.cpp | 13 +++++++++++++ Source/websocket/JSONRPCLink.h | 20 ++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Source/websocket/JSONRPCLink.cpp b/Source/websocket/JSONRPCLink.cpp index dd006f707..16a9bb3bd 100644 --- a/Source/websocket/JSONRPCLink.cpp +++ b/Source/websocket/JSONRPCLink.cpp @@ -21,6 +21,19 @@ namespace WPEFramework { +namespace JSONRPC { + + // Shared channel map stored in the library's data segment. + // This ensures all DSOs using JSONRPCLink share the same map instance, + // preventing crashes when plugins unload while others still hold references. + Core::ProxyMapType& GetChannelMap() + { + static Core::ProxyMapType channelMap; + return channelMap; + } + +} // namespace JSONRPC + ENUM_CONVERSION_BEGIN(WPEFramework::JSONRPC::JSONPluginState) { WPEFramework::JSONRPC::DEACTIVATED, _TXT("Deactivated") }, diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index c920b77fc..476d529cc 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -28,12 +28,21 @@ namespace WPEFramework { using namespace Core::TypeTraits; + // Base class for CommunicationChannel to allow shared storage across DSO boundaries + class EXTERNAL CommunicationChannelBase { + public: + virtual ~CommunicationChannelBase() = default; + }; + + // Returns the shared channel map stored in the library's data segment + EXTERNAL Core::ProxyMapType& GetChannelMap(); + template class LinkType { private: typedef std::function CallbackFunction; - class CommunicationChannel { + class CommunicationChannel : public CommunicationChannelBase { private: // ----------------------------------------------------------------------------------------------- // Create a resource allocator for all JSON objects used in these tests @@ -202,16 +211,15 @@ namespace WPEFramework { } public: - virtual ~CommunicationChannel() { + ~CommunicationChannel() override { TRACE_L1("[RM_CRASH] Destroying communication channel this:[%p]", this); } static Core::ProxyType Instance(const Core::NodeId& remoteNode, const string& callsign, const string& query) { - static Core::ProxyMapType channelMap; - - string searchLine = remoteNode.HostAddress() + '@' + callsign; + // Use type-discriminated key to prevent collisions between different INTERFACE types + string searchLine = remoteNode.HostAddress() + '@' + callsign + '@' + typeid(INTERFACE).name(); - return (channelMap.template Instance(searchLine, remoteNode, callsign, query)); + return (GetChannelMap().template Instance(searchLine, remoteNode, callsign, query)); } public: From 5fc2e2d9aa4cd851671814ae95b7e800c32f384d Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Thu, 21 May 2026 07:04:52 +0530 Subject: [PATCH 11/13] Addressing Compilation error --- Source/websocket/JSONRPCLink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index 476d529cc..99793bd75 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -219,7 +219,7 @@ namespace WPEFramework { // Use type-discriminated key to prevent collisions between different INTERFACE types string searchLine = remoteNode.HostAddress() + '@' + callsign + '@' + typeid(INTERFACE).name(); - return (GetChannelMap().template Instance(searchLine, remoteNode, callsign, query)); + return Core::ProxyType(GetChannelMap().template Instance(searchLine, remoteNode, callsign, query)); } public: From 6f9da0374b78774391a993ed5ac3729d71c0dd7a Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Thu, 21 May 2026 12:12:50 +0530 Subject: [PATCH 12/13] Doing Code Cleanup --- Source/core/Proxy.h | 2 -- Source/websocket/JSONRPCLink.h | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index 7a4aa670a..fc284f84e 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1636,7 +1636,6 @@ POP_WARNING() typename ContainerMap::iterator index(_map.find(key)); if (index == _map.end()) { - TRACE_L1("[CRASH_RM] Creating a new element for key: %p\n", &key); // Oops we do not have such an element, create it... Core::ProxyType newItem; Core::ProxyType::template CreateMove(newItem, 0, *this, std::forward(args)...); @@ -1655,7 +1654,6 @@ POP_WARNING() } } else { - TRACE_L1("[CRASH_RM] Reusing existing element for key: %p\n", &key); result = Core::ProxyType(index->second.first); } diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index 99793bd75..e4d5ff690 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -140,11 +140,8 @@ namespace WPEFramework { : BaseClass(5, FactoryImpl::Instance(), callsign, _T("JSON"), query, "", false, false, false, remoteNode.AnyInterface(), remoteNode, 256, -1) , _parent(*parent) { - TRACE_L1("[RM_CRASH] Creating channelImpl for %s for callsign: [%s] this: %p", remoteNode.HostAddress().c_str(), callsign.c_str(), this); - } - ~ChannelImpl() override { - TRACE_L1("[RM_CRASH] Destroying channelImpl %p", this); } + ~ChannelImpl() override = default; public: virtual void Received(Core::ProxyType& jsonObject) override @@ -207,7 +204,6 @@ namespace WPEFramework { : _channel(this, remoteNode, callsign, query) , _sequence(0) { - TRACE_L1("[RM_CRASH] Creating communication channel for remoteNode: %s callsign: [%s] this: %p", remoteNode.HostAddress().c_str(), callsign.c_str(), this); } public: @@ -536,7 +532,6 @@ namespace WPEFramework { , _scheduledTime(0) , _versionstring() { - TRACE_L1("[RM_CRASH] Creating LinkType for callsign: [%s] for localCallsign: [%s] this: %p", callsign.c_str(), localCallsign ? localCallsign : "nullptr", this); if (localCallsign == nullptr) { static uint32_t sequence; _localSpace = string("temporary") + Core::NumberType(Core::InterlockedIncrement(sequence)).Text(); @@ -571,7 +566,6 @@ namespace WPEFramework { } virtual ~LinkType() { - TRACE_L1("[RM_CRASH] Destroying LinkType this: [%p]", this); _channel->Unregister(*this); for (auto& element : _pendingQueue) { @@ -1329,13 +1323,11 @@ namespace WPEFramework { , _eventSubscriber(*this) , _state(UNKNOWN) { - TRACE_L1("[CRASH_RM] Creating Connection for callsign %s this: %p", callsign.c_str(), this); _monitor.template Assign(_T("statechange"), &Connection::state_change, this); LinkType::Announce(); } ~Connection() override { - TRACE_L1("[CRASH_RM] Destructing Connection for this: %p", this); _monitor.Revoke(_T("statechange")); _eventSubscriber.Stop(); _eventSubscriber.Wait(Core::Thread::STOPPED, Core::infinite); From bfd79bfe0dc61a30d527ad92261f1ba4f958e739 Mon Sep 17 00:00:00 2001 From: Karthick Somasundaresan Date: Thu, 21 May 2026 12:18:53 +0530 Subject: [PATCH 13/13] Code cleanup - 2 --- Source/core/Proxy.h | 1 - Source/websocket/JSONRPCLink.h | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/core/Proxy.h b/Source/core/Proxy.h index fc284f84e..10da88bcb 100644 --- a/Source/core/Proxy.h +++ b/Source/core/Proxy.h @@ -1765,7 +1765,6 @@ POP_WARNING() } private: - ContainerMap _map; mutable Core::CriticalSection _lock; }; diff --git a/Source/websocket/JSONRPCLink.h b/Source/websocket/JSONRPCLink.h index e4d5ff690..c00882ca8 100644 --- a/Source/websocket/JSONRPCLink.h +++ b/Source/websocket/JSONRPCLink.h @@ -207,9 +207,7 @@ namespace WPEFramework { } public: - ~CommunicationChannel() override { - TRACE_L1("[RM_CRASH] Destroying communication channel this:[%p]", this); - } + ~CommunicationChannel() override = default; static Core::ProxyType Instance(const Core::NodeId& remoteNode, const string& callsign, const string& query) { // Use type-discriminated key to prevent collisions between different INTERFACE types