From 820799e19345e558b9d0051f0357f277b60284fa Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Wed, 22 Jun 2022 03:20:54 +0200 Subject: [PATCH 1/5] FIRE-31718 - truncate preprocessed lsl script text in case of an error to prevent the viewer from stalling while trying to fit a massive blob of text into the script editor --- indra/newview/fslslpreproc.cpp | 16 ++++++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 17 insertions(+) diff --git a/indra/newview/fslslpreproc.cpp b/indra/newview/fslslpreproc.cpp index b2e815df0a..12f46fa2eb 100644 --- a/indra/newview/fslslpreproc.cpp +++ b/indra/newview/fslslpreproc.cpp @@ -1540,6 +1540,22 @@ void FSLSLPreprocessor::start_process() } } } + else + { + // FIRE-31718: Preprocessor crashes viewer on recursive #include + + // Truncate the resulting preprocessed script to something the text field can handle without + // freezing for so long the viewer disconnects. The usual script source code limit is 64kB so + // let's play it safe and allow twice as much here. The script is most likely already unusable + // at this point due to the preprocessor bailing out with an error earlier, so a truncated + // version doesn't hurt more than it already did. + if (output.size() > 128 * 1024) + { + output.resize(128 * 1024); + display_error(LLTrans::getString("fs_preprocessor_truncated")); + } + } + if (!errored) { if (preprocessor_enabled && use_compression) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 722bc66f90..4ecb7e2744 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3153,6 +3153,7 @@ Your current position: [AVATAR_POS] Caching completed for '[FILENAME]' Error: script named '[FILENAME]' isn't safe to copy to the filesystem. This include will fail. Error caching included file '[FILENAME]' + Warning: Preprocessor output truncated due to excessive script text size. This script will most likely not work. From 376b700323317fb7e948317e6a7f04a50dd4cf8b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 Jun 2022 09:05:39 +0200 Subject: [PATCH 2/5] Update German translation --- indra/newview/skins/default/xui/de/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index eb7e2b539c..ed1376612d 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -7038,6 +7038,9 @@ Ihre aktuelle Position: [AVATAR_POS] Fehler beim Cachen der eingebundenen Datei „[FILENAME]“. + + Achtung: Präprozessor-Ausgabe wurde aufgrund exzessiver Textlänge gekürzt. Das Skript wird wahrscheinlich nicht funktionieren. + Vor [SECONDS] Sekunden From 3854603ce8e42ec4939709673aa18ed69397f38f Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 22 Jun 2022 16:26:57 +0200 Subject: [PATCH 3/5] FIRE-31764 French translation update, by Laurent Bechir; Minor Polish update as well --- .../newview/skins/default/xui/fr/strings.xml | 72 +++++++++++++++++++ .../newview/skins/default/xui/pl/strings.xml | 3 + 2 files changed, 75 insertions(+) diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index bcb9e148b9..95f2764cca 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -6824,6 +6824,78 @@ Votre position actuelle : [AVATAR_POS] Détection de la directive compile-as-Mono outrepassant les préférences. + + + Optimisation des fonctions définies par l'utilisateur et des variables globales non référencées. + + + Expression régulière non valide : '[WHAT]' ; optimisation LSL ignorée. + + + Exception détectée : '[WHAT]' ; optimisation LSL sautée. + + + Exception inattendue dans l'optimiseur LSL ; non appliquée. + + + + Compression du texte du script en supprimant les espaces inutiles. + + + Expression régulière non valide : '[WHAT]' ; la compression LSL est ignorée. + + + Exception interceptée : '[WHAT]' ; la compression LSL est ignorée. + + + Exception inattendue dans le compresseur LSL ; non appliquée. + + + + Appliquer la conversion de liste paresseuse. + + + Pas une expression régulière valide : '[WHAT]' ; Le convertisseur de liste paresseux a été ignoré. + + + Exception interceptée : '[WHAT]' ; le convertisseur de liste paresseux a été ignoré. + + + Exception inattendue dans le convertisseur de liste paresseux ; non appliquée. + + + + Application de la conversion des instructions de commutation. + + + Expression régulière non valide : '[WHAT]' ; Le convertisseur d'instruction de commutation a été ignoré. + + + Exception interceptée : '[WHAT]' ; Le convertisseur d'instruction de commutation a été ignoré. + + + Exception inattendue dans le convertisseur d'instruction de commutation ; non appliquée. + + + + Mise en cache du fichier inclus : '[FILENAME]'. + + + Le fichier inclus '[FILENAME]' a changé, remise en cache. + + + La mise en cache est terminée pour '[FILENAME]'. + + + Erreur : le script nommé '[FILENAME]' n'est pas fiable pour être copié dans le système de fichiers. Cet include échouera. + + + Erreur de mise en cache du fichier inclus '[FILENAME]'. + + + Avertissement : La sortie du préprocesseur a été tronquée en raison de la taille excessive du texte du script. Ce script ne fonctionnera probablement pas. + + diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index 5e6b5eabed..a29a537079 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -6329,6 +6329,9 @@ Twoja aktualna pozycja: [AVATAR_POS] Błąd podczas buforowania pliku '[FILENAME]' + + Uwaga: Dane wyjściowe preprocesora zostały skrócone z powodu zbyt dużego rozmiaru tekstu skryptu - prawdopodobnie nie zadziała. + [SECONDS] sekund temu From 5770602a4b0bc808ff4ea4897768d4d96a858727 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Thu, 23 Jun 2022 00:28:56 +0200 Subject: [PATCH 4/5] FIRE-31767 Updated Russian translation, by Romka Swallowtail --- indra/newview/skins/default/xui/ru/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 4d13964120..a760d0a492 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -6626,6 +6626,9 @@ ID объекта: [INSPECTING_KEY] Ошибка кэширования подключенного файла '[FILENAME]' + + Предупреждение: Выходные данные препроцессора усечены из-за чрезмерного размера текста скрипта. Этот скрипт, скорее всего, не будет работать. + [SECONDS] секунд назад From c49fa9a8927b7294138142048eca8ce43148746d Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 27 Jun 2022 23:28:01 +0200 Subject: [PATCH 5/5] FIRE-31330: Don't show for scripted content that temp-attaches a rigged mesh (e.g. insane asylum experience) --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 957cf07b77..0cc0806a6d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -11981,7 +11981,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // place in the code. For now, this is a good spot as the complexity calculation // gets updated when rigging data arrives, so we can reliably identify rigged // attachments where the skinning information took a while to load. - if (attached_object->isHUDAttachment() && attached_object->mCheckRigOnHUD) + if (attached_object->isHUDAttachment() && attached_object->mCheckRigOnHUD && !attached_object->isTempAttachment()) { // check if the root object is rigged bool is_rigged = attached_object->isRiggedMesh();