cppuhelper/source/paths.cxx |    6 ++++--
 desktop/source/app/app.cxx  |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 40d7fc59dec451ca1c5d61c2c6c81d45af971f5c
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Mar 22 17:19:49 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Mar 24 09:08:38 2023 +0000

    rhbz#2171265 Filter out all non *.rdb files
    
    In that rhbz issue ("Libreoffice cannot start"), it looks like some junk 
file
    named /usr/lib64/libreoffice/program/services/services.rdb;63ddcd86 caused
    soffice.bin to crash early, without any information (cf.
    a1faf14f74a62ea76141115538d7d30d90c9eeb6 "rhbz#2171265 Report fatal
    InitApplicationServiceManager failures more reliably").  So, following up on
    b8c7548527f5fc14fe8fcbe74a749c7e3c10d385 "ignore backup files in services/
    directory to avoid debugging grief", extend the set of ignored files to 
anything
    starting with "." or not ending in ".rdb" (in any case).
    
    Change-Id: I154750465d2128b3ff6493f4ab606072dda61503
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149328
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit feb8b04a0ee86b0146a17393da220ae188babda8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149436
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index ece7650ded4c..dd8fe56df2bf 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -99,9 +99,11 @@ bool cppu::nextDirectoryItem(osl::Directory & directory, 
OUString * url) {
                 "Cannot stat in directory");
         }
         if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: 
symlinks
-            // Ignore backup files:
+            // Ignore backup and spurious junk files:
             OUString name(stat.getFileName());
-            if (!(name.match(".") || name.endsWith("~"))) {
+            if (name.match(".") || !name.endsWithIgnoreAsciiCase(u".rdb")) {
+                SAL_WARN("cppuhelper", "ignoring <" << stat.getFileURL() << 
">");
+            } else {
                 *url = stat.getFileURL();
                 return true;
             }
commit af0db7d281b496280bdd0f1bc4eabab42fc37b1a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Mar 22 14:40:04 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Mar 24 09:08:27 2023 +0000

    rhbz#2171265 Report fatal InitApplicationServiceManager failures more 
reliably
    
    For example, when initialization of the UNO type manager failed, any code 
run
    between this SetBootstrapError and the HandleBootstrapErrors in 
Desktop::Main
    which would need the type manager (e.g., to set a css::uno::Any) would have
    caused a crash, so would have failed to print to std::cerr the sought-after
    css::uno::Exception message.  The mis-initialized process would most 
definitely
    crash sooner or later anyway, so there's no harm in a controlled 
std::abort()
    here (if that is even reached, and the process doesn't already crash in
    HandleBootstrapErrors, after it has printed the relevant information to
    std::cerr).
    
    Change-Id: Ic5889aedec0908fa4b1e2966eb188508d0f92d26
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149323
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit a1faf14f74a62ea76141115538d7d30d90c9eeb6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149440
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 135a5b5fdb1f..26c1711abd20 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -28,6 +28,7 @@
 
 #include <sal/config.h>
 
+#include <cstdlib>
 #include <iostream>
 #include <string_view>
 
@@ -455,7 +456,8 @@ void Desktop::Init()
     }
     catch (css::uno::Exception & e)
     {
-        SetBootstrapError( BE_UNO_SERVICEMANAGER, e.Message );
+        HandleBootstrapErrors( BE_UNO_SERVICEMANAGER, e.Message );
+        std::abort();
     }
 
     // Check whether safe mode is enabled

Reply via email to