Under Windows XP, the following simple program crashes after 20 seconds or so with the following error: TclStackFree: incorrect freePtr. Call out of sequence? It behaves the same under python 2.6 and python 2.7. I suspect it has something to do with Tk/Tcl's multithreading model. I did discover that if you comment out the vertical scrollbar code, this program will run fine. I could use some help here in figuring out what the problem is. import threading, ttk, time from Tkinter import * EVENT = '<<EVENT>>' class Monitor(threading.Thread): def run(self): while True: text.event_generate(EVENT) time.sleep(.5) def on_event(*args): text.insert(END, time.ctime()+'\n') text.see(END) root = Tk() text = Text(root) vbar = ttk.Scrollbar(root, orient=VERTICAL) vbar['command'] = text.yview text['yscrollcommand'] = vbar.set text.grid(column=0, row=0, sticky=NSEW) vbar.grid(column=1, row=0, sticky=NS) root.columnconfigure(0, weight=1) root.rowconfigure(0, weight=1) text.bind(EVENT, on_event) worker = Monitor() worker.start() root.mainloop()
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss