Tried'n'trusted Applet crashing repeatedly in X.
Tried'n'trusted Applet crashing repeatedly in X.
- Subject: Tried'n'trusted Applet crashing repeatedly in X.
- From: Mr Tea <email@hidden>
- Date: Fri, 26 Apr 2002 01:24:30 +0100
An applet that works with Entourage to tell me about new mail keeps crashing
in OS X. It's virtually unchanged from a never-crashing applet that I used
with OE in OS 9, and I can't figure out why OS X doesn't like it.
To add a bit more context, when Entourage is running (about 50% of the time)
it collects mail every 15 minutes on a repeating schedule. A script that
runs as part of that schedule tells the mail-announcing applet to do its
stuff. Three or four times a day, I get an alert telling me that the script
applet has unexpectedly quit. When I've been present to witness this, I've
noticed that the crash occurs right at the end of the script, just after the
'announceMail' handler announces my mail using the Mac's built in voice(s).
I do hope there's not some sort of memory problem with script applets using
speech in 10.1.4. That would be immeasurably underwhelming.
Here's the problem script, and for the technically minded, I've appended the
most recent crash log relating to it...
-------------------------THE SCRIPT
on run
set theWords to ""
delay 30
tell application "Finder" to set activeApp to creator type of (every
application process whose frontmost is true)
if activeApp is not "OPIM" then my AnnounceMail(theWords)
end run
on AnnounceMail(theWords)
tell application "Microsoft Entourage"
set mCount to 0
set LmCount to 0
set mBoxes to every folder whose ID = 1 or ID > 5
repeat with mBox in mBoxes
set mCount to mCount + (unread message count of mBox)
end repeat
repeat with thefolder in folders of folder "Lists"
set LmCount to LmCount + (unread message count of thefolder)
end repeat
set mTotal to mCount + LmCount
if mTotal > 0 then
if mTotal = LmCount then
if LmCount > 1 then
set theWords to "You have " & mTotal & " [[emph ++]]list messages."
else
set theWords to "One [[slnc 50]]new [[emph ++]]list message."
end if
else if mTotal > LmCount and LmCount > 0 then
if LmCount > 1 then
set theWords to "You now have " & mTotal & ,
" new emails, including " & LmCount & " [[emph ++]]list messages."
else
set theWords to "There are " & mTotal & ,
" emails waiting to be red, including one list message."
end if
else if LmCount = 0 then
if mTotal > 1 then
set theWords to "There are " & mTotal & " [[slnc 50]]emails waiting to
be opened."
else
set theWords to "You have just one [[slnc 50]] new message."
end if
end if
set tBox to folder "Mr Tea's Inbox"
set tMail to (messages whose read status is untouched) of tBox
set tCount to count of items in tMail
set mCount to 0
if tCount > 0 then
set mSenders to ""
repeat with tMessage in tMail
set theFullAddr to sender of tMessage
set mSender to display name of theFullAddr as string
if mSender is "" then
set mAddr to address of theFullAddr
set mSender to text 1 thru ((offset of "@" in mAddr) - 1) of mAddr
end if
set mCount to mCount + 1
if mCount < tCount then
set mSenders to mSenders & mSender & ", "
else if tCount > 1 then
set mSenders to mSenders & " and " & mSender & "."
else
set mSenders to mSender & "."
end if
end repeat
set theWords to theWords & ,
" Mister [[emph ++]]Tea has mail from " & mSenders
end if
end if
end tell
if mTotal > 0 then
set theChimeFolder to "Studio!:Studio
Files:Resources:Interface:Sounds:Mail Chimes:"
set theChimes to list folder alias theChimeFolder without invisibles
set theChime to (theChimeFolder & (some item of theChimes)) as alias
tell application "Play Sound" to play sound theChime
set theVoice to some item of {"Fred", "Junior", "Princess", "Ralph",
"Trinoids", "Zarvox"}
repeat
try
say theWords using theVoice
exit repeat
end try
delay 1
end repeat
end if
end AnnounceMail
----------------------THE CRASH LOG
Date/Time: 2002-04-25 18:12:49 +0100
OS Version: 10.1.4 (Build 5Q125)
Host: localhost
Command: Mail Checker X
PID: 389
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000003
Thread 0 Crashed:
#0 0x74fa6284 in TUASFrame::FrameType(void)
#1 0x74fa64e8 in TUASFrame::UnlinkTo(TUASFrameType, TUASUnlinkExtent)
#2 0x74f84474 in UASExecute1(void)
#3 0x74f4dda4 in ASExecuteEvent(AEDesc const *, unsigned long, long,
unsigned long *)
#4 0x70249a2c in CallComponentFunctionCommon
#5 0x70293e48 in CallComponentFunction
#6 0x74f452e4 in AppleScriptComponent
#7 0x7024d100 in CallComponent
#8 0x70255470 in CallComponentDispatch
#9 0x7372839c in OSAExecuteEvent
#10 0x74f4396c in Applet::RunScript(AEDesc const *, AEDesc *)
#11 0x74f415b8 in Applet::DoScriptEvent(AEDesc const *, AEDesc *)
#12 0x74f41354 in ScriptEventHandler(AEDesc const *, AEDesc *, long)
#13 0x735fcd9c in TryEventTable
#14 0x735f2d8c in AEMDispatcher
#15 0x735f3f4c in aeResumeTheCurrentEvent
#16 0x735fcb44 in aeReallyProcessAppleEvent
#17 0x735f6f48 in aeProcessAppleEvent
#18 0x74f41678 in Applet::HandleAppleEvent(EventRecord *)
#19 0x74f43004 in Applet::ProcessEvent(unsigned long)
#20 0x74f41b00 in Applet::Main(void)
#21 0x74f41d80 in OSAAppletExecute
#22 0x74f41ef0 in AppletComponent
#23 0x7024d100 in CallComponent
#24 0x70255470 in CallComponentDispatch
#25 0x00001e58 in 0x1e58
#26 0x00001e9c in 0x1e9c
#27 0x00001d78 in 0x1d78
#28 0x00001bb8 in 0x1bb8
Thread 1:
#0 0x70000978 in mach_msg_overwrite_trap
#1 0x70005a04 in mach_msg
#2 0x7017bf98 in __CFRunLoopRun
#3 0x701b7100 in CFRunLoopRunSpecific
#4 0x7017b8e0 in CFRunLoopRunInMode
#5 0x7061be08 in
XIOAudioDeviceManager::NotificationThread(XIOAudioDeviceManager *)
#6 0x706141c0 in CAPThread::Entry(CAPThread *)
#7 0x7002054c in _pthread_body
Thread 2:
#0 0x70044cf8 in semaphore_timedwait_signal_trap
#1 0x70044cd8 in semaphore_timedwait_signal
#2 0x7003f2b8 in _pthread_cond_wait
#3 0x70283ea4 in TSWaitOnConditionTimedRelative
#4 0x70270138 in MPWaitOnQueue
#5 0x02da2850 in MTBEWorker::WorkLoop(MTBEWorker *)
#6 0x02da1e60 in MTBEWorkerStartMPTask
#7 0x702831a8 in PrivateMPEntryPoint
#8 0x7002054c in _pthread_body
Thread 3:
#0 0x7003f4c8 in semaphore_wait_signal_trap
#1 0x7003f2c8 in _pthread_cond_wait
#2 0x70250ab0 in TSWaitOnCondition
#3 0x70283eb0 in TSWaitOnConditionTimedRelative
#4 0x70270138 in MPWaitOnQueue
#5 0x02da2850 in MTBEWorker::WorkLoop(MTBEWorker *)
#6 0x02da1e60 in MTBEWorkerStartMPTask
#7 0x702831a8 in PrivateMPEntryPoint
#8 0x7002054c in _pthread_body
Thread 4:
#0 0x70000978 in mach_msg_overwrite_trap
#1 0x70005a04 in mach_msg
#2 0x70026a2c in _pthread_become_available
#3 0x70026724 in pthread_exit
#4 0x70020550 in _pthread_body
PPC Thread State:
srr0: 0x74fa6284 srr1: 0x0200f030 vrsave: 0x00000000
xer: 0x20000008 lr: 0x74fa64e8 ctr: 0x70000a30 mq: 0x00000000
r0: 0x74f84474 r1: 0xbffff360 r2: 0xbffff1b0 r3: 0x00000000
r4: 0x00000001 r5: 0x00000001 r6: 0x00000000 r7: 0x00000180
r8: 0x84f4286c r9: 0x028560e8 r10: 0x02aade80 r11: 0x02a08060
r12: 0x70000a30 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x00000000 r21: 0x00000000 r22: 0x00000001 r23: 0x00000000
r24: 0xbffff7c8 r25: 0x000000c8 r26: 0x028560e4 r27: 0x00000001
r28: 0x00000000 r29: 0x02a0827c r30: 0x00000001 r31: 0x74fa64bc
**********
Cordially
Mr Tea
--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.