Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-30 Thread Lee Ann Rucker
On Jul 29, 2013, at 10:43 PM, Quincey Morris wrote: > On Jul 29, 2013, at 22:05 , Lee Ann Rucker wrote: > >> The repro case is to close the document and then reopen it. It doesn't >> reopen the windows, it makes a new window of the same class as the old one. >> Looking at Instruments right no

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 22:05 , Lee Ann Rucker wrote: > The repro case is to close the document and then reopen it. It doesn't reopen > the windows, it makes a new window of the same class as the old one. Looking > at Instruments right now I have one new window and windowController - stopped > in

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 9:22 PM, Quincey Morris wrote: > On Jul 29, 2013, at 21:03 , Lee Ann Rucker wrote: > >> The main thread got stopped shortly after the first call to [wc window] - >> not in any restorable value's setter, though; that would've been obvious - >> but the actual crash was in a

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Eric Wing
> There are a couple of interesting points here. Perhaps the appearance of > 'probeGC' in Eric's backtrace suggests he's using garbage collection. Are > you doing so too? If not, then it wouldn't be surprising that the crash is > more reproducible for you. Eric was racing garbage collection for a z

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 9:03 PM, Lee Ann Rucker wrote: > > Never considered clearing the windowController; what effect would that have > on the window? Well, it didn't do away with the crash. The doc does say that encodeRestorableStateWithCoder will be called "at appropriate times", and I have e

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 21:03 , Lee Ann Rucker wrote: > The main thread got stopped shortly after the first call to [wc window] - not > in any restorable value's setter, though; that would've been obvious - but > the actual crash was in a different thread. It's definitely at a point where > one or

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 8:14 PM, Quincey Morris wrote: > On Jul 29, 2013, at 19:33 , Lee Ann Rucker wrote: > >> I've just hit this too, and my best guess as to why it's so reproducible for >> me but this is the *only* mention that Google can find is that my window >> does trigger updates to one o

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 19:33 , Lee Ann Rucker wrote: > I've just hit this too, and my best guess as to why it's so reproducible for > me but this is the *only* mention that Google can find is that my window does > trigger updates to one of its restorable values early in its lifetime. > Unfortunat

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
I've just hit this too, and my best guess as to why it's so reproducible for me but this is the *only* mention that Google can find is that my window does trigger updates to one of its restorable values early in its lifetime. Unfortunately that's unavoidable. I just gave up and dropped the rest

Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2012-08-24 Thread Eric Wing
I am struggling with a crash when implementing restorableStateKeyPaths in my NSWindowController for my main window in my app. I discovered that I needed to save out the window frame before I entered fullscreen so when the user exits fullscreen, I can go back to the original value. For this, I add