mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Fix various race conditions with capturing of script backtraces
This commit is contained in:
parent
64b09905c7
commit
6929823838
6 changed files with 44 additions and 47 deletions
|
@ -146,14 +146,11 @@ static void handle_crash(int sig) {
|
|||
print_error("-- END OF C++ BACKTRACE --");
|
||||
print_error("================================================================");
|
||||
|
||||
if (ScriptServer::are_languages_initialized()) {
|
||||
Vector<Ref<ScriptBacktrace>> script_backtraces = ScriptServer::capture_script_backtraces(false);
|
||||
for (const Ref<ScriptBacktrace> &backtrace : script_backtraces) {
|
||||
if (!backtrace->is_empty()) {
|
||||
print_error(backtrace->format());
|
||||
print_error(vformat("-- END OF %s BACKTRACE --", backtrace->get_language_name().to_upper()));
|
||||
print_error("================================================================");
|
||||
}
|
||||
for (const Ref<ScriptBacktrace> &backtrace : ScriptServer::capture_script_backtraces(false)) {
|
||||
if (!backtrace->is_empty()) {
|
||||
print_error(backtrace->format());
|
||||
print_error(vformat("-- END OF %s BACKTRACE --", backtrace->get_language_name().to_upper()));
|
||||
print_error("================================================================");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue