1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 21:59:55 +00:00
Commit graph

69 commits

Author SHA1 Message Date
elsid
55501a02c0
Define only one crashCatcherInstall function 2024-01-19 21:00:32 +01:00
elsid
fc12728d25
Move crash_switch variable to cpp file 2024-01-19 21:00:32 +01:00
elsid
8348557893
Move crash handling out of crash handler installation 2024-01-19 21:00:32 +01:00
elsid
7763fe73d8
Make it clear handled signals are always the same 2024-01-19 21:00:32 +01:00
elsid
d54bb5cb5a
Declare variables closer to where they are used 2024-01-19 21:00:29 +01:00
elsid
d6f1fbe2c9
Remove unused user info function 2024-01-19 19:22:15 +01:00
elsid
388a73376c
Use std::optional for siginfo 2024-01-19 19:22:15 +01:00
elsid
c95c8fcc36
Add missing description for SIGABRT 2024-01-19 19:22:15 +01:00
elsid
48c3268bcb
Reduce code duplication for finding signal description 2024-01-19 19:22:14 +01:00
elsid
98844a692d
Regroup crash catcher includes 2024-01-19 19:21:01 +01:00
AnyOldName3
2ed584428c Add missing headers to components/CMakeLists.txt
Otherwise, they won't show up as part of the project in IDEs.
2023-10-15 15:44:24 +01:00
AnyOldName3
f239988c06 Remove unused function 2023-07-12 14:48:09 +01:00
AnyOldName3
899f0a4633 Remove redundant explicit null terminator 2023-07-12 14:46:32 +01:00
AnyOldName3
677c17530e I don't like reformatting things over and over. 2023-07-11 22:58:44 +01:00
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.
2023-07-11 22:22:26 +01:00
AnyOldName3
48368f79b6 Update Windows crash dump path once we know where we're logging
Manual rewrite of 5102f4b11d
2023-07-05 20:38:46 +01:00
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.
2023-07-05 20:25:22 +01:00
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.
2023-03-04 00:28:22 +00:00
psi29a
92f88c16a9 Merge branch 'remove-strerror' into 'master'
Remove strerror usages

Closes #7151

See merge request OpenMW/openmw!2664
2023-01-30 17:09:39 +00:00
elsid
007ad4e4d1
Write crash log to temporary directory
To make sure current user has rights to do so.
2023-01-30 09:30:55 +01:00
Andrzej Głuszak
9b0a499b58 Remove strerror usages 2023-01-29 22:41:59 +01:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Project579
5456ef1d50 Add new functions and overloads to support std::u8string and std::filesystem::path. 2022-09-11 14:41:20 +02:00
Project579
a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2022-09-11 14:41:20 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02:00
Arnaud Dochain
1163c12645 Allows to build on macos 10.15 2022-08-28 15:28:41 +00:00
ζeh Matt
92e209c62a
Simplify getIsHungAppWindow 2022-07-14 22:02:01 +03:00
ζeh Matt
0d625abde0
Declare utf8ToUtf16 static 2022-07-14 16:47:27 +03:00
ζeh Matt
100e400fed
Dynamically obtain the function pointer to IsHungAppWindow 2022-07-14 16:46:31 +03:00
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.
2022-07-05 01:41:28 +02:00
elsid
d2ed62ec3a
Allow to disable crash catcher on Windows 2022-07-01 22:44:03 +02:00
ζeh Matt
38b6927b31
Fix missing includes 2022-06-07 02:08:50 +03:00
jvoisin
4e4debb1cb Remove even more of boost::filesystem 2022-05-25 18:29:02 +00:00
elsid
0dcb1f5aac
Fix build on Windows
Use wrapper header over Windows.h to undefine far and near in a single place.
2022-04-25 00:25:46 +02:00
ζeh Matt
ba30b37bb4
Add missing include to unordered_map 2022-01-13 22:46:00 +02:00
AnyOldName3
fa05b0b96c Include <atomic>
Should fix compilation on CI
2021-12-26 02:10:37 +00:00
AnyOldName3
0e29a760d8 Tidy up includes 2021-12-26 02:09:14 +00:00
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.
2021-12-21 23:19:13 +00:00
AnyOldName3
d15c2922a9 Stop monitoring closed windows
If it gets repalced, the new one will be watched instead
2021-12-20 22:24:47 +00:00
AnyOldName3
97396da74c Get rid of break
It might look confusing with the breaks in the switch below
2021-12-20 22:23:44 +00:00
AnyOldName3
fe1523d16d Fix signed/unsigned mismatch 2021-12-20 22:13:11 +00:00
AnyOldName3
c746a8abb7 Attempt to catch freezes on Windows 2021-12-18 21:34:15 +00:00
elsid
98a7d90ee2
Assume SIGSTKSZ is not a constant
SIGSTKSZ is not defined as constant since glibc 2.34:
https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53
2021-09-24 19:45:43 +02:00
Andrei Kortunov
f9d42ed396 Fix MSVC's C4267 warnings 2021-05-12 10:34:39 +04:00
jvoisin
813969a46e Fix an off-by-one in windows_crashcatcher.cpp 2021-05-02 11:21:54 +00:00
Andrei Kortunov
2009916dd8 Fix dead code 2021-04-19 15:38:02 +04:00
fredzio
4058e117ca Don't clobber game log file when we collect a stack trace.
When the crash catcher catch a signal it forks to collect data about its
parent. In the process the child reinitialize the log file, which ends
up empty.
2021-04-17 13:14:01 +02:00
Andrei Kortunov
5f6f2c15b1 An another attempt to suppress Coverity warning about mkstemp 2021-04-14 08:07:43 +04:00
Andrei Kortunov
45b1c68af4 Remove annotation which does not work 2021-04-10 12:32:12 +04:00
CedricMocquillon
cc5c6fe3ad Use data() method 2020-12-13 20:50:48 +01:00