parent
9f1dd53c30
commit
7ecfc95d35
@ -0,0 +1,43 @@
|
|||||||
|
From feb8b04a0ee86b0146a17393da220ae188babda8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Bergmann <sbergman@redhat.com>
|
||||||
|
Date: Wed, 22 Mar 2023 17:19:49 +0100
|
||||||
|
Subject: [PATCH] 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 <sbergman@redhat.com>
|
||||||
|
---
|
||||||
|
cppuhelper/source/paths.cxx | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
From a1faf14f74a62ea76141115538d7d30d90c9eeb6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Bergmann <sbergman@redhat.com>
|
||||||
|
Date: Wed, 22 Mar 2023 14:40:04 +0100
|
||||||
|
Subject: [PATCH] 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 <sbergman@redhat.com>
|
||||||
|
---
|
||||||
|
desktop/source/app/app.cxx | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
|
||||||
|
index 5a35b5a745c2..f1ec0b679bc0 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>
|
||||||
|
|
||||||
|
@@ -458,7 +459,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
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
Loading…
Reference in new issue