Commit Graph

79 Commits (master)

Author SHA1 Message Date
elsid 2ebe83c4d5
Use proper order for printf arguments 5 months ago
Austin English 50b2edc121 components/crashcatcher: if OPENMW_FULL_MEMDUMP is set, generate a full memory crashdump
[Bug #7924](https://gitlab.com/OpenMW/openmw/issues/#7924)
8 months ago
elsid 1e07935366
Make crashCatcherInstall no-op for Android
The crashcatcher.cpp is not linked on Android because it's not supported but the
function need to have some definition. Make it empty to avoid link failures.
11 months ago
elsid b96e32144c
Support lldb in crash catcher 11 months ago
elsid 0095cb604f
Handle sysctl errors without assert 11 months ago
elsid 4efc0e20a3
Report errors on handling the crash 11 months ago
elsid acb246cbf2
Report errors on printing gdb info 11 months ago
elsid 140cc53b55
Report errors on installing crash handler 11 months ago
elsid 2ef286b27a
Make sure function handling crash does not return 11 months ago
elsid fffc6101b7
Remove unnecessary nesting 11 months ago
elsid 55501a02c0
Define only one crashCatcherInstall function 11 months ago
elsid fc12728d25
Move crash_switch variable to cpp file 11 months ago
elsid 8348557893
Move crash handling out of crash handler installation 11 months ago
elsid 7763fe73d8
Make it clear handled signals are always the same 11 months ago
elsid d54bb5cb5a
Declare variables closer to where they are used 11 months ago
elsid d6f1fbe2c9
Remove unused user info function 11 months ago
elsid 388a73376c
Use std::optional for siginfo 11 months ago
elsid c95c8fcc36
Add missing description for SIGABRT 11 months ago
elsid 48c3268bcb
Reduce code duplication for finding signal description 11 months ago
elsid 98844a692d
Regroup crash catcher includes 11 months ago
AnyOldName3 2ed584428c Add missing headers to components/CMakeLists.txt
Otherwise, they won't show up as part of the project in IDEs.
1 year ago
AnyOldName3 f239988c06 Remove unused function 1 year ago
AnyOldName3 899f0a4633 Remove redundant explicit null terminator 1 year ago
AnyOldName3 677c17530e I don't like reformatting things over and over. 1 year ago
AnyOldName3 1bdcb5d6d9 Share the dump directory for crash and freeze dumps
This means the shared memory struct is just 255 bytes longer than a few
commits ago instead of 32K.

Also introduce a function for putting path strings in the shared memory
as there was too much copied and pasted code and it was error-prone.

Also free some handles once we're done with them so they don't leak.
1 year ago
AnyOldName3 48368f79b6 Update Windows crash dump path once we know where we're logging
Manual rewrite of 5102f4b11d
2 years ago
AnyOldName3 3bb3f58c73 Don't put crash dumps in Temp on Windows
Well... unless we fail to get the user profile directory.

Also put freeze dumps in a more appropriately-named file.

Discussed in https://gitlab.com/OpenMW/openmw/-/issues/7455

Manual rewrite of c21695c951

As well as that, I found a bug where the crash dump path was being converted from a std::filesystem::path to a utf8-encoded std::string, then passed to the crash catcher, which converted it to a std::filesystem::path implicitly, but using the system eight-bit code page, which wouldn't usually be UTF-8. That's now fixed by passing the function that expects a path a path instead of a string.
2 years ago
AnyOldName3 5b3e9e15ee Maybe fix Windows freeze catcher
It looks like it's never actually been capable of creating a minidump since the original MR was merged. It worked briefly, and then apparently I managed to dissappear an important function call when rearranging things.
2 years ago
psi29a 92f88c16a9 Merge branch 'remove-strerror' into 'master'
Remove strerror usages

Closes #7151

See merge request OpenMW/openmw!2664
2 years ago
elsid 007ad4e4d1
Write crash log to temporary directory
To make sure current user has rights to do so.
2 years ago
Andrzej Głuszak 9b0a499b58 Remove strerror usages 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 5456ef1d50 Add new functions and overloads to support std::u8string and std::filesystem::path. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
Arnaud Dochain 1163c12645 Allows to build on macos 10.15 2 years ago
ζeh Matt 92e209c62a
Simplify getIsHungAppWindow 2 years ago
ζeh Matt 0d625abde0
Declare utf8ToUtf16 static 2 years ago
ζeh Matt 100e400fed
Dynamically obtain the function pointer to IsHungAppWindow 2 years ago
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
3 years ago
elsid d2ed62ec3a
Allow to disable crash catcher on Windows 3 years ago
ζeh Matt 38b6927b31
Fix missing includes 3 years ago
jvoisin 4e4debb1cb Remove even more of boost::filesystem 3 years ago
elsid 0dcb1f5aac
Fix build on Windows
Use wrapper header over Windows.h to undefine far and near in a single place.
3 years ago
ζeh Matt ba30b37bb4
Add missing include to unordered_map 3 years ago
AnyOldName3 fa05b0b96c Include <atomic>
Should fix compilation on CI
3 years ago
AnyOldName3 0e29a760d8 Tidy up includes 3 years ago
AnyOldName3 f05cd901cf Show messagebox while OpenMW appears to be frozen
If it thaws, the messagebox disappears again.
The user can press the Abort button to kill OpenMW and generate a crash
dump.
3 years ago
AnyOldName3 d15c2922a9 Stop monitoring closed windows
If it gets repalced, the new one will be watched instead
3 years ago
AnyOldName3 97396da74c Get rid of break
It might look confusing with the breaks in the switch below
3 years ago