diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index 23ee7bc0..2cefe0e4 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -19,6 +19,10 @@ import os import sys import struct import platform +import faulthandler + +# Display a traceback in case of segfault crash. Usefull when frozen +faulthandler.enable() try: import raven diff --git a/gns3server/main.py b/gns3server/main.py index e0bf9af2..2cdf3653 100644 --- a/gns3server/main.py +++ b/gns3server/main.py @@ -190,6 +190,8 @@ def main(): port = int(server_config["port"]) server = Server.instance(host, port) try: + import faulthandler + faulthandler._sigsegv() server.run() except OSError as e: # This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.