Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spurious timeout on nth Apple event on Snow Leopard




On Nov 6, 2009, at 23:20, Christopher Nebel wrote in the thread "system info delay":


Not if the delay is consistent -- the bug you're referring to only happens every 65,000th time.

I cannot confirm this. I get values far under and over 65000 - on subsequent runs. So I'm a bit skeptical about the "it's only a counter problem" assumption.


Config: Mac Pro, 10 GB RAM, OS 10.6.1
There's a problem #2: If you run the following script in AppleScript Editor it eats over 5 GB of RAM in about 20 minutes. I stopped there as the system became very sluggish. The first gigabytes are eaten quite fast, then it gets slower and slower.
So I ran it in Script Debugger where it took 3.5 minutes and far less RAM was eaten (220 MB):
-----
set L to ""
repeat 10 times
repeat with i from 1 to 500000
try
with timeout of 5 seconds
tell application "TextEdit" to current date
end timeout
on error errm number errn
--display dialog "timeout" & i & " " & errn
set L to (L & i & return)
exit repeat
end try
end repeat
end repeat
L
-->
20143
65536
65536
65536
65536
65536
65536
65536
65536
65536
Whoops, now as expected. But I swear by 1000% that I have usually other values in Script Debugger... because I made this "find missing event" routine for one of my important scripts which I always run in Script Debugger.


Though, now I have something ;) When I strip the script a bit and run it repeatedly in AppleScript Editor (still eats RAM):
-----
set L to ""
repeat with i from 1 to 300000
try
with timeout of 5 seconds
tell application "TextEdit" to current date
end timeout
on error errm number errn
--display dialog "timeout" & i & " " & errn
set L to (L & i & return)
exit repeat
end try
end repeat
L
-->
3420
44115
131117
170425
26227
104888
Should be always 65536, or a few counts under.



Christian _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >RE: system info delay (From: Hagimeno <email@hidden>)
 >Re: system info delay (From: Christopher Nebel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.