interpreting errors.

Discussion in 'iOS Programming' started by IDMah, Jul 14, 2012.

  1. IDMah macrumors 6502

    IDMah

    Joined:
    May 13, 2011
    #1
    Got a crash that says this.. need help figuring out what this means.
    is it actually something to do with Predicate or just memory leaks.. :confused:

    thanks
    Ian

    Code:
    2012-07-14 14:20:13.861 EmperorsChallenge[1163:207] in Shuffle Reset YES/n
    2012-07-14 14:20:15.869 EmperorsChallenge[1163:207] -[NSSubstringPredicateOperator set]: unrecognized selector sent to instance 0x4e84470
    2012-07-14 14:20:15.871 EmperorsChallenge[1163:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSSubstringPredicateOperator set]: unrecognized selector sent to instance 0x4e84470'
    *** Call stack at first throw:
    (
    	0   CoreFoundation                      0x0110fbe9 __exceptionPreprocess + 185
    	1   libobjc.A.dylib                     0x012645c2 objc_exception_throw + 47
    	2   CoreFoundation                      0x011116fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    	3   CoreFoundation                      0x01081366 ___forwarding___ + 966
    	4   CoreFoundation                      0x01080f22 _CF_forwarding_prep_0 + 50
    	5   UIKit                               0x003f16fa -[UILabel _drawTextInRect:baselineCalculationOnly:] + 2219
    	6   UIKit                               0x003eeb40 -[UILabel drawTextInRect:] + 70
    	7   UIKit                               0x003086eb -[UIView(CALayerDelegate) drawLayer:inContext:] + 426
    	8   QuartzCore                          0x00ccb9e9 -[CALayer drawInContext:] + 143
    	9   QuartzCore                          0x00cc9f03 -[CALayer _display] + 524
    	10  QuartzCore                          0x00cc9be4 CALayerDisplayIfNeeded + 231
    	11  QuartzCore                          0x00cbc38b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 325
    	12  QuartzCore                          0x00cbc0d0 _ZN2CA11Transaction6commitEv + 292
    	13  QuartzCore                          0x00cec7d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
    	14  CoreFoundation                      0x010f0fbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
    	15  CoreFoundation                      0x010860e7 __CFRunLoopDoObservers + 295
    	16  CoreFoundation                      0x0104ebd7 __CFRunLoopRun + 1575
    	17  CoreFoundation                      0x0104e240 CFRunLoopRunSpecific + 208
    	18  CoreFoundation                      0x0104e161 CFRunLoopRunInMode + 97
    	19  GraphicsServices                    0x01a44268 GSEventRunModal + 217
    	20  GraphicsServices                    0x01a4432d GSEventRun + 115
    	21  UIKit                               0x002df42e UIApplicationMain + 1160
    	22  EmperorsChallenge                   0x00002190 main + 102
    	23  EmperorsChallenge                   0x00002121 start + 53
    )
    terminate called after throwing an instance of 'NSException'
    Program received signal:  “SIGABRT”.
    (gdb) 
    
    Basically a 411 on how to read crash logs.. would be useful..
    Any help on mystic art of debuggering code?
     
  2. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #2
    If I remember this one correctly your sending a message to something that is not there. If it was in memory before it is not anymore which is why you are getting the Unrecognized Sector.

    Best thing is to post code so people can help you.

    Code:
    -[NSSubstringPredicateOperator set]: [COLOR="Red"]unrecognized selector[/COLOR] sent to instance 0x4e84470
    
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    What do expect the class of the object to be?

    Previous post on unrecognized selector errors.

    For unrecognized selector errors where the class isn't at all what you expect, the 411 is "enable zombies" because it's almost certainly a memory management error (under-retain or over-release, the former being more common in my experience). The advantage of doing a test run with zombies enabled is it often narrows down the search area pretty quickly. That makes it much easier to do the real debugging. A static analysis build can also give some clues about memory management errors (google search terms: xcode analyze).
     

Share This Page