• 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
Menu Cmd_Key Weirdness (crashing)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Menu Cmd_Key Weirdness (crashing)


  • Subject: Menu Cmd_Key Weirdness (crashing)
  • From: Robert Martin <email@hidden>
  • Date: Sat, 14 Feb 2004 18:24:12 -0500

My app uses the document framework. I have an app delegate, and separate window controllers that are attatched to the doc when they're loaded.

After I close a document, all the menus do the right thing (Open etc) if I click on them.
But, if I use the commandKey equivalents the app immediately crashes. (I don't directly touch the responder chain anywhere)

The crash log always shows:

Thread 0 Crashed:
0 libobjc.A.dylib 0x90831244 objc_msgSend + 0x24
1 com.apple.AppKit 0x92ed6f88 -[NSApplication _handleKeyEquivalent:] + 0xa8
2 com.apple.AppKit 0x92df4a38 -[NSApplication sendEvent:] + 0xa5c

I sometimes (but not always) see a gdb msg * [NSCFString window] selector not recognized* when I use the commandKey equivalents.

Why is the app sending a window message to a string? Who or what is NSApp trying to hand the key event off to after all the document's windows have been closed? (everything works fine if I don't close a document.)

I've checked all the deallocs for the doc and its windows, and everything seems to be being released. Window Controllers are removed from the doc before I release them.

I've checked that my doc's windows really are released by looking at NSApp's window array in my doc's init method after closing one, and then opening another with a menu click. I did notice that NSApp has several 'unnamed' windows in its list the second time around - I suspect they're to do with the save and open panels.

Where should I be looking, and what should I be looking for?

Thanks, Rob
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSImage and flipping
  • Next by Date: Help Book in XCode
  • Previous by thread: Re: To-Many editor using NSArrayControllers
  • Next by thread: Help Book in XCode
  • Index(es):
    • Date
    • Thread