From 7d5a5e939a7427fb0cabc99e10f75d7d99c5f133 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 27 Mar 2025 18:02:19 +0200 Subject: #3820 crash at LLNotificationTemplate --- indra/llui/llnotifications.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7405413a3d..6fc9b90fb8 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1251,7 +1251,8 @@ LLNotifications::LLNotifications() void LLNotifications::clear() { - mDefaultChannels.clear(); + mDefaultChannels.clear(); + mTemplates.clear(); } // The expiration channel gets all notifications that are cancelled -- cgit v1.2.3 From 193cab14c2cf629e5bf012fc830cb1132389d101 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 29 Mar 2025 14:40:33 +0200 Subject: #3836 Fix crash at LLNotificationForm::getNumElements()/LLSD::size() --- indra/llui/llnotifications.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6fc9b90fb8..634d8f71a2 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -614,6 +614,13 @@ void LLNotification::cancel() LLSD LLNotification::getResponseTemplate(EResponseTemplateType type) { LLSD response = LLSD::emptyMap(); + + if (!mForm) + { + LL_WARNS("Notifications") << "Null form when getting response template for notification " << getName() << LL_ENDL; + return response; + } + for (S32 element_idx = 0; element_idx < mForm->getNumElements(); ++element_idx) @@ -1465,6 +1472,13 @@ bool LLNotifications::templateExists(std::string_view name) void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option) { LLNotificationPtr temp_notify(new LLNotification(params)); + + if (!temp_notify->getForm()) + { + LL_WARNS("Notifications") << "Cannot force response for notification with null form: " << (std::string)params.name << LL_ENDL; + return; + } + LLSD response = temp_notify->getResponseTemplate(); LLSD selected_item = temp_notify->getForm()->getElement(option); -- cgit v1.2.3 From e671cb54fee9cb7b7da39953eb96eabc9151f687 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 29 Mar 2025 22:40:59 +0200 Subject: #3795 Crash at getVolatileAPRPool() --- indra/llui/llnotifications.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 634d8f71a2..a05feab1d9 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1256,10 +1256,26 @@ LLNotifications::LLNotifications() LLInstanceTracker::instanceCount(); } + +LLNotifications::~LLNotifications() +{ + // Clear explicitly, something in ~LLNotifications() crashes so narrowing down suspects + pHistoryChannel = nullptr; + pExpirationChannel = nullptr; + mGlobalStrings.clear(); + mTemplates.clear(); + mVisibilityRules.clear(); + mUniqueNotifications.clear(); + mListener = nullptr; +} + void LLNotifications::clear() { mDefaultChannels.clear(); - mTemplates.clear(); + // At this point mTemplates still gets used by lingering notifications + // to do responses (ex: group notice will call forceResponse()), but + // since network should be down and everything save, it's questionable + // whether it should stay that way } // The expiration channel gets all notifications that are cancelled -- cgit v1.2.3