Issue 13040: call to tkinter.messagebox.showinfo hangs the script on timer on Windows (original) (raw)

Created on 2011-09-24 10:44 by Richard86, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test1.py Richard86,2011-09-24 10:44 Python script that illustrates the error
Messages (4)
msg144496 - (view) Author: (Richard86) Date: 2011-09-24 10:44
Call to tkinter.messagebox.showinfo("Test", "test") makes the script hang in Windows 7 with Python 3.2.2 with Timer(2, methodname, ()).start().
msg144693 - (view) Author: (Richard86) Date: 2011-09-30 16:01
This is a serious problem. I REALLY hope that someone on a Windows machine can either confirm the bug by reproducing with provided example code or disprove it.
msg144699 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-09-30 19:25
The problem can be reproduced on some other platforms depending on the version of Tcl/Tk in use. But the supplied program violates the well-known if not particularly well-documented restriction of tkinter programming that all Tk UI operations must be on the main thread. See, for example, http://effbot.org/zone/tkinter-threads.htm or http://tkinter.unpythonic.net/wiki/mtTkinter
msg144702 - (view) Author: (Richard86) Date: 2011-09-30 20:03
You nailed it. Thank you very much! (I really thought it was a bug, since the code ran well on Linux.)
History
Date User Action Args
2022-04-11 14:57:21 admin set github: 57249
2011-09-30 20:03:17 Richard86 set messages: +
2011-09-30 19:25:28 ned.deily set status: open -> closednosy: + ned.deilymessages: + type: crash -> resolution: not a bug
2011-09-30 16:01:30 Richard86 set messages: +
2011-09-25 21:26:51 Richard86 set nosy: + gpolo
2011-09-24 20:21:45 Richard86 set title: call to tkinter.messagebox.showinfo hangs the script after timer -> call to tkinter.messagebox.showinfo hangs the script on timer on Windows
2011-09-24 10:52:28 Richard86 set title: call to tkinter.messagebox.showinfo hangs the script -> call to tkinter.messagebox.showinfo hangs the script after timer
2011-09-24 10:44:06 Richard86 create