I'm developing a Tkinter GUI for a python project. Everything was fine yesterday, but today my mac immediately crashes (back to log-in screen) when I run the mainloop()
command.
I've tried to isolate the issue by cutting back GUI features, but nothing helped. The problem even occurs with the simplest of GUIs.
I'm using this demo code:
from tkinter import Tk, Label, Button
class MyFirstGUI:
def __init__(self, master):
self.master = master
master.title("A simple GUI")
root = Tk()
my_gui = MyFirstGUI(root)
root.mainloop()
When I run the last line, my screen goes black for a second and returns the MacOS log-in screen. Also happens when running the script from terminal. After a few repeats, I found this line to recur in the system.log after at each crash:
Jul 29 17:58:51 MacBook-Pro-myname com.apple.xpc.launchd[1] (com.apple.WindowServer[1510]): Service exited due to SIGSEGV | sent by exc handler[1510]
The handler number is unique to each crash. Booting in Safe Mode resolves the issue, but of course I cannot live in Safe Mode forever :)
It seems some sort of internal issue, as the python code could not be simpler. I have no clue how to debug this, can anyone help me out?
FIXED IT - For some reason Tkinter started to mess with my machine. Update to 8.6.9 resolved the issue. (see: https://bugs.python.org/issue34927)
python script.py
or you use IDE/IDLE/editor to run it? - furas