31 Commits
Author SHA1 Message Date
Gabor Kelemen a8d39edda0 Put headers behind #if HAVE_FEATURE_BREAKPAD
that are needed for the #if HAVE_FEATURE_BREAKPAD case

so that IWYU does not give incorrect warnings
in --disable-breakpad builds

Change-Id: I05a71ac57fc53e02b293e47a56e92f993afd0592
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191909
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-08 17:18:31 +02:00
Devashish Gupta d986127690 tdf#143148: Use pragma once instead of include guards
Change-Id: Ibfc42cd388f08e5e4c84c2761f6b5ec3f37f7a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183139
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2025-03-20 19:29:22 +01:00
Gopi Krishna Menon 781c70a8c8 Add Last 4 UNO Commands To CrashReport Dump
Adds last 4 uno commands executed in CrashReport to assist in investigating the crashes

Change-Id: Ib7307ffc62d6d51d52f9d5e7fabefc2eaf858e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117388
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-18 11:00:57 +02:00
Gopi Krishna Menon a3d89265e0 Add Active Sfx Object Name To CrashReport Dump
Adds Active-SfxObject field in CrashReport to assist in investigating the crashes

Change-Id: I08637a66ae95977e7afe4f5dce634b46c928a423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117318
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-18 09:05:36 +02:00
Gopi Krishna Menon 4b92578176 Add Active App Name Field To Crash Report
Adds a Active-App field in Crash
Report to assist in investigating
the crashes

