The bug I am running into is that sys.exit(0)
is not properly closing my program.
I use pyinstaller to make this program an exe. When I use the exe, the program has to be shutdown using task manager. (I am running the program on a Windows 10 machine) If I run it from visual studio code it hangs in the terminal and I have to close the terminal. That is, unless I run it in debug mode. It will properly close in debug mode, after a momentary delay.
I have a fairly large program, and I cant figure out where the error is coming from, or what is causing it, so I couldn't cant include the code that is causing the issue or a minimum reproducible example. Though, it could have something to do with the multiprocessing module.
I do use multiprocessing.freeze_support()
and debug mode does give a warning about this. Could debug mode's interaction with freeze support cause it to bypass whatever this issue is? If not, what could cause sys.exit(0)
to hang, but only if you are not using debug mode?
Thank you in advance for any help or suggestions provided.