• 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: How do I debug this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I debug this?


  • Subject: Re: How do I debug this?
  • From: "Ashley Clark" <email@hidden>
  • Date: Fri, 10 Oct 2008 08:36:43 -0500 (CDT)
  • Importance: Normal

> Stack trace:
>
> #0	0x92badc66 in -[NSException raise]
> #1	0x901c3283 in -[NSCarbonMenuImpl
> performActionWithHighlightingForItemAtIndex:]
> #2	0x901a0122 in AppKitMenuEventHandler
> #3	0x90c79303 in DispatchEventToHandlers
> #4	0x90c7873d in SendEventToEventTargetInternal
> #5	0x90c95092 in SendEventToEventTarget
> #6	0x90cc931d in SendHICommandEvent
> #7	0x90cefb6f in SendMenuCommandWithContextAndModifiers
> #8	0x90cefb2c in SendMenuItemSelectedEvent
> #9	0x90cefa3e in FinishMenuSelection
> #10	0x90ccc5cc in MenuSelectCore
> #11	0x90ccbfb7 in _HandleMenuSelection2
> #12	0x90ccbe2b in _HandleMenuSelection
> #13	0x900dcad3 in _NSHandleCarbonMenuEvent
> #14	0x900438dc in _DPSNextEvent
> #15	0x90042ca0 in -[NSApplication
> nextEventMatchingMask:untilDate:inMode:dequeue:]
> #16	0x9003bcdb in -[NSApplication run]
> #17	0x90008f14 in NSApplicationMain
> #18	0x00004e73 in main at main.m:13
>
> Leading to the message:
>
> 2008-10-10 15:57:59.552 Ortelius[43213:813] *** -[NSCFArray
> objectAtIndex:]: index (0) beyond bounds (0)
>
> How can I find out what array is being overrun here? There's no code
> of my own in the stack trace at this point, which appears to be the
> tail end of a menu selection (which makes sense, as it occurs during
> loading a file in response to the "Open" menu command). So far I've
> just been trying to guess what the problem might be by following
> 'hunches' but so far drawn a blank.


Have you tried setting a breakpoint on objc_exception_throw? That should
show you the moment the exception is being created and should let you know
who's calling the objectAtIndex:0 method.

Just doing a simple test here I get a stack trace that looks like this:

#0	0x96f9ee17 in objc_exception_throw
#1	0x968a1f2b in +[NSException raise:format:arguments:]
#2	0x968a1f6a in +[NSException raise:format:]
#3	0x95587bbf in _NSArrayRaiseBoundException
#4	0x95505548 in -[NSCFArray objectAtIndex:]
#5	0x0001fdb6 in -[JTApplicationDelegate showInventoryInformation:] at
JTApplicationDelegate.m:35
#6	0x95907b03 in -[NSApplication sendAction:to:from:]
#7	0x959b6540 in -[NSMenu performActionForItemAtIndex:]
#8	0x959b6245 in -[NSCarbonMenuImpl
performActionWithHighlightingForItemAtIndex:]
...snip...
#25	0x00002220 in main at main.m:13


--
Ashley Clark

_______________________________________________

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

  • Follow-Ups:
    • Re: How do I debug this? [SOLVED]
      • From: Graham Cox <email@hidden>
References: 
 >How do I debug this? (From: Graham Cox <email@hidden>)

  • Prev by Date: Key filtering in the NSSavePanel?
  • Next by Date: appscript installation
  • Previous by thread: Re: How do I debug this?
  • Next by thread: Re: How do I debug this? [SOLVED]
  • Index(es):
    • Date
    • Thread