From: nagai@... Date: 2002-06-21T16:34:33+09:00 Subject: Re: Minor Tk bug on Windows? Hi, From: "Hal E. Fulton" Subject: Re: Minor Tk bug on Windows? Date: Fri, 21 Jun 2002 15:29:30 +0900 Message-ID: <01d801c218ed$aee2a540$0300a8c0@austin.rr.com> > I think that rapidity has nothing to do with this > particular occurrence. It is easily reproducible > 100% of the time for me... one keystroke will do it. My sample of problem shows the reason of fail to fix bugs. :-) But I think source of the problems is same. I think the bugs are based on the colision of Ruby's and Tk's memory management. In the script which has trouble, for ForcusIn event, Tcl/Tk interpreter calls Ruby interpreter to proceed the bind proc. And Ruby interpreter calls Tcl/Tk interpreter to set a value to a Tcl variable. After that, Tcl/Tk interpreter removes the event data structure from the event queue and free the memory for the event data structure. On this step, data on Ruby and data on Tcl/Tk have relationship, but Ruby's and Tk's memory management are independent each other. I think either or both of two interpreter break the other's data structure. Thread switching makes the situation extremely complex. And such as your problem, it seems depend on OS environment. Therefore, I can't still find the buggy part. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)