puzzlepaint / freeage

An open-source reimplementation of the game engine of Age of Empires 2: Definitive Edition.
59 stars 4 forks source link

Logging stacktraces on crashes and errors #22

Open MaanooAk opened 4 years ago

MaanooAk commented 4 years ago

Is this left in deliberately?

https://github.com/puzzlepaint/freeage/blob/1c6e375c647d2b1eceda3bd80d9ac5a3feacbba0/third_party/loguru/loguru.cpp#L594-L596

Also this if condition could be changed in order to print the stack trace also in error level logs:

https://github.com/puzzlepaint/freeage/blob/4789ae69e0b3c6239a6173d5c1509a8aceaa9c41/third_party/loguru/loguru.cpp#L1207-L1208

In both cases it would be useful in bug reports to also have the stack trace without any additional actions.

Discovered while debugging...

puzzlepaint commented 4 years ago

I don't remember why I commented out install_signal_handlers();. If there's no problem with re-enabling it, I am fine with it. I remember getting some weird signals while debugging other projects that caused gdb to stop, maybe this was related to it; just a guess though.

Printing the stack trace on errors seems potentially useful, I agree.