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

NSCell copyWithZone producing EXC_BAD_ACCESS


  • Subject: NSCell copyWithZone producing EXC_BAD_ACCESS
  • From: Graham <email@hidden>
  • Date: Sun, 11 Nov 2007 16:21:38 -0500

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]];

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


The setPrototype immediately causes the copyWithZone message to the underlying NSCell and this causes a EXC_BAD_ACCESS signal for some reason.

Any ideas as to the problem would be appreciated.
_______________________________________________

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: NSCell copyWithZone producing EXC_BAD_ACCESS
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: No WebKit headers with Safari 3?
  • Next by Date: NSRunStorage and _NSBlockNumberForIndex exceptions...
  • Previous by thread: No WebKit headers with Safari 3?
  • Next by thread: Re: NSCell copyWithZone producing EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread