Xcode/Quark problem

I really need some help. I have a fairly large app i wrote in Applescript/Xcode 2.4.1. The application interacts with Quark, Indesign, Fontdoctor, suitcase, flight check, etc.

For some reason, a recent change, which was small, caused the app to start failing on any line that has an activate in a Quark tell block

tell application “QuarkXpress”
activate
end tell

In any place where my code does that, the app will lock up. Commenting out the activate line will make the app work (as long as Quark is active anyway).

This worked fine a week ago. And as far as i can tell, nothing has changed on the users systems. For what its worth, its 6.52 Quark that is having the problem.

Any idea what could be going on?

Thanks.

I did some more testing.

tell application “QuarkXpress”
activate
end tell

works fine from applescript within script editor
works fine from a new xcode applescript project
does not work anywhere in my main scode project (active is used about 10x in it).

I am now installing xCode 2.5, maybe that will change something.

xcode 2.5 now…same problem…but…

I was totally wrong in what is causing the error.

Anything that happens in the function i am talking about (crashes the app).

To explain…

on getQuarkDocWindowName()
set docWindowName to “”
log “getQuarkDocWindowName - 1”
tell application “QuarkXPress”
activate
tell me to log “getQuarkDocWindowName - 2”
end tell
log “getQuarkDocWindowName - 3”

never displays point 2 or 3

if, after the logging of 1, i add a line, say:
display dialog “Test”

the app also crashes, and never gets to log 2 or 3.

I am totally confused now as to what is going on.

Is it some sort of a memory problem? Is the app to big or something?