From e9c4325515aed9cb3a35183d4093cda2b6bffd9f Mon Sep 17 00:00:00 2001 From: Daniel Bailey Date: Thu, 6 Aug 2020 15:34:55 +1000 Subject: Python: include Python stack trace in the crash log This helps Python developers troubleshoot errors when Python causes a crash. --- source/creator/creator_signals.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/creator') 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 +# 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); } -- cgit v1.2.3