I have a data acquisition program written in Python that I distribute to my collaboration as an executable (using cx_freeze), as I don't want to bother them with installing Python and installing all the software dependencies. The program has been working well for a year now. Recently, the program started to crash (crash, not give a scripting error, i.e., the Python virtual machine itself is crashing). So I would like to know what library is causing this problem. This problem is happening randomly, so it's difficult to systematically pinpoint the cause.
I learned about faulthandler, and I would like to use it with my cx_freeze, because I can't be sure the problem is happening due to cx_freeze itself or due to some other library.
The question: How can I produce a cx_freeze executable that will use
from cx_Freeze import setup, Executable
from GUI.Meta import *
target = Executable("Main.py",
#base = "Win32GUI",
icon = "GUI\\icon.ico",
name = "My Software",
version = SOFTWARE_VERSION,
description = "",
executables = [target])
Main.py -q -X faulthandler
from faulthandler import *
I learned that I could use
procdump. It can be downloaded from here. It's a very simple program that can log stack trace. You can use it with:
C:\>procdump -ma -i c:\Dumps
and this will dump the stack trace of any program that crashes to that folder.