From 3b4e34e57ca6b9db40b2698d34d855dd8686875f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20I=C3=B1igo=20Blasco?= Date: Fri, 3 Apr 2026 23:09:35 +0200 Subject: [PATCH 1/2] fix(protoapp): always call loadConfig for streaming sources Previously, loadConfig() was only called if there was a saved config. On first run (no saved config), plugins wouldn't receive loadConfig() before the dialog was shown, preventing them from initializing properly (e.g., populating encoding lists from runtime host). --- pj_proto_app/src/main_window.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pj_proto_app/src/main_window.cpp b/pj_proto_app/src/main_window.cpp index 1d2c5b99..d977fe1b 100644 --- a/pj_proto_app/src/main_window.cpp +++ b/pj_proto_app/src/main_window.cpp @@ -354,10 +354,9 @@ void MainWindow::onStartStream() { // Bind runtime host early so the dialog can call listAvailableEncodings() session->bindRuntimeHostForDialog(); - // Restore saved config so the dialog remembers previous choices - if (!saved_config.empty()) { - (void)session->handle().loadConfig(saved_config); - } + // Always call loadConfig() so the plugin can initialize (e.g., populate encodings list) + // even if there's no saved config yet + (void)session->handle().loadConfig(saved_config); // Dialog flow — use the session's own handle, not a temp handle std::string config = saved_config; From aa17687f34d945b6b9c998947e7ab2b463c9eea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20I=C3=B1igo=20Blasco?= Date: Sat, 4 Apr 2026 00:11:18 +0200 Subject: [PATCH 2/2] fix(plugins): add RTLD_DEEPBIND to prevent OpenSSL symbol conflicts paho-mqtt-cpp (built against Conan's OpenSSL) conflicted with the system's libcrypto.so.3 when the plugin was loaded via dlopen. Added RTLD_DEEPBIND to the dlopen call so each plugin resolves its own symbols instead of the global ones, preventing crashes in MQTT dialog when creating the discovery client. --- pj_plugins/src/detail/library_loader.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pj_plugins/src/detail/library_loader.hpp b/pj_plugins/src/detail/library_loader.hpp index 0c528e3d..f8a972f1 100644 --- a/pj_plugins/src/detail/library_loader.hpp +++ b/pj_plugins/src/detail/library_loader.hpp @@ -21,7 +21,7 @@ inline Expected loadLibraryHandle(std::string_view path) { } return reinterpret_cast(module); #else - void* handle = dlopen(std::string(path).c_str(), RTLD_NOW | RTLD_LOCAL); + void* handle = dlopen(std::string(path).c_str(), RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); if (handle == nullptr) { return unexpected(std::string(dlerror())); }