[Tkinter-discuss] TkInter won't update display on OS X if delay is too small

Leon Maurer leon.maurer at gmail.com
Sat Jan 12 16:46:51 CET 2013


Howdy,

I'm running in to a problem where TkInter won't update the interface on OS
X. I've filed a bug (http://bugs.python.org/issue16941), but it was
suggested that I also send the message here, in case you have some thoughts
about what to do -- either a fix or a workaround.

Here's a small piece of code which has the problem:

https://mywebspace.wisc.edu/lnmaurer/web/updatebug/bugtest.py

The program is simple -- basically a big canvas with a some text in the
middle that counts up.

Here's a short quick-time movie showing the problem with that code:

https://mywebspace.wisc.edu/lnmaurer/web/updatebug/updatebug.mov

The screen-cast has three parts. First, it shows the program working as it
should. Then, I add a simple background image to the canvas (a black
rectangle), and the interface refuses to refresh at all; I get a spinning
beach ball wheel (although the cursor appears as the usual black arrow in
the screen-cast). Finally  I increase the delay between updates, and the
interface again refreshes as it should.

The middle case, where the interface becomes totally unresponsive, is a bug.

I haven't been able to reproduce this problem under Linux or Windows; I've
only run in to it on OS X. Also, the size of the canvas and image matters;
if I make them small enough, the interface won't freeze up. I first ran in
to this problem on a more complicated program with a more complex interface

http://lnmaurer.github.com/Interference-Inference-Interface/

so -- if you can't reproduce the problem with the simple code -- you may be
able to reproduce it with that more complex code.

Computer and software information:
OS X 10.6.8
Python 2.7.3
ActiveTcl 8.5.13
PIL 1.1.7
MacBookPro5,5 w/ 2.26GHz Core 2 Duo (So it's a machine that's kind of slow
by today's standards. Maybe faster machines won't run in to this problem,
but this machine doesn't have the problem when running Windows or Linux.)

Thanks.
-Leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130112/dfb41282/attachment.html>


More information about the Tkinter-discuss mailing list