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/blender/python/intern/bpy_interface.c
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/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index a880d2cd285..dfddbc047f9 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -436,6 +436,12 @@ static void python_script_error_jump_text(struct Text *text)
}
}
+void BPY_python_backtrace(FILE *fp)
+{
+ fputs("\n# Python backtrace\n", fp);
+ PyC_StackPrint(fp);
+}
+
/* super annoying, undo _PyModule_Clear(), bug [#23871] */
#define PYMODULE_CLEAR_WORKAROUND