Skip to content

Improve crash handler message display - #47829

Merged
Calinou merged 1 commit into
godotengine:masterfrom
Calinou:improve-crash-handler-display
Aug 25, 2021
Merged

Calinou merged 1 commit into
godotengine:masterfrom
Calinou:improve-crash-handler-display

Conversation

@Calinou

@Calinou Calinou commented Apr 12, 2021 •

Copy link
Copy Markdown
Member

Can be merged independently of #33505.

  • State the Godot version and full hash in the backtrace.
    • Knowing the exact hash is important because source code backtraces depend on the source code version to be accurate.
  • Add decoration around the crash backtrace, both to make it stand out from other messages and help the user figure out what they should copy.

I got the idea to implement this while looking at the comments here: #47732 (comment)

Preview

Before

ERROR: Testing crash handler with CRASH_NOW_MSG
   at: ProjectManager (editor/project_manager.cpp:2379)
handle_crash: Program crashed with signal 4
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3da60) [0x7fa094eeaa60] (??:0)
[2] ProjectManager::ProjectManager() (/home/hugo/Documents/Git/godotengine/godot/editor/project_manager.cpp:2379)
[3] Main::start() (/home/hugo/Documents/Git/godotengine/godot/main/main.cpp:2363)
[4] bin/godot.linuxbsd.tools.64.llvm(main+0x1b2) [0x4765822] (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/godot_linuxbsd.cpp:57)
[5] /lib64/libc.so.6(__libc_start_main+0xf2) [0x7fa094ed51e2] (??:0)
[6] bin/godot.linuxbsd.tools.64.llvm(_start+0x2e) [0x47655ae] (??:?)
-- END OF BACKTRACE --
[1]    100306 IOT instruction (core dumped)  bin/godot.linuxbsd.tools.64.llvm

After

ERROR: Testing crash handler with CRASH_NOW_MSG
   at: ProjectManager (editor/project_manager.cpp:2379)

================================================================
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.0.dev.custom_build (4e8b67a0d186e39a8e64366ac05a2d6a3df0c2ff)
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3da60) [0x7f30fc2e7a60] (??:0)
[2] ProjectManager::ProjectManager() (/home/hugo/Documents/Git/godotengine/godot/editor/project_manager.cpp:2379)
[3] Main::start() (/home/hugo/Documents/Git/godotengine/godot/main/main.cpp:2363)
[4] bin/godot.linuxbsd.tools.64.llvm(main+0x1b2) [0x4765822] (/home/hugo/Documents/Git/godotengine/godot/platform/linuxbsd/godot_linuxbsd.cpp:57)
[5] /lib64/libc.so.6(__libc_start_main+0xf2) [0x7f30fc2d21e2] (??:0)
[6] bin/godot.linuxbsd.tools.64.llvm(_start+0x2e) [0x47655ae] (??:?)
-- END OF BACKTRACE --
================================================================
[1]    95589 IOT instruction (core dumped)  bin/godot.linuxbsd.tools.64.llvm

@Calinou
Calinou requested review from a team as code owners April 12, 2021 15:10
@Calinou Calinou added this to the 4.0 milestone Apr 12, 2021
@Calinou
Calinou force-pushed the improve-crash-handler-display branch from fe2b54f to 8b34dea Compare April 12, 2021 15:11
Comment thread platform/linuxbsd/crash_handler_linuxbsd.cpp Outdated
- State the Godot version and full hash in the backtrace.
- Add decoration around the crash backtrace, both to make it stand out
  from other messages and help the user figure out what they should copy.
@Calinou
Calinou force-pushed the improve-crash-handler-display branch from 8b34dea to 8556dd1 Compare June 17, 2021 18:05
@Calinou
Calinou merged commit 3db8359 into godotengine:master Aug 25, 2021
@Calinou
Calinou deleted the improve-crash-handler-display branch August 25, 2021 06:03
@akien-mga

Copy link
Copy Markdown
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 14, 2021
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…er-display

Improve crash handler message display
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…er-display

Improve crash handler message display
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026
…er-display

Improve crash handler message display
Shane-Gadsby pushed a commit to Shane-Gadsby/godotwebgpu that referenced this pull request Sep 21, 2026
…er-display

Improve crash handler message display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants