• 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: Crash when using Command-Q
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash when using Command-Q


  • Subject: Re: Crash when using Command-Q
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 02 Mar 2005 12:40:05 -0600

On Wednesday, March 02, 2005, at 12:33PM, Ricky Sharp <email@hidden> wrote:

>
>On Wednesday, March 02, 2005, at 12:24PM, John Stiles <email@hidden> wrote:
>
>>This looks like a double-release of some kind. Try turning on
>>NSZombieEnabled.
>>http://www.cocoadev.com/index.pl?NSZombieEnabled
>
>Thanks for the reminder about that flag.  I do have that set up in my Xcode project but I was not running the app via Xcode earlier.
>
>Now that I'm not being braindead and running via Xcode once more, it is indeed a double-release problem.  My IIContentWindow (subclass of NSWindow) is being released twice.  But, only when invoking Command-Q to initiate the quit.
>
>The window is created programatically (i.e. doesn't live in a nib).  At least now I can set breakpoints and know which entity to look at.


Thanks again John for that reminder.  I was able to debug this in a snap.

Basically, the problem was that my window had its "release when closed" flag set to YES (this is default for all windows).  And since I do not use any window controller for this window, that flag is not ignored.  For some reason, invoking Command-Q ultimately sent a close message to my window.

Since I manually release my windows (content and blanking), I just set that flag to NO (using setReleasedWhenClosed:) in my window's init method.  All is now well.

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Crash when using Command-Q (From: Ricky Sharp <email@hidden>)
 >Re: Crash when using Command-Q (From: John Stiles <email@hidden>)
 >Re: Crash when using Command-Q (From: Ricky Sharp <email@hidden>)

  • Prev by Date: I can I read a dBase file from an Obj-C/Cocoa project?
  • Next by Date: Re: LaunchServices: LSFindApplicationForInfo worse results in 10.3 than in 10.1?
  • Previous by thread: Re: Crash when using Command-Q
  • Next by thread: LaunchServices: LSFindApplicationForInfo worse results in 10.3 than in 10.1?
  • Index(es):
    • Date
    • Thread