Author epaine
Recipients epaine, serhiy.storchaka, spcmicro
Date 2020-11-28.14:16:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606572986.22.0.318612933253.issue42491@roundup.psfhosted.org>
In-reply-to
Content
I agree this is a race condition, and have narrowed the issue down to wait_visibility with the following also hanging indefinitely (tested against the master branch):

import threading
import tkinter as tk
def create_tp():
    t = tk.Toplevel()
    t.wait_visibility()
root = tk.Tk()
tk.Button(root, text="Create", command=lambda:
          threading.Thread(target=create_tp).start()).pack()
root.mainloop()

I agree this is a race condition (presumably between wait_visibility and window render) and am pretty sure there is nothing either us or the Tk team can do (IMO, this issue should be closed - though thank you for reporting it).
Similar behaviour to issue-42142, though I don't believe threading is used there.

> Am I doing something wrong here?
Using threads?! tkinter is known to not like threads and there are several bugs which can cause the Python interpreter to crash.
History
Date User Action Args
2020-11-28 14:16:26epainesetrecipients: + epaine, serhiy.storchaka, spcmicro
2020-11-28 14:16:26epainesetmessageid: <1606572986.22.0.318612933253.issue42491@roundup.psfhosted.org>
2020-11-28 14:16:26epainelinkissue42491 messages
2020-11-28 14:16:26epainecreate