• 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: Strange crash while loading nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange crash while loading nib


  • Subject: Re: Strange crash while loading nib
  • From: Markus Spoettl <email@hidden>
  • Date: Sun, 09 Sep 2012 12:25:01 +0200

On 9/9/12 8:41 AM, Graham Cox wrote:
On 09/09/2012, at 4:25 PM, Markus Spoettl <email@hidden
<mailto:email@hidden>> wrote:

4   -[NSArrayController didChangeValuesForArrangedKeys:objectKeys:indexKeys:]
5   -[NSArrayController initWithCoder:]


This suggests that initWithCoder: is setting a property in a manner such as
self.whatever = foo; Which triggers the KVO messaging. If possible, just set the
ivar directly to avoid that. Things at this stage are often in an indeterminate
state and the object graph is incomplete, leading to odd bugs. Alternatively,
make sure nothing is trying to observe the object before everything is
completely unarchived.

Thanks for the reply, unfortunately I'm not sure I follow.

The NIB contains a custom view but that (it implements -initWithCoder:) doesn't set any of its properties that way. It basically just calls -setLayer: and -setWantsLayer: to make it layer hosting. Nothing that gets observed by an NSArrayController anywhere in within this view's controller (or outside), though. Not at the time of view initialization. The view controller's -awakeFromNib does set up a binding from from the custom view to the NSArrayController. But at that time, the view has been full loaded, no? When the crash happens, it doesn't appear to get that far.

As I said, likely I'm not getting what you're trying to tell me.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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: 
 >Strange crash while loading nib (From: Markus Spoettl <email@hidden>)
 >Re: Strange crash while loading nib (From: Graham Cox <email@hidden>)

  • Prev by Date: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?
  • Next by Date: Re: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?
  • Previous by thread: Re: Strange crash while loading nib
  • Next by thread: KVO Question: How to programmatically determine if one object is observing another on a keyPath and context?
  • Index(es):
    • Date
    • Thread