• 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: NSSelectorFromString crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSelectorFromString crash


  • Subject: Re: NSSelectorFromString crash
  • From: Christopher Wolf <email@hidden>
  • Date: Tue, 1 May 2001 20:09:41 -0400

*This message was transferred with a trial version of CommuniGate(tm) Pro*

On Tuesday, May 1, 2001, at 10:39 AM, Stefan Jung wrote:

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hello,

I was able to crash NSSelectorFromString with a little help from
the following code:

- (SEL)setAccessorFromIdentifier:(NSString *)identifier
{
NSString *string = [@"set" stringByAppendingString:
[[identifier capitalizedString]
stringByAppendingString:@":"]];
return NSSelectorFromString(string);
}

This method is called from:

- (void)tableView:(NSTableView *)tableView
setObjectValue:(id)object forTableColumn:(NSTableColumn
*)tableColumn row:(int)row

The crash.log looks like:

**********

Date/Time: 2001-05-01 16:32:41 +0200

PID: 2174
Command: MSConstructor

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0:
#0 0x7017726c in _CFStringGetCString ()
#1 0xbfffe470 in 0xbfffe470 ()
#2 0x7097dae4 in _NSSelectorFromString ()
#3 0x00005178 in -[TableController accessorFromIdentifier:]
#4 0x00004e38 in -[TableController
tableView:objectValueForTableColumn:row:]

You're crashing in some other method called accessorFromIdentifier: not setAccessorFromIdentier: shown above... also the backtrace shows this being called from tableView:objectValueForTableColumn:row: not from tableView:setObjectValue:forTableColumn:row:...

Perhaps the problem isn't where you think it is.

- Chris


References: 
 >NSSelectorFromString crash (From: Stefan Jung <email@hidden>)

  • Prev by Date: Re: NSToolbar experience?
  • Next by Date: Re: NSSelectorFromString crash
  • Previous by thread: NSSelectorFromString crash
  • Next by thread: Re: NSSelectorFromString crash
  • Index(es):
    • Date
    • Thread