1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Add the fault handler in order to try to get a proper crash stack

This commit is contained in:
Julien Duponchelle 2015-05-17 12:45:09 +02:00
parent 221a35baae
commit 0c5b753211
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,10 @@ import os
import sys import sys
import struct import struct
import platform import platform
import faulthandler
# Display a traceback in case of segfault crash. Usefull when frozen
faulthandler.enable()
try: try:
import raven import raven

View File

@ -190,6 +190,8 @@ def main():
port = int(server_config["port"]) port = int(server_config["port"])
server = Server.instance(host, port) server = Server.instance(host, port)
try: try:
import faulthandler
faulthandler._sigsegv()
server.run() server.run()
except OSError as e: except OSError as e:
# This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows. # This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.