Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bailey <danieljabailey>2020-08-06 08:34:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-06 08:44:00 +0300
commite9c4325515aed9cb3a35183d4093cda2b6bffd9f (patch)
treef68c4d89f16257731ff7457371978b973da3f8a3 /source/creator
parentc5b6b3d82f56b6da1fce19b961fa444745dbc269 (diff)
Python: include Python stack trace in the crash log
This helps Python developers troubleshoot errors when Python causes a crash.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_signals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
index dbf947a86fd..ad0b7b2547d 100644
--- a/source/creator/creator_signals.c
+++ b/source/creator/creator_signals.c
@@ -59,6 +59,10 @@
# include <signal.h>
+# ifdef WITH_PYTHON
+# include "BPY_extern.h" /* BPY_python_backtrace */
+# endif
+
# include "creator_intern.h" /* own include */
// #define USE_WRITE_CRASH_BLEND
@@ -174,6 +178,11 @@ static void sig_handle_crash(int signum)
sig_handle_crash_backtrace(fp);
+# ifdef WITH_PYTHON
+ /* Generate python back-trace if Python is currently active. */
+ BPY_python_backtrace(fp);
+# endif
+
fclose(fp);
}