1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

49 Commits

Author SHA1 Message Date
e73d05933d Quick shutdown of ConsoleHandler thread 2025-03-12 13:33:12 +00:00
dda48b3693 Fix build 2025-03-02 14:33:11 +00:00
64ac14fa06 Remove boost::thread from cmakelists 2025-03-02 14:33:11 +00:00
844dfb1604 Removed usage of boost::thread from vcmi, except for AI 2025-03-02 14:33:11 +00:00
06be6b909c Fix build, reduce includes of CConsoleHandler 2025-03-01 21:16:41 +00:00
dd1b877449 Replace several more globals with locals 2025-03-01 21:16:41 +00:00
782362e5ce Remove console global 2025-03-01 21:16:41 +00:00
657b97202b Clarified ifdef magic in crash handling 2025-01-01 20:58:30 +00:00
5636b9076f Disable terminate handler on Android to fix Google Play reporter 2024-12-21 14:14:04 +00:00
cd6d55fe75 Do not try to shoot at 2nd hex of wide creatures 2024-08-14 10:38:59 +00:00
13b2008f79 Enabled terminate handler and call stack writing on all platforms
Attempt to get a bit more debug info from crashes. VCMI will now:
- use c++ terminate handler on any platform in release builds
- attempt to write call stack to log file using boost::callstack

Since I use std::set_terminate this will only affect c++ exceptions, e.g.
std::runtime_error and will not affect OS signals, e.g. SIGSEGV. Handling
signals is OS-specific and has a lot of limitations that I don't want to
investigate. Besides - most of our crashes are now caused by c++
exceptions.

Haven't tested on other platforms, but should at the very least write
exception information (`e.what()`) for all exceptions and function names
for methods exported from dll's (libvcmi.so & AI's). Possibly more, if
debug information is present.
2024-08-02 17:59:56 +00:00
c00a1e1b0c Fixed new issues detected by SonarCloud 2024-07-15 07:46:40 +00:00
79d568b17b Try to handle uncaught c++ exception on Windows and create crashdump 2024-06-06 20:08:48 +00:00
81e44711a2 Remove no longer needed workaround 2024-02-19 13:45:50 +02:00
f01ec55d21 Use the "nullptr" literal.
"nullptr" should be used to denote the null pointer
2023-10-27 18:18:59 +00:00
a1a5bc28c2 convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
a44c08a847 Slightly better thread names 2023-08-23 16:32:29 +03:00
44d16b32fe Use API identical to std classes where possible 2023-08-23 16:32:29 +03:00
ea3bdda047 vcmi: reduce boost a little bit 2023-04-11 17:11:14 +03:00
4c4498b22a vcmi: modernize rest of lib 2023-03-16 17:55:20 +03:00
622e012fcf Allow ingame console to use clientside commands and print output 2023-01-06 21:01:54 +01:00
09ac2421b9 Fix Windows single-app build 2022-12-06 01:53:19 +02:00
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
75282366c0 log messages with os_log 2022-09-24 15:55:17 +03:00
98d507d0a5 disable console colors as Xcode doesn't render them 2022-09-24 15:55:16 +03:00
e220918230 full crash dump 2022-05-14 13:23:09 +03:00
8c0fab1dcf fixes 2017-08-12 14:36:37 +03:00
15138c23de Finished conversion to new logging API
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
78885b8acc fixed possible race condition 2017-07-12 18:51:36 +03:00
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
8b6b4e2e0b Fix header case for Linux to Windows cross compilation using MingGW 2015-11-03 14:40:36 +03:00
017b4c308c Enable crashhandler for mingw. It works for mingw 4.0. 2015-09-15 07:27:18 +03:00
37bd4790f7 VCMIDirs update #6 fix
- Apple compilation fix
- Removed unnecessary macros
- Updated macros indent style
- Fixed 1. warning.
2014-08-30 15:04:00 +02:00
1b6f2ea3b7 VCMIDirs update #5 fix
- Updated old OS detect macros.
- Fixed 1 misspell.
2014-08-26 12:19:04 +02:00
c16e7d4bcf VCMIDirs update #4
Added stderr color handling
Updated logger to use boost::filesystem::path. Minor fixes.
Some classes are now structs.
2014-08-11 20:17:17 +02:00
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
f10ba48c77 - Fully integrated new logging API(ERM, Editor, missing parts) - Removed old logger 2013-04-11 15:58:01 +00:00
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00
0baa261dfc - Implemented the new logging API(not used currently) - Added lock typedefs to Global.h - Some layout updates to Global.h 2013-04-05 10:29:46 +00:00
c927913f5f - Improved json validation. Now it support most of features from latest json schema draft
- Set of schemas in config/schemas directory that are used to validate input from mods.
2013-04-02 17:06:43 +00:00
5b0c6059e2 * bug 1193 should be fixed
* minor refactoring
2013-01-30 21:28:31 +00:00
369f0ae9c6 [PLATFORM] MinGW support added
* disabled features unsupported by MinGW
* fixed issues with DLL_LINKAGE
! BOOST_THREAD_VERSION in now 3 workaround for existing code added, consider refactoring.
* some small tweaks ("-fpedantic" warnings)
2012-09-15 19:16:16 +00:00
613172fa45 - fixed #582, #1019 and #1022
- linux readme tweaks
2012-06-27 20:44:01 +00:00
cce814c41b * Final commit 2011-12-13 21:35:28 +00:00