Change-Id: I30e5f307045b8e5def9986447551f39e70b94edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116786
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-06-16 14:45:35 +02:00
Luboš Luňák ea610df368 make crashreports include info about the system (CPU,memory)
This may be useful when we again will be deciding on how well something
is or isn't supported (such as when we were making SSE2 required
on Windows).
Breakpad already kind of provides this information (as CPU family, model
and stepping), but that appears to be next to useless in practice
(on X86_64 it doesn't even say the CPU vendor).
So send as metadata CPU name, flags (SSE etc.) and system RAM, as these
may be possibly useful information.

Change-Id: I77ed935d78501d49f70e8b9769fab6be79f1db77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109358
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-01-20 18:56:40 +01:00
Mike Kaganski 51092f2baa Use Unicode paths on Windows for minidumps
Change-Id: I6c409a297116ffaefb8d1c1fb82286964d85e8cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108479
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-01 17:31:25 +01:00
Philipp Hofer 01baeab998 tdf#123936 Formatting files in module include with clang-format
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2020-11-21 13:19:17 +01:00
Mike Kaganski 12b5892cf9 Delete google_breakpad::ExceptionHandler before calling _exit()
While debugging tdf#129712 on Windows, I saw this sequence:

1. nullptr was dereferenced (the reason for tdf#129712).
2. ExceptionHandler::HandleException was called (in
   workdir/UnpackedTarball/breakpad/src/client/windows/handler/exception_handler.cc).
3. It called ExceptionHandler::WriteMinidumpOnHandlerThread.
4. Minidump was created in ExceptionHandler::ExceptionHandlerThreadMain.
5. Document Recovery dialog was shown in Desktop::Exception (in
   desktop/source/app/app.cxx).
6. After closing dialog, _exit() was called in Desktop::Exception.
7. All threads except main were terminated.
8. Another access violation was thrown in the "minimal CRT cleanup".
9. ExceptionHandler::HandleException called again.
10. ExceptionHandler::WriteMinidumpOnHandlerThread hung on WaitForSingleObject
    because handler thread that should release the semaphore was terminated
    already at step 7.

The process had to be killed manually.

This change destroys the breakpad handler at the start of Desktop::Exception,
which de-registers itself (on Windows it uses SetUnhandledExceptionFilter).
Other than preventing the hang, the rationale also is that keeping the handler
after first minidump creation is wrong: even if the second minidump creation
succeeded, uploading it to crashdump server would give not the actual problem,
but some unrelated stack.

Change-Id: If12d0c7db519693f733b5ab3b8a288cef800a149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86104
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-10 18:05:01 +01:00
Juergen Funk 2215be5268 tdf#127711 - A runtime-switch for the MiniCrashDump
- in soffice.ini (sofficerc) the entry "CrashDumpEnable" default is "true"
    - when false then the Dump.ini and the dump-file are not written
    - when the switch --disable-crashdump is set, then the
      switch "CrashDumpEnable" set to "false"
    - when the entry "CrashDumpEnable" is missing, in this case is the
      default true, too
    - the checkbox under Options-General "Send crash reports to ..."
      is deactive and shows off (only view, not change the config)

 - when set the environment variable "CRASH_DUMP_ENABLE" to any char
   then the switch "CrashDumpEnable=false" are overrules with true
   and the Dump.ini and dump-file are write

Change-Id: I34e7795640eb95d111e18b0ad46ec67b2c126b19
Reviewed-on: https://gerrit.libreoffice.org/79273
Tested-by: Jenkins
Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
2019-10-02 09:43:12 +02:00
Juergen Funk 8fe03eef70 Refactoring of the class CrashReporter
- remove double code
 - using of all the methode of the CrashReporter-Class
 - all methode only active when crash-dump enable
    except the addKeyValue

With this change the handling for the patch
tdf#127711 A runtime-switch for the MiniCrashDump
would be simpler

Change-Id: I339b3b8e06f7fc2cd3c0d34ece112a6fd352913a
Reviewed-on: https://gerrit.libreoffice.org/79272
Tested-by: Jenkins
Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
2019-10-02 07:10:50 +02:00
Juergen Funk b5adb2433d crashreport: change addKeyValue to lower-case camel
Change-Id: Ife5775d3a570da1fc2e4dd627456523705b64e1d
Reviewed-on: https://gerrit.libreoffice.org/79601
Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
Tested-by: Juergen Funk (CIB) <juergen.funk_ml@cib.de>
2019-10-01 10:34:20 +02:00
Caolán McNamara fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Noel Grandin a78118a94e remove unused EXITHELPER_SECOND_OFFICE
Change-Id: If6595b9893be5ffacf0810bcd7f1ba51d42ddd0b
Reviewed-on: https://gerrit.libreoffice.org/63903
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-24 07:05:03 +01:00
Noel Grandin 3f3181522b s/catched/caught
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264
Reviewed-on: https://gerrit.libreoffice.org/39164
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26 08:59:38 +02:00
Noel Grandin 6df22f0ec5 loplugin:checkunusedparams various
Change-Id: I5d1cc807134230d86e0226a12fada204004312d3
Reviewed-on: https://gerrit.libreoffice.org/37675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-16 14:20:27 +02:00
Markus Mohrhard 80049d110a don't overwrite the crashreport info that are written before upload
There was a race condition that the OpenGL code was initialized before
the old report has been uploaded. Therefore the OpenGL setting was
overwritten by the new start and we were not getting the old value.

Now we store any value that wants to be added before the dump.ini is
ready in a temporary map and will write them as soon as we write all the
common information.

This problem was introduced by the dialog requesting permission to
upload the crash report.

Change-Id: I29391a1ff56bac6381218c5a4aefb58c2c03f024
Reviewed-on: https://gerrit.libreoffice.org/31846
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-11 03:31:57 +00:00
Michael Stahl 853a63997a desktop: that wasn't unused, just rarely used
Change-Id: I87c0fb287aa0b3fc5ad0216d8007772de3d03b2f
2016-09-22 23:20:29 +02:00
Noel Grandin 7419057e3e loplugin:unusedmethods in chart2..svx
Change-Id: Ifb6045885049733415895f58cdd911256f48323c
Reviewed-on: https://gerrit.libreoffice.org/29187
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 18:57:43 +00:00
Markus Mohrhard f4c68d3ad8 use a dynamic library for minidump shared code
This has the disadvantage to make the minidump_upload executable depend on LibreOffice libraries but there seems to be no other way to make the 7.1 SDK happy.

Change-Id: I82c37f503ed29cb50711eae7db22063f49747a48
Reviewed-on: https://gerrit.libreoffice.org/26055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 3498cd3e7b2c820fc3f3025eb4434666a444fda1)
Reviewed-on: https://gerrit.libreoffice.org/26915
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-07-05 11:02:50 +00:00
Markus Mohrhard 660b91b077 report the crash id back to the user
Change-Id: I5cc1e698294a5674d691529af8cc14e4cd87a711
Reviewed-on: https://gerrit.libreoffice.org/25865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-04 08:42:18 +00:00
Markus Mohrhard 4e074fb818 integrate the minidump upload into the normal LibreOffice
Change-Id: Id1808ceebf6c54698f7d1656a0ce96bcaece89ac
Reviewed-on: https://gerrit.libreoffice.org/25863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-04 08:42:02 +00:00
Tor Lillqvist 64061d8dd6 Move exithelper.h to include
We will want to use EXITHELPER_CRASH_WITH_RESTART in vcl, too.

Change-Id: If34244a361b157e0e9c7cca55fc34f0574f39984
2016-05-30 14:47:16 +03:00
Markus Mohrhard 2dcd1ae04c update the location for breakpad as soon as we have access to profile
Change-Id: I33b29c06fdc9ec9b6d4c7d5f1b6db6024f39e92e
Reviewed-on: https://gerrit.libreoffice.org/24027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-19 00:23:43 +00:00
Michael Stahl 5e2284de5b desktop: fix undefined CrashReporter::AddKeyValue on MSVC
Change-Id: Ie10b4849957734c2548c73dff8485cc673769e13
2016-02-29 21:57:36 +01:00
Markus Mohrhard b78209ae74 work on adding crash report UI
Change-Id: I66f4dca3cd32381ecd52cc36490e7ee1dddf3699
Reviewed-on: https://gerrit.libreoffice.org/22566
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-27 11:51:35 +00:00
Markus Mohrhard 98df76f26a use the new ini file based minidump uploader
Change-Id: Iaf85fb53e6eff34e268b6948d62ca84b7f8e6dd2
Reviewed-on: https://gerrit.libreoffice.org/22558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-26 15:01:24 +00:00
Markus Mohrhard 97474cae83 log some information about used OpenGL device
Change-Id: I0c050396e6b1efa7dd2f003a79a9dc506135197a
Reviewed-on: https://gerrit.libreoffice.org/22555
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-26 11:28:58 +00:00
Stephan Bergmann 6eb6a24910 loplugin:staticmethods
Change-Id: Ia7cdf11b668286360a1701a52263a1e57261cf39
2016-02-25 09:45:17 +01:00
Miklos Vajna 2dddc338db desktop: fix loplugin:staticmethods
Change-Id: Ic9f86c991de8faecd3071805762e83132196cfd7
2016-02-25 09:35:45 +01:00
Markus Mohrhard 98a8eafa91 add way to add additional information to the crash report
We can add several additional key value pairs during the execution of
the program that will be used on the server to show more information.

Change-Id: I4102adc15fc821415fa0b997ca7fe0dc4f7abcec
Reviewed-on: https://gerrit.libreoffice.org/22553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-25 00:50:08 +00:00