-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Add Breakpad for crash dump generation #56014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
Oh yeah, thanks. I misremembered where that button was supposed to be, and couldn't see it there... |
|
I have approved cicd. |
|
Some more static check failures and try to collapse the commits by squashing. We prefer one unless you have a logical reason (we allow to have a few commits). |
|
I have ran clang-format and renamed that one place where a file was incorrectly referred to in a file copyright header. I haven't pushed those changes yet as I wanted to check the Windows compile and determine if some of the common files are even needed for any platform. I'll do a manual squash as the last thing once I don't need to tweak the code anymore, as that'll get rid of some intermediate files that would otherwise be in git history. |
a7e507a to
b5675f3
Compare
|
All issues detected by CI should now hopefully be fixed. I also removed the commented out parts in the build config file and did some last tweaks. Also made sure it compiles on Windows, I'm not super confident about how the string conversion should be used in 4.0, in 3.4 I think I was able to figure out it pretty well. I think this now has all the changes on the engine side that are needed for crash dump generation. Though, I've not yet gotten to test the entire flow of creating a crash dump and being able to decode it. As an additional difficulty Windows MinGW builds seem a bit problematic regarding extracting symbols but this breakpad fork: https://github.com/DaemonEngine/breakpad seems to have a working tool for that. |
|
I've just ran into a pretty big issue, it seems even though I found a tool that can dump the symbols of a mingw created exe on Linux, it doesn't seem to contain any symbols besides the standard library. It doesn't even detect that any of the Godot source files are included. |
|
Let me get back to you but I think I posted a llvm-mingw workflow. |
|
Here's the exact command I use. PATH=/opt/llvm-mingw/bin:$PATH scons werror=no platform=windows target=release_debug -j`nproc` use_lto=no deprecated=no use_mingw=yes use_llvm=yes use_thinlto=yes LINKFLAGS=-Wl,-pdb= CCFLAGS='-g -gcodeview' debug_symbols=no"The important part is llvm-mingw and |
|
Kind of expected, but the Godot podman build image scripts don't install llvm, so I get this error with that: it shouldn't be too difficult to modify my local copy to also install llvm in the build image to test out that way of making the build. First I'll try that thinlto one with the mingw gcc to see if that has any effect. Edit: turning off lto and turning on the thin lto, seems to have increased the symbols file size to 100 MB, which now seems to have quite many Godot symbols in it. |
SConstruct
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The common pattern is "use_breakpad". Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can change it easily enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to "use_breakpad" unless you have reasoning against?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can. I got stuck yesterday trying to fix that problem I commented about (#56014 (comment)), and I didn't want to switch over to changing this as I have a bunch of experimental local changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the scons option and the defines used in C++ as volk seemed to also use that format of preprocessor defines.
|
I ran into another issue: in release mode on Linux when Godot doesn't register the signal handlers, but instead I leave that to Breakpad, it doesn't work for some reason. I might need to do a workaround where the Godot handlers are always installed, or perhaps the breakpad version I got has a bug, but that would be a pretty serious slip by Google... |
|
How do I recreate your bug case? Maybe posting some info here can reveal the answer as I'm not in this area. |
|
After debugging with gdb I think I figured it out. The mono runtime actually messes with the signals. I noticed when putting breakpoints on Here's where mono messes with the signal handlers: This means that using a workaround of always registering the Godot crash handler signal handlers and passing that onto breakpad, should work. I don't have enough time to test that today, though. |
|
Seems like not even adding code like: works, even though that's the same as in debug mode. Note that the editor properly runs the crash handlers. So there's definitely something in the Linux Mono runtime when running in release mode exported game that makes it override Godot's and also Breakpad's signal handlers. I doubt that even Godot's own crash handler was able to work in this mode, but then again it's always disabled in the release mode, so I guess no one has encountered this before. It doesn't seem there's an easily tweakable place in gd_mono.cpp where this happens. So I might just have to put in a workaround in gd_mono.cpp (or some place higher up in the callstack), where I re-initialize Breakpad (on Linux) just after Mono has been loaded to fix the signals it messed up. |
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
|
I merged this PR into my custom fork and it works well on my own tests here forcing crashes. I looked into it, found it and merged it because a few of the players in one of my games are getting a very specific weird crash that I'm not able to reproduce. Weirdly they can reproduce it every time, and it's through the course of starting the tutorial level so not a great place to be crashing hahaha. For some reason for this crash it doesn't trigger breakpad/the crash handler. It crashed straight out of the game with no dmp being created or no extra crash/error logs on the log file. I'm not sure where to go from here, so figured I'd post here. Any ideas on why breakpad wouldn't trigger on a crash while it triggers when I'm deliberately trying to crash? And anything I can do to try and get it to trigger on this crash? |
|
My immediate thought is that it may not be a "crash" but instead a forced shutdown of the game after detecting a problem. That would basically look like a crash to the user but not technically be one. Though I don't know enough to say for sure. At least back in the 3.x days I never received any word of a crash that didn't create a .dmp file (as far as I can recall). Now that Godot 4.4 is out and my game doesn't crash 100% of the time on shutdown, I no longer have that blocker for reintroducing this into my game. But I don't know when I will next work on this. |
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
|
For reference since Dæmon Engine's Breakpad was mentionned, we now merged Google upstream to our Breakpad fork maintaining MinGW support. So it is now not only being on par with Google implementation, but also still provides the precious MinGW support. The big highlight is that this now supports DWARF5 symbols in both Linux and MinGW executables: |
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
…d show GUI Alert when crashing on desktop Merged PR godotengine#56014 Add Breakpad for crash dump generation use_breakpad=yes use_lto=yes debug_symbols=yes separate_debug_symbols=no use_static_cpp=yes Fixed compiling on Windows Make crash dump printing work better on Windows Tweaked Breakpad build Fixed Breakpad build for Godot 4 Switched to WINDOWS_ENABLED Removed some non buildable files listed in the files to build Ran clang format Fixed the other formatting issues detected by CI Removed a comment and added clarifying comment on crash dump message as to why it is printed twice on Windows Make an ugly string conversion to make Windows build work Tweaked the build configuration and formatted again removed lss Add lss properly Reinitialize breakpad after mono initialization on Linux otherwise the breakpad signal handlers are not active Disable Windows crash handler on destruction similarly to Linux Renamed breakpad_enabled to use_breakpad Forgot to wrap one piece of code inside ifdef USE_BREAKPAD Updated copyright years in the added files Fix register types for breakpad Fixed dir access Removed musl and elf_reader which was the only thing seemingly depending on it Updated header guards Removed the memdelete call Made copyright header changes that the checks wanted Update the version hash breakpad is said to be used from Try to fix .gitignore matching Breakpad source files Added missing breakpad source file compile for Linux Delete unused files Update breakpad Remove mono re-registration, replace accidentally removed line Fixups Show a GUI alert when crashing on desktop platforms This makes it possible to know that Godot has crashed without looking at the console (which may not be visible to the user). - Change the window title while dumping the backtrace, as this can take a while to finish. - If file logging is enabled, print path to log file to standard error and the GUI alert. Clicking OK will open the log file in the default program associated with `.log` files. Notepad has native associations for `.log` on Windows, so this works on Windows too. Co-Authored-By: bruvzg <[email protected]>
I started working on a simple Breakpad crash reporting integration to Godot related to this proposal: godotengine/godot-proposals#1896
Some current caveats:
I have not tested this with Godot 4, I originally made this against the 3.4 stable label and cherry picked to this branch (that other branch is here: https://github.com/Revolutionary-Games/godot/tree/crash_dumper_3.x). I only did a very quick compile fix and checked that Godot starts on this branch. There didn't seem to be a working sample project available in the asset library(?) so I couldn't test with a project.There's some cleanup left to do regarding which files to include and which need to be compiledMy local install of clang-format doesn't work with the options in this repo so I couldn't format the files with it (clang-format failed with code 1: /home/hhyyrylainen/Projects/godot/.clang-format:151:1: error: unknown key 'SpacesInLineCommentPrefix')update to Fedora 35 fixed this by having a newer clang versionI noticed that Windows crash reporter on destruction doesn't disable itself. seems like nothing else either disables it on shutdown. Is that intended? It's not consistent with Linux. For my own testing I added the line to disable it in the destructor, but I didn't commit that hereI added this codeI haven't yet tested whether the created crashdumps can be decoded with stackwalk (I'm going to work on my build scripts next to make this work, I'm not confident enough with the Godot build process yet to make a PR to the build scripts repo). Also Windows is less tested than LinuxWindows crash dumps only work with the special mingw supporting stackwalk, but no special version is required in the Godot repo when building Godot, so this is just a minor inconvenience.I don't have a mac to develop on, sosupport for that needs to be done later