bizzare runtime error

i recently modified a working a/s…cleaning up code, u know how that is;-) and found that it was apparently entering an infinite loop, memory usage growing, chewing 90+% of cpu (fortunately i’ve got a duo:-)

it’s a stay-open app that is called by a cgi shell script, that calls an osascript that tells my app to return a list of hd recordings: (.app version)

			tell application "playRec"
				if my cmd = "update" then �
				set recList to listTDL()
                        end tell

i discovered that the problem occurred on the initRecList call: when i moved that into the listTDL function, the problem went away…wtf??? have i hit some a/s weirdness?


I have no idea, what the appliction “playRec” does.
Normally the keyword my is only used to talk directly to these parts of AppleScript,
the application doesn’t “understand” or if there is an dictionary conflict like a double used command

sorry, i should have condensed the relevant code:

tell application "playRec"
         set recList to listTDL()
end tell

the “set my” in the previous post has nothing to do with the problem…and i have nfi why the applescript code blocks have stopped indenting:-(

playrec is a stay-open app containing a list of recordings, and listTDL() returns a list of those recordings that i format into html for display on a webpage…can’t read the dinky little applescript dialogs from the couch;-)

if i call initRecList() from the tell block, playrec runs away, gobbling memory & cpu time.

if i move initRecList() into listTDL(), no problem…ok, fine.

my wtf concerns the fact that the same code worked fine until i made some changes in globals…compare

I recommend to remove the try blocks and watch, where the error occurs

btw: for a handler call within a application tell block, the keyword my is needed e.g. set recList to my listTDL()

thanx 4 the suggestion, but the runaway doesn’t occur when running the app in script editor, only when the init is called from a tell block of another script to the running (stay-open) app.

anyway, i’ve fixed the problem by moving the init call inside the list function (it was outside originally b4 i wrote the caching code.)

if u r interested in seeing what the app does: