From fafb83c5c435c45b92006a1740e4e88ac251c538 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 24 May 2017 15:47:26 +0200 Subject: [PATCH] Enable the Python faulthandler This will print a Python backtrace to stderr when SIGSEGV and similar crashes happen. Hopefully it should help a bit when debugging those. --- cura_app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura_app.py b/cura_app.py index 1d5f7737f3..1d8867f1f4 100755 --- a/cura_app.py +++ b/cura_app.py @@ -5,6 +5,7 @@ import os import sys import platform +import faulthandler from UM.Platform import Platform @@ -59,6 +60,8 @@ if hasattr(sys, "frozen"): sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w") sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w") +faulthandler.enable() + # Force an instance of CuraContainerRegistry to be created and reused later. cura.Settings.CuraContainerRegistry.CuraContainerRegistry.getInstance()