• 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
[NSCFNumber intValue]: unrecognized selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSCFNumber intValue]: unrecognized selector


  • Subject: [NSCFNumber intValue]: unrecognized selector
  • From: Steve Rossi <email@hidden>
  • Date: Thu, 25 Sep 2008 08:22:30 -0500

Sorry in advance for a long-winded post, I need help debugging a application crash caused by this unrecognized selector which requires some explanation
I've deduced that he crash seems to be something timing related which occurs only at application startup, and only under certain conditions (i.e. reproduce occassionlly by opening an NSOpenPanel modal dialog before the application is fully up and running). When I say the application is fully up and running, I mean a secondary thread has retrieved data from a network source and populated a model class. This secondary thread cyclically updates the data about 8x per second by means of a timer in the secondary thread's run loop.
I use Cocoa bindings to display the data in the UI. I'm sure the problem is happening in the bindings,
but I'm having trouble finding where.


The actual error is : -[NSCFNumber intValue]: unrecognized selector sent to instance 0x815a10
Terminating app due to uncaught exception 'NSInvalidArgumentException


The instance is always 0x815a10 every time the application crashes. So if I could figure out what that instance is and where its being used, I could probably fix the problem. That's what I've been unable to do and what I need help with. GDB has got no love for me.
The stack backtrace printed in the log (after converting to symbols) shows this:


__raiseError (in CoreFoundation) + 331
objc_exception_throw (in libobjc.A.dylib) + 40
-[NSObject doesNotRecognizeSelector:] (in CoreFoundation) + 186
___forwarding___ (in CoreFoundation) + 892
_CF_forwarding_prep_0 (in CoreFoundation) + 50
-[NSObject(NSKeyValueObservingPrivate) _notifyObserversForKeyPath:change:] (in Foundation) + 508
-[NSController _notifyObserversForKeyPath:change:] (in AppKit) + 248
-[NSController observeValueForKeyPath:ofObject:change:context:] (in AppKit) + 949
NSKVONotify (in Foundation) + 62
-[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation) + 546
-[snmpHandler setValue:forIndex:inModel:] (in splNetTREND) (snmpHandler.m:399)
-[snmpHandler process_result:apdu:forModel:session:] (in splNetTREND) (snmpHandler.m:283)
-[snmpHandler updateVals:forSession:inModel:] (in splNetTREND) (snmpHandler.m:180)
-[snmpHandler updateDynamicValsForSession:inModel:] (in splNetTREND) (snmpHandler.m:209)
-[snmpSession updateDynamicValsInModel:] (in splNetTREND) (snmpSession.m:97)
-[splNetProcess handleTimer:] (in splNetTREND) (splNetProcess.m:180)
__NSFireTimer (in Foundation) + 147
CFRunLoopRunSpecific (in CoreFoundation) + 4469
CFRunLoopRunInMode (in CoreFoundation) + 88
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 213
-[NSRunLoop(NSRunLoop) runUntilDate:] (in Foundation) + 93
-[splNetProcess splNetThread:] (in splNetTREND) (splNetProcess.m:95)
-[NSThread main] (in Foundation) + 45
__NSThread__main__ (in Foundation) + 308
_pthread_start (in libSystem.B.dylib) + 321
thread_start (in libSystem.B.dylib) + 34


If I could see the [snmpHandler setValue: forIndex: inModel] context in GDB I think I could determine the root of the problem, but the GDB backtrace only shows me this:

#0 0x96e160fb in objc_exception_throw ()
#1 0x93de7ad3 in CFRunLoopRunSpecific ()
#2 0x93de7cf8 in CFRunLoopRunInMode ()
#3 0x9420f4a5 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#4 0x9428d8ed in -[NSRunLoop(NSRunLoop) runUntilDate:] ()
#5 0x0000c8bb in -[splNetProcess splNetThread:] (self=0x85d950, _cmd=0x8dbe5, arg=0x0) at /Users/steve/Work/src/splNetTREND/ splNetProcess.m:93
#6 0x941daf1d in -[NSThread main] ()
#7 0x941daac4 in __NSThread__main__ ()
#8 0x926e36f5 in _pthread_start ()
#9 0x926e35b2 in thread_start ()


So my question is how do I figure out what instance 0x815a10 is? Or better yet, is there a way to get GDB to show me the same backtrace as is printed in the log?

Thanks in advance for any advice. Sorry again for the long post.

Steve

_______________________________________________

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: [NSCFNumber intValue]: unrecognized selector
      • From: j o a r <email@hidden>
  • Prev by Date: objc_msgSend_ptr
  • Next by Date: Loading mechanism with NSAtomicStore
  • Previous by thread: Re: objc_msgSend_ptr
  • Next by thread: Re: [NSCFNumber intValue]: unrecognized selector
  • Index(es):
    • Date
    • Thread