• 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
Funky Xcode crashing-my-app behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Funky Xcode crashing-my-app behavior


  • Subject: Funky Xcode crashing-my-app behavior
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 6 Aug 2008 15:01:03 -0600

Ok, strange subject line, I know; I'm not sure really how to phrase it.

I have a menu item "Batch Edit", whose sent action is "batchEdit:", to First Responder. I have "batchEdit:" defined in a window controller.

"All of a sudden"* when I select that menu item (I get a slightly different stack trace depending on whether I select it using the mouse or command key, but the top 16 [0-15] entries in the stack trace remain the same either way), "batchEdit:" is called, and a breakpoint on the first line is hit. The first line is NSLog(@"entering batchEdit:");. By the time that BP is hit, this is printed in the console window:

2008-08-06 14:43:28.378 Assets Manager[3332:817] *** -[NSApplication length]: unrecognized selector sent to instance 0x114a70

When I stop over the NSLog call, I end up with this crash (I have BPs set on [NSException raise] and objc_exception_throw):

#0 0x97213c66 in -[NSException raise]
#1 0x00072f2a in -[NSExceptionHandler _handleException:mask:]
#2 0x000731c8 in NSExceptionHandlerExceptionRaiser
#3 0x943c00fb in objc_exception_throw
#4 0x9721b34a in -[NSObject doesNotRecognizeSelector:]
#5 0x9721994c in ___forwarding___
#6 0x97219a12 in __forwarding_prep_0___
#7 0x971b1b57 in CFStringGetLength
#8 0x971bc7cf in CFStringCompareWithOptionsAndLocale
#9 0x9614dc06 in -[NSString compare:options:range:]
#10 0x9616c380 in -[NSString compare:]
#11 0x92feb0b1 in -[NSMenu indexOfItemWithTitle:]
#12 0x00002b30 in <function called from gdb>
#13 0x930bdc23 in -[NSApplication sendAction:to:from:]
#14 0x9316c660 in -[NSMenu performActionForItemAtIndex:]
#15 0x9316c365 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
#16 0x9316bfeb in -[NSMenu performKeyEquivalent:]
#17 0x9316a890 in -[NSApplication _handleKeyEquivalent:]
#18 0x93087853 in -[NSApplication sendEvent:]
#19 0x92fe4e27 in -[NSApplication run]
#20 0x92fb2030 in NSApplicationMain
#21 0x00004797 in main at main.m:13


Notice that "batchEdit:" is no longer in the stack trace. Where'd it go? (It's not shown in any of the (2) threads in the debugger.) And what is that #12 <function called from gdb>? Why is gdb calling [NSMenu indexOfItemWithTitle:]? There is NOT a breakpoint action set.

The log message is NOT printed in the console.

This is a Debug configuration, optimization = -O0 (none). Clean build. I've restarted Xcode, and the machine, even reverted the project file, but yet the problem persists.

*Yes, I know *something* must have changed, but dang if I can figure out what. Any ideas of what to look for?

Thanks.
randy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Funky Xcode crashing-my-app behavior
      • From: Jim Ingham <email@hidden>
    • Re: Funky Xcode crashing-my-app behavior
      • From: Randall Meadows <email@hidden>
  • Prev by Date: Apple assistance with implementation of Boost library Framework
  • Next by Date: Re: Funky Xcode crashing-my-app behavior
  • Previous by thread: Apple assistance with implementation of Boost library Framework
  • Next by thread: Re: Funky Xcode crashing-my-app behavior
  • Index(es):
    • Date
    • Thread