summaryrefslogtreecommitdiffstats
path: root/desktop/source/app/crashreport.cxx
Commit message (Collapse)AuthorAgeFilesLines
* make crashreports include info about the system (CPU,memory)Luboš Luňák2021-02-011-0/+180
| | | | | | | | | | | | | | | | | | | 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> (cherry picked from commit ea610df36842305ef7e26d964ad0a1677be5f553) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109691 Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN2020-01-251-4/+4
| | | | | | | Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Delete google_breakpad::ExceptionHandler before calling _exit()Mike Kaganski2020-01-101-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* New loplugin:getstrStephan Bergmann2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...to find matches of ... << s.getStr() (for the rtl string classes) that can be written as just ... << s Some notes: * The OUStringToOString(..., RTL_TEXTENCODING_UTF8) is left explicit in desktop/source/app/crashreport.cxx (even though that would also be done internally by the "<< OUString" operator) to clarify that these values are written out as UTF-8 (and not as what that operator << happens to use, which just also happens to be UTF-8). * OUSTRING_TO_CSTR (include/oox/helper/helper.hxx) is no longer used now. * Just don't bother to use osl_getThreadTextEncoding() in the SAL_WARN in lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx. * The toUtf8() in the SAL_DEBUG in pyuno/source/module/pyuno_module.cxx can just go, too. Change-Id: I4602f0379ef816bff310f1e51b57c56b7e3f0136 Reviewed-on: https://gerrit.libreoffice.org/80762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#127711 - A runtime-switch for the MiniCrashDumpJuergen Funk2019-10-021-10/+33
| | | | | | | | | | | | | | | | | | | | - 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>
* Refactoring of the class CrashReporterJuergen Funk2019-10-021-34/+59
| | | | | | | | | | | | | | | | - 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>
* crashreport: change addKeyValue to lower-case camelJuergen Funk2019-10-011-1/+1
| | | | | | | 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>
* remove more rtl::OUString and OString prefixesNoel Grandin2018-10-241-2/+2
| | | | | | | | | which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#114227: set better proxy params in cURL for crash reportingAron Budea2018-05-161-1/+18
| | | | | | | | | | | Take proxy server from internet settings, and pass to cURL. Allow forwarding authentication as well (explicitely setting user/password is still missing). Change-Id: I19a6c9057a11a5911a6117f71060d3f386953602 Reviewed-on: https://gerrit.libreoffice.org/51621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* Rename and move SAL_U/W to o3tl::toU/WMike Kaganski2017-10-051-1/+2
| | | | | | | | | | | | | | | | Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Replace more reinterpret_cast with SAL_W/SAL_UMike Kaganski2017-10-031-2/+1
| | | | | | | Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* submit crash reports using httpsMarkus Mohrhard2017-04-171-1/+1
| | | | | | | Change-Id: I98e0af47f984d5327e23bfee6d4a27052b848699 Reviewed-on: https://gerrit.libreoffice.org/36591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* Clean up uses of SAL_U/SAL_W: desktopStephan Bergmann2017-04-101-1/+2
| | | | Change-Id: Ie1f5407a347a19c000793bf83e3545d566937d72
* Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann2017-04-041-1/+1
| | | | | | | | | | | | | There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Put crash directory config in soffice.ini, instead of own ini fileSamuel Mehrbrodt2017-01-271-3/+11
| | | | | | | Change-Id: I3a7aa394792c47c6c5a3a553174d177e66ade617 Reviewed-on: https://gerrit.libreoffice.org/33582 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Crashdump: Make crash directory configurableSamuel Mehrbrodt2017-01-241-11/+13
| | | | | | | Change-Id: I8106ec674080ede7072581dab2e6700040de5828 Reviewed-on: https://gerrit.libreoffice.org/33032 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Add build id to crash metadataSamuel Mehrbrodt2017-01-151-0/+2
| | | | | | | Change-Id: I0e11a96936ea08cc439fcc1b1e3ff1f59c636665 Reviewed-on: https://gerrit.libreoffice.org/33026 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* -Werror,-Wunused-variableThorsten Behrens2016-12-141-1/+2
| | | | Change-Id: I32e6bad89b7cdcf0b181c0bb3a158b003fcfb767
* don't overwrite the crashreport info that are written before uploadMarkus Mohrhard2016-12-111-4/+30
| | | | | | | | | | | | | | | | | | 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>
* use the existing url to path function also in the ini file partMarkus Mohrhard2016-05-301-5/+3
| | | | | | | Change-Id: Ia92261a63cfe1d51f68f312a27d5ba4b42719c47 Reviewed-on: https://gerrit.libreoffice.org/25647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* Silence clang-cl -Werror,-Wmicrosoft-enum-value in external includeStephan Bergmann2016-05-251-0/+7
| | | | Change-Id: Ic08f063efc27e4bd573c684955e69edb7e4f8bc1
* Fix mis-mergeStephan Bergmann2016-05-251-1/+1
| | | | Change-Id: Ia16ac2eec2b31aeb12b90e0f3fb2f3a37940c314
* -Werror,-Wunused-variableStephan Bergmann2016-05-251-2/+1
| | | | Change-Id: I83ef9f123156061ec5befb38dba4f46aec95d96d
* use correct URL for crashreportMarkus Mohrhard2016-05-241-1/+1
| | | | Change-Id: Ia7d584685961e8573c1c35f2560a66664632f5f7
* fix previous commitsMarkus Mohrhard2016-05-241-5/+5
| | | | Change-Id: I91e9f1d0f40dd3dd50b03a27ded2f96c71cd1ffd
* return paths and not URLsMarkus Mohrhard2016-05-241-1/+5
| | | | | | | Change-Id: I03553a1fe98ac7ac780333b2ec247ed0cd781ffb Reviewed-on: https://gerrit.libreoffice.org/25379 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* update the minidump location as soon as possibleMarkus Mohrhard2016-05-241-1/+4
| | | | | | | Change-Id: I7525ba7ff48b6df51ce8f7fdccf5ff512cdfec89 Reviewed-on: https://gerrit.libreoffice.org/25378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* use the TDF server as target for crash reportsMarkus Mohrhard2016-05-231-1/+1
| | | | Change-Id: I0518bbad2f3550f8cac453c98af88a092448b5cd
* somewhere I lost the filenameMarkus Mohrhard2016-05-191-1/+1
| | | | | | | Change-Id: Id806b0a9824c8f65dd8afa06bbbb93af60e24c57 Reviewed-on: https://gerrit.libreoffice.org/24028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* update the location for breakpad as soon as we have access to profileMarkus Mohrhard2016-05-191-1/+36
| | | | | | | Change-Id: I33b29c06fdc9ec9b6d4c7d5f1b6db6024f39e92e Reviewed-on: https://gerrit.libreoffice.org/24027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* loplugin:stringconcatStephan Bergmann2016-03-011-2/+2
| | | | Change-Id: I2ca9ebdce00fdaeeb2ee690fffd75b21e9acc14b
* store the crash ini file inside of the user profileMarkus Mohrhard2016-02-271-2/+10
| | | | Change-Id: I9d85d3daba288091f9aa406a24b24facf5d20b1e
* work on adding crash report UIMarkus Mohrhard2016-02-271-1/+14
| | | | | | | Change-Id: I66f4dca3cd32381ecd52cc36490e7ee1dddf3699 Reviewed-on: https://gerrit.libreoffice.org/22566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* use the new ini file based minidump uploaderMarkus Mohrhard2016-02-261-9/+7
| | | | | | | Change-Id: Iaf85fb53e6eff34e268b6948d62ca84b7f8e6dd2 Reviewed-on: https://gerrit.libreoffice.org/22558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* typoStephan Bergmann2016-02-251-1/+1
| | | | Change-Id: Id0b3cb33996a73f9be1f268a369af9f4d5f2df60
* loplugin:staticmethodsStephan Bergmann2016-02-251-5/+10
| | | | Change-Id: Ia7cdf11b668286360a1701a52263a1e57261cf39
* add way to add additional information to the crash reportMarkus Mohrhard2016-02-251-0/+33
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>