summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-08-12 15:56:52 +0300
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-24 21:16:24 +0100
commite47403fc779720c35930059c513320312ba41c59 (patch)
tree4676ffc82e864cfe41ad77db91a357fc6bab74a5 /vcl
parent714c8772de4255108aa9a0739a37ad422522ff7e (diff)
tdf#100965: Restart on initialisation-time OpenCL crash
Add a flag to the OpenCLZone indicating whether we are performing the first-start OpenCL functionality verification, so that if we run into a crash that is caught by the VCL VCLExceptionSignal_impl() handler, we terminate the process with the EXITHELPER_NORMAL_RESTART status after first having disabled OpenCL use. The wrapper process will then restart soffice.bin. This is for Windows only so far. This matches what we do if OpenGL fails early during start of LibreOffice. Also, the enter() and leave() functions are not used anywhere (cherry picked from commit 32881f01833dbcefd5600e1135dd8743178bfd96) (cherry picked from commit b9898f03eb05411c508b1b02588812074d40417a) Reviewed-on: https://gerrit.libreoffice.org/28138 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit e2d5eec6ad49bab6aac2295a1882bf75184aa50c) Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svmain.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 23e3fd9957ca..7bd3c311a4f3 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -24,6 +24,8 @@
#include <osl/file.hxx>
#include <osl/signal.h>
+#include <desktop/exithelper.h>
+
#include "tools/debug.hxx"
#include "tools/resmgr.hxx"
@@ -115,7 +117,13 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
OpenGLZone::hardDisable();
#if HAVE_FEATURE_OPENCL
if (OpenCLZone::isInZone())
+ {
OpenCLZone::hardDisable();
+#ifdef _WIN32
+ if (OpenCLZone::isInInitialTest())
+ TerminateProcess(GetCurrentProcess(), EXITHELPER_NORMAL_RESTART);
+#endif
+ }
#endif
}