Strange, sporadic CUI ... NSInvalidArgumentException errors

My app (on iOS8) crashes quite often due to "unrecognized selector" and "freed instance" messages sent to classes that are not publicly available. These errors include:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[CUIRenditionKey type]: unrecognized selector sent to instance 
0x14d04270'

      

and

*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[CUIMutableThemeRendition exifOrientation]: message sent to
deallocated instance'

      

Since I have no understanding of these classes (they also don't show up in any searches): how should I fix these error messages.

Are these bugs in iOS8?

(It might be related to this Mac issue )

+3


source to share


1 answer


I had this same problem lately and got thrown back to the wrong property parameter assign

when it should have been retain

- a silly copy-paste error.

So, basically I had this line:

@property (nonatomic, assign) id area;

      



when it should have been:

@property (nonatomic, retain) id area;

      

The segue call code sets the value and then frees the memory (assuming it was not used because it was not saved). So when a new UIView appeared, the selector was sent to a different default (in my case CUIRenditionKey

exactly the same as yours).

+3


source







All Articles