Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications
Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications
- Subject: Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications
- From: "Clark Cox" <email@hidden>
- Date: Fri, 11 Jul 2008 10:36:03 -0700
On Fri, Jul 11, 2008 at 7:20 AM, Sean McBride <email@hidden> wrote:
> Hi all,
>
> The following works just fine in non-GC apps when called in an IBAction
> method:
>
> NSSpeechSynthesizer* speechSynthesizer =
> [[[NSSpeechSynthesizer alloc] init] autorelease];
> [speechSynthesizer startSpeakingString:
> @"Hello. I'm Macintosh. It sure is great to get out of that bag."];
>
> In GC apps it crashes (non main thread):
>
> #0 0x907586e8 in objc_msgSend ()
> #1 0x952f6f23 in SpeechDoneProc ()
> #2 0x1f00d979 in MTBEDoneTask::Execute ()
> #3 0x1f018b01 in MTBEWorker::WorkLoop ()
> #4 0x1f018b5d in MTBEWorkerStartMPTask ()
> #5 0x91ec555b in PrivateMPEntryPoint ()
> #6 0x96fa76f5 in _pthread_start ()
> #7 0x96fa75b2 in thread_start ()
>
> I'm guessing this is because the speechSynthesizer is collected before
> it finishes speaking. Is this 'correct behaviour' or a bug? Needless
> to say, the docs say nothing about special considerations for garbage
> collection. My speechSynthesizer has no delegate, and I don't care when
> it starts or stops speaking. Shouldn't that make it
> NSSpeechSynthesizer's job to keep itself alive until it finishes
> speaking? Afterall, _I'm_ finished with the speechSynthesizer.
If I were you, I'd file a Bug.
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden