• 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: NSSearchField _sendPartialString exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSearchField _sendPartialString exception


  • Subject: Re: NSSearchField _sendPartialString exception
  • From: "Phil Dow" <email@hidden>
  • Date: Fri, 02 Dec 2005 10:36:13 +0000

I've taken a good long look at the code and can't seem to figure out where this array would be allocated and then deallocated before being sent a message. I am definitely using an autoreleased array from another object to grab the results of the search, but I do not refer to it outsideo of the search code. I do use it to create a set which I intersect against another in an array controller, and I think the problem is somewhere here.

I have noticed, though, that the exception is only thrown once per application run, at the first attempt to search. It is reproduced only when I restart the application. Wouldn't that mean that an unitialized array is being sent a message? Again though, I've really looked at the code and can't seem to find where that's happening. My initialization code is pretty good.

Definitely weird that it's a problem in 10.3.9 but not any release of 10.4. Thankfully, I've found what I believe is a temporary solution. I surround my search code with the objective-C exception handling methods which catches the exception and prevents me from further acting on the apparently released object or using.

-Phil

> -------Original Message-------
> From: Spencer Salazar <email@hidden>
> Subject: Re: NSSearchField _sendPartialString exception
> Sent: 01 Dec '05 17:44
>
> Is it possible that somewhere you are deallocating an array, but then  
> later trying to send a message to it?  This could explain why you are  
> getting either the selector not recognized error or a crash; perhaps  
> sometimes the deallocated space is used to store another object,  
> causing the "selector not recognized" error, and sometimes it is not  
> reallocated, thus causing a seg fault.
>
> In the past I have gotten a very similar error in which objects were  
> being deallocated, but I mistakenly kept sending them messages  
> afterwards.  The app would either crash or raise a selector not  
> recognized exception.
>
> None of this would explain the discrepancy between the two Mac OS  
> versions, though, so far as I can tell.
>
> spencer
>
> On Dec 1, 2005, at 2:28 AM, dev wrote:
>
> > I am encountering a rather annoying error in 10.3.9 when using a  
> > Toolbar searchfield. The searchfield works fine in 10.4, but in  
> > 10.3.9 I get an exception every once in a while during search. For  
> > some users this causes a crash. On my machine, the exception is  
> > ignored and I am able to process the search request in my  
> > controller just fine:
> >
> > Mac OS X Version 10.3.9 (Build 7W98)
> > 2005-11-30 18:35:58.152 Journler[268] *** -[NSCFString  
> > objectAtIndex:]: selector not recognized
> > 2005-11-30 18:35:58.152 Journler[268] *** NSTimer discarding  
> > exception 'NSInvalidArgumentException' (reason '*** -[NSCFString  
> > objectAtIndex:]: selector not recognized') that raised during  
> > firing of timer with target 3abc00 and selector '_sendPartialString'
> >
> > I have no idea where a string object is being treated as an array.  
> > My search processing code certainly doesn't do this. I also have no  
> > idea what object is targeted by _sendPartialString. I've searched  
> > for this private method by have found almost no information on it.
> >
> > Any thoughts?
> > -Phil
> >  _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Cocoa-dev mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > 40princeton.edu
> >
> > This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Switching international keyboards programmatically
  • Next by Date: SOLVED NSTableView Restoring State
  • Previous by thread: Re: NSSearchField _sendPartialString exception
  • Next by thread: Re: CoreData, TextView and Bindings
  • Index(es):
    • Date
    • Thread