Am 10.10.2008 um 07:13 schrieb Graham Cox:

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.

If you know which menu item to call and what part of your code is being called that eventually leads to raise that exception, you could break somewhere in your code, then add a breakpoint for -[NSCFArray objectAtIndex:] and run and note who calls this until the exception is raised (the exception logging feature might help here).

Apart from that, are you sure it's not -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] that is calling - [NSArray objectAtIndex:] with an invalid index? Not sure why that would happen, but from the backtrace, this too might be what's happening...

HTH,
-jens

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to