Re: 'selector not recognized' ?
Re: 'selector not recognized' ?
- Subject: Re: 'selector not recognized' ?
- From: Fritz Anderson <email@hidden>
- Date: Thu, 22 Jul 2004 12:20:18 -0500
Am I right in suspecting that other messages may also be appearing on
the console indicating that it is Xcode or gdb, and not your
application, that is generating the errors?
I have seen this in long functions with NSString temporary variables
that are used only in a section of the code so that the compiler (even
at optimization level zero) re-uses the storage for another pointer.
For example:
NSView * myParent = [self superview];
// Do things with myParent
// Stop doing things with myParent
NSString * scratch;
[scanner scanString: @"foo" intoString: &scratch];
Both myParent and scratch will appear in the debugger's list of local
variables, even though the same storage (or, likelier, register) is
allocated to both. The debugger, being whizzy, tries to display the
string value of scratch. But in the early part of the function, that
register is filled with a pointer to an NSView, which doesn't respond
to messages like "length". Whereupon the debugger belches loudly (***
-[NSView length]: selector not recognized) and refuses to be useful any
more.
So it's no fault of yours. Alas, I don't know of a workaround, other
than interleaving the use of all the automatic variables throughout the
function, in hopes of sabotaging the register coloring.
-- F
On 22 Jul 2004, at 10:21 AM, Lance Drake wrote:
2004-07-22 06:45:48.690 M4[928] *** -[NSCFDictionary length]: selector
not recognized
2004-07-22 06:45:48.690 M4[928] *** -[NSCFDictionary length]: selector
not recognized
Timed out fetching data. Variable display may be inaccurate.
Although I get no errors at compile time - and no errors if just
'build & run' - when stepping thru my code, the console receives many
messages such as shown above - and the 'step-over' time is in the 5 to
10-second range. At some point an "Unable to disassemble ??. Program
received signal: "EXC_BAD_ACCESS"." msg appears and the game is over.
I guess the perplexing thing is that I don't seem to be doing anything
(at the time) that would tend to generate such a message. For
instance,
OSErr err = [mDsrc acquireList:sectionSubDefDict];
generates these lines into the console:
2004-07-22 09:10:47.708 TestApp[1089] *** -[TestAppMain length]:
selector not recognized
2004-07-22 09:10:47.717 TestApp[1089] *** -[TestAppMain length]:
selector not recognized
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.