• 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: Error executing instruction "[NSBezierPath bezierPath]"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error executing instruction "[NSBezierPath bezierPath]"


  • Subject: Re: Error executing instruction "[NSBezierPath bezierPath]"
  • From: James Bucanek <email@hidden>
  • Date: Mon, 7 Jan 2008 08:47:16 -0700

Vinay Prabhu <mailto:email@hidden> wrote (Monday, January 7, 2008 11:11 PM +0530):

In my application, I am constructing the NSBezierPath based on the
mouse click points on the NSImageView. I am using the method
"[NSBezierPath bezierPath]", for creating the NSBezierPath.

But, while running application, I am getting the console message
saying, "+[NSBezierPath bezierPath] unrecognized selector sent to
class 0xa0315180". and "-[NSBezierPath _deviceMoveToPoint]
unrecognized selector sent to class 0xa0315180".

Any help would be greatly appreciated in understanding these messages.

Any specific reasons, why application throwing console logs for
"[NSBezierPath bezierPath]". Which is the designated initializer for
NSBezierPath object.

You probably have an over-release issue. My guess is that you're not retaining the NSBezierPath returned by the convenience constructor and it's getting released. Eventually that memory location gets replaced with another object and the stale pointer to the (now replaced) NSBezierPath objects sends the new object a message. The new object doesn't accept that message and this is the result.


First, I'd review your code to make sure that NSBizerPath is being retained for the lifetime of the reference to it. An open manhole that I'm always walking into is in subclasses of NSCell. NSCells get copied (a lot!). If you subclass it -- and the subclass has object references -- you *must* implement the necessary copy methods or the copies will contain under-retained object references.

If you can't find your problem with a casual review, check out NSZombies (famous tech note #2124 <http://developer.apple.com/technotes/tn2004/tn2124.html>). That will at least confirm the problem. To see where it's actually getting retained and released, run your application using ObjectAlloc (Tiger) or using the ObjectAlloc instrument in Instruments (Leopard).

See <http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/ManagingMemory.html> for a general discussion, tips for finding problems, and on using ObjectAlloc.


-- James Bucanek

_______________________________________________

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: Error executing instruction "[NSBezierPath bezierPath]"
      • From: Vinay Prabhu <email@hidden>
    • Re: Error executing instruction "[NSBezierPath bezierPath]"
      • From: James Bucanek <email@hidden>
References: 
 >Error executing instruction "[NSBezierPath bezierPath]" (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: Re: Open record in Address Book
  • Next by Date: QTCaptureView retain count problem and setting iSight's focus (macro)
  • Previous by thread: Error executing instruction "[NSBezierPath bezierPath]"
  • Next by thread: Re: Error executing instruction "[NSBezierPath bezierPath]"
  • Index(es):
    • Date
    • Thread