From: Ralph H. <rh...@bm...> - 2001-10-23 17:31:46
|
I have an application that repeatedly polls the serial port of my Mac. Unfortunately, if I leave it running long enough, wish dies with an application error 25, and sometimes with error 1. The minimal script that will duplicate the problem is at the end of the message. It's not meant to be practical, just illustrates a timed procedure firing off on a regular basis. If I comment out the call to the AppleScript procedure, then the application runs fine. I suspect a memory leak somewhere in tclAppleScript.... Hope this bug report is useful... ------------------------------------------------------------------------------- package require Tclapplescript set portID "Dummy" puts $portID set rcvHandlerAID "" set rcvEvent "" proc rcvHandler { } { global portID global rcvHandlerAID global rcvEvent set inData [AppleScript execute "serial port list"] puts "Reading in handler $rcvHandlerAID" set rcvEvent RXDONE } set rcvHandlerAID [after 20 {rcvHandler}] while { 0 == [regexp {TIMEOUT|EOF} $rcvEvent] } { vwait rcvEvent puts "Got event $rcvEvent" set rcvHandlerAID [after 20 {rcvHandler}] } ------------------------------------------------------------------------------- |