• 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: NSDecimalNumber seen as NSCFNumber; a bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDecimalNumber seen as NSCFNumber; a bug?


  • Subject: Re: NSDecimalNumber seen as NSCFNumber; a bug?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 8 Jan 2009 16:27:16 -0800

On Jan 8, 2009, at 08:49, Davide Benini wrote:

And here the application terminates and I get this error message

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFNumber decimalNumberByRoundingAccordingToBehavior:]: unrecognized selector sent to instance 0x10755e0'

By far the most common cause of an error like this (the class of the object is not what you expect) is a memory management bug in your code.


That is, the NSDecimalNumber object (to which something is holding a pointer) has actually been improperly released and deallocated. By chance, the same block of memory has since been reused for a completely unrelated object (a NSNumber object, in this case).

Check to see that you've followed memory management rules everywhere. (Look for a missing retain or an extra release.)


_______________________________________________

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: NSDecimalNumber seen as NSCFNumber; a bug? (not solved)
      • From: Davide Benini <email@hidden>
References: 
 >NSDecimalNumber seen as NSCFNumber; a bug? (From: Davide Benini <email@hidden>)

  • Prev by Date: Re: NSDecimalNumber seen as NSCFNumber; a bug?
  • Next by Date: Re: What's the most cocoa-ey pattern for this?
  • Previous by thread: Re: NSDecimalNumber seen as NSCFNumber; a bug?
  • Next by thread: Re: NSDecimalNumber seen as NSCFNumber; a bug? (not solved)
  • Index(es):
    • Date
    • Thread