While remotely SSH'ed into my Mac:
$ osascript <<'EOF'
..> set foo to {}
..> repeat with i from 1 to 23
..> set end of foo to i
..> end repeat
..> foo
..> EOF
_RegisterApplication(), FAILED TO establish the default connection to
the WindowServer, _CGSDefaultConnection() is NULL.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23
I expect the RegisterApplication error, since I'm not logged into the
console, but note that the script still works.
If I increase the iteration count, however, the script breaks:
osascript <<'EOF'
..> set foo to {}
..> repeat with i from 1 to 24
..> set end of foo to i
..> end repeat
..> foo
..> EOF
_RegisterApplication(), FAILED TO establish the default connection to
the WindowServer, _CGSDefaultConnection() is NULL.
14:75: execution error: Application isn't running. (-600)
The limit is consistent. It seems to be related to memory allocation,
since if I change foo to a property, then I get one more iteration -
it works for 24, but breaks on 25.
I tried setting my data segment ulimit to unlimited and doubling the
stack size ulimit, but neither change made any difference.
So can anyone tell me what magic limit I'm hitting, and perhaps how to
avoid it?
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden