• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mysterious crash in objc_msgSend in GC app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious crash in objc_msgSend in GC app


  • Subject: Re: Mysterious crash in objc_msgSend in GC app
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 27 Oct 2009 18:08:44 -0400
  • Organization: Rogue Research Inc.

On 10/27/09 1:57 PM, Greg Parker said:

>NSSpeechRecognizer passes `self` to a void* callback context
>parameter. Under GC it should use CFRetain() to keep itself alive
>until the callback returns, but on Leopard it still used [self
>retain]. You get the crash when GC throws the object away and then the
>callback fires again.
>
>Assuming my diagnosis is correct, I'd recommend using CFRetain() to
>keep each NSSpeechRecognizer alive forever, and recycle them with
>setCommands:/startListening/stopListening. Alternatively just CFRetain
>() and leak them, if they're hard to recycle and you don't allocate
>very many.

Thanks Greg!

I've added a 10.5-only leak.  Alas, we only get a report of this every
few months or so, but hopefully I won't see it again.  I suspect this is
probably the issue however, for one thing, most of us in the office do
not have mics, so our users test this way more than us.

Thanks also to Bill and Jens for their replies.  For the record, I don't
use NSMessagePort nor Distributed Objects, nor do I do any dynamic
loading nor unloading of bundles.

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

  • Follow-Ups:
    • Re: Mysterious crash in objc_msgSend in GC app
      • From: Bill Bumgarner <email@hidden>
References: 
 >Mysterious crash in objc_msgSend in GC app (From: "Sean McBride" <email@hidden>)
 >Re: Mysterious crash in objc_msgSend in GC app (From: Greg Parker <email@hidden>)
 >Re: Mysterious crash in objc_msgSend in GC app (From: "Sean McBride" <email@hidden>)
 >Re: Mysterious crash in objc_msgSend in GC app (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: [iPhone] Why so many calls?
  • Next by Date: Re: Mysterious crash in objc_msgSend in GC app
  • Previous by thread: Re: Mysterious crash in objc_msgSend in GC app
  • Next by thread: Re: Mysterious crash in objc_msgSend in GC app
  • Index(es):
    • Date
    • Thread