• 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: NSCell copyWithZone producing EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCell copyWithZone producing EXC_BAD_ACCESS


  • Subject: Re: NSCell copyWithZone producing EXC_BAD_ACCESS
  • From: Graham <email@hidden>
  • Date: Mon, 12 Nov 2007 08:57:19 -0500

Thanks Ricky, that was it.

As you can tell, I'm still a bit of a newbie at OCJ-C, and yes, how on earth has this been working for over a year pre-Leopard??

On Nov 11, 2007, at 4:51 PM, Ricky Sharp wrote:


On Nov 11, 2007, at 3:21 PM, Graham wrote:

My application worked without problems in Tiger but crashes in Leopard as follows...

I am using an NSBrowser for which I am supplying a custom cell class called SelectionCell (inherits from NSBrowserCell).
I set the prototype in the browser's matrix as follows:


[matrix setPrototype:[SelectionCell alloc]];

You're not calling an init method here.

and this is where I get the crash, with the following stack trace:

#0 0x9006c9a7 in -[NSCell copyWithZone:]
#1 0x9025da12 in -[NSMatrix setPrototype:]
#2 0x00008074 in -[BrowserDelegate browser:createRowsForColumn:inMatrix:] at BrowserDelegate.m:262
#3 0x903fc24c in -[NSBrowser _sendDelegateCreateRowsForColumn:inMatrix:]
#4 0x902724b7 in -[NSBrowser addColumn]
#5 0x90271725 in -[NSBrowser loadColumnZero]
#6 0x000056a0 in -[Controller startup] at Controller.m:417
#7 0x000041f9 in -[Controller getToken] at Controller.m:236
#8 0x000046ed in -[Controller carryOn:] at Controller.m:280
#9 0x90114f94 in -[NSApplication sendAction:to:from:]
#10 0x90114ed4 in -[NSControl sendAction:to:]
#11 0x90114d5a in -[NSCell _sendActionFrom:]
#12 0x901143bb in -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
#13 0x90113c12 in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]
#14 0x901134cc in -[NSControl mouseDown:]
#15 0x90111d9b in -[NSWindow sendEvent:]
#16 0x900dea2c in -[NSApplication sendEvent:]
#17 0x9003c705 in -[NSApplication run]
#18 0x900099ba in NSApplicationMain
#19 0x00002638 in main at main.m:6


BTW, I'm quite surprised this didn't cause an issue under Tiger.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com


_______________________________________________

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


References: 
 >NSCell copyWithZone producing EXC_BAD_ACCESS (From: Graham <email@hidden>)
 >Re: NSCell copyWithZone producing EXC_BAD_ACCESS (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Accessibility API - moving and resizing windows (in one API call)
  • Next by Date: How to archive structs like NSRect
  • Previous by thread: Re: NSCell copyWithZone producing EXC_BAD_ACCESS
  • Next by thread: NSRunStorage and _NSBlockNumberForIndex exceptions...
  • Index(es):
    • Date
    • Thread