Commit Graph

59 Commits (7cea0344b28125c5afbff74c234d4c942597f552)

Author SHA1 Message Date
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
AnyOldName3 fe1523d16d Fix signed/unsigned mismatch 3 years ago
AnyOldName3 c746a8abb7 Attempt to catch freezes on Windows 3 years ago
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
3 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
jvoisin 813969a46e Fix an off-by-one in windows_crashcatcher.cpp 4 years ago
Andrei Kortunov 2009916dd8 Fix dead code 4 years ago
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.
4 years ago
Andrei Kortunov 5f6f2c15b1 An another attempt to suppress Coverity warning about mkstemp 4 years ago
Andrei Kortunov 45b1c68af4 Remove annotation which does not work 4 years ago
CedricMocquillon cc5c6fe3ad Use data() method 4 years ago
CedricMocquillon adeb4fe02f Handle case where the log path has more that MAX_PATH characters 4 years ago
CedricMocquillon f400116bcd Use 32767 characters for log path 4 years ago
CedricMocquillon 3eb2b32123 Fix typpo issue on arguments 4 years ago
CedricMocquillon e2041de969 Use the incremental approach to handle long path 4 years ago
CedricMocquillon 73afc55462 Fork the current process to monitor exe, generate minidump on crash 4 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
Andrei Kortunov 00503d86e1 Try to disable CoverityScan warning in code with explanation 4 years ago
elsid 066f0a744f
Add env variable to enable/disable crash catcher 5 years ago
Capostrophic 9106e3646c Fix outdated bug tracker links 5 years ago
Andrei Kortunov f1db97fbbd Improve info message about missing GDB (bug #4341) 6 years ago