Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-09 Thread Sean McBride
On Thu, 9 Sep 2010 13:37:01 -0700, Mark Ritchie said:

>On 9/Sep/2010, at 1:27 PM, John C. Randolph wrote:
>> This was covered in a couple of WWDC talks.  Look for the sessions on
>debugging.
>
>And it was covered on this list last week: ;-)
>http://lists.apple.com/archives/cocoa-dev/2010/Sep/msg00103.html

Yeah, sorry about that.  The question was asked in a different thread,
and no one answered, so I did.  I discovered later that someone renamed
the thread/created a new one and that there were answers there.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-09 Thread Mark Ritchie
On 9/Sep/2010, at 1:27 PM, John C. Randolph wrote:
> This was covered in a couple of WWDC talks.  Look for the sessions on 
> debugging.

And it was covered on this list last week: ;-)
http://lists.apple.com/archives/cocoa-dev/2010/Sep/msg00103.html
M.

___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-09 Thread John C. Randolph
This was covered in a couple of WWDC talks.  Look for the sessions on debugging.

-jcr

On Sep 9, 2010, at 12:23 PM, Sean McBride wrote:

> On Fri, 3 Sep 2010 19:52:54 -0700, Jerry Krinock said:
> 
>> http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html >
>> "Architecture Considerations"
> 
> Sadly this awesome technote has not been updated in 3 years.  We should
> all file bugs. :)
> 
>> But there's a problem.  I see you've got a 64-bit machine.  The first
>> article says that "64-bit Intel restores sanity to the equation by
>> passing arguments in registers", but he doesn't say which registers, and
>> neither does the Apple Technical Note.
>> 
>> I'm going to have to get a 64-bit Mac one of these days.  Does anyone
>> know the register mapping for Intel 64?
> 
> Forgot where I got this (ie credit not mine), but:
> 
> given:
> -(id)method:(id)arg2 bar:(id)arg3 baz:(id)arg4
> 
>ppc/ppc64:  x86_64: i386:
> arg0 (self) $r3 $rdi*(id*)($ebp + 8)
> arg1 (_cmd) $r4 $rsi*(SEL*)($ebp + 12)
> arg2$r5 $rdx*(id*)($ebp + 16)
> arg3$r6 $rcx*(id*)($ebp + 20)
> arg4$r7 $r8 ?
> arg5$r8 $r9 ?
> 
> --
> 
> Sean McBride, B. Eng s...@rogue-research.com
> Rogue Researchwww.rogue-research.com
> Mac Software Developer  Montréal, Québec, Canada
> 
> 
> ___
> 
> 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/jcr%40mac.com
> 
> This email sent to j...@mac.com

___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-09 Thread Sean McBride
On Fri, 3 Sep 2010 19:52:54 -0700, Jerry Krinock said:

>http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html >
>"Architecture Considerations"

Sadly this awesome technote has not been updated in 3 years.  We should
all file bugs. :)

>But there's a problem.  I see you've got a 64-bit machine.  The first
>article says that "64-bit Intel restores sanity to the equation by
>passing arguments in registers", but he doesn't say which registers, and
>neither does the Apple Technical Note.
>
>I'm going to have to get a 64-bit Mac one of these days.  Does anyone
>know the register mapping for Intel 64?

Forgot where I got this (ie credit not mine), but:

given:
-(id)method:(id)arg2 bar:(id)arg3 baz:(id)arg4

ppc/ppc64:  x86_64: i386:
arg0 (self) $r3 $rdi*(id*)($ebp + 8)
arg1 (_cmd) $r4 $rsi*(SEL*)($ebp + 12)
arg2$r5 $rdx*(id*)($ebp + 16)
arg3$r6 $rcx*(id*)($ebp + 20)
arg4$r7 $r8 ?
arg5$r8 $r9 ?

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Gideon King
Brilliant! Found the problem and fixed it. The issue was that I was not 
registering the inverse of a relationship in a cache node for my atomic store. 
I was able to track it down by going to the 
maintainInverseRelationship:forProperty:oldDestination:newDestination: method 
call in the stack, and finding the entity in register 12. 

One line of code and it's fixed.

Thanks again for your help Jerry.

On 04/09/2010, at 1:56 PM, Jerry Krinock wrote:

> -isTemporaryID is implemented in NSManagedObjectID, not NSManagedObject.  I 
> presume that your NMTopicMapViewMO inherits from NSManagedObject.
> 
> If you can't find any place in your code where you might be sending 
> -isTemporaryID to a NMTopicMapViewMO, then of course it might be that when 
> the managed object ID goes away, it gets replaced in memory by a 
> NMTopicMapViewMO.  You could do the MallocScribble thing, but time would 
> probably be better spent looking at your code.
> 
> Or look further down in that call stack to see how this started.  Do any of 
> those Apple methods mention anything about a relationship delete rule being 
> fulfilled?
> 
___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Jerry Krinock
-isTemporaryID is implemented in NSManagedObjectID, not NSManagedObject.  I 
presume that your NMTopicMapViewMO inherits from NSManagedObject.

If you can't find any place in your code where you might be sending 
-isTemporaryID to a NMTopicMapViewMO, then of course it might be that when the 
managed object ID goes away, it gets replaced in memory by a NMTopicMapViewMO.  
You could do the MallocScribble thing, but time would probably be better spent 
looking at your code.

Or look further down in that call stack to see how this started.  Do any of 
those Apple methods mention anything about a relationship delete rule being 
fulfilled?

___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Gideon King
Thanks Jerry

If I do a PO on the object that it says the message is being sent to, it shows 
the object that I deleted:

2010-09-04 13:16:35.818 NovaMind5TP[39867:a0f] -[NMTopicMapViewMO 
isTemporaryID]: unrecognized selector sent to instance 0x1046f51c0

(gdb) po 0x1046f51c0
 (entity: TopicMapView; id: 0x114cbf6b0 

 ; data: {
...

Those look like really useful resources you sent the links to, but I don't 
completely understand how to make use of them for this purpose, and on I64. 
Here's the register info:

(gdb) info reg
rax0x121eb1b00  4864023296
rbx0x1046f51c0  4369371584
rcx0x7fe00080   140737486258304
rdx0x1011592f8  4313158392
rsi0x121eb1b00  4864023296
rdi0x121eb1b00  4864023296
rbp0x7fff5fbfcc40   0x7fff5fbfcc40
rsp0x7fff5fbfcc20   0x7fff5fbfcc20
r8 0x0  0
r9 0x121efc0a4  4864327844
r100x7fff8356d690   140735396894352
r110x121eb1da0  4864023968
r120x121eb13f0  4864021488
r130x7fff70514930   140735077763376
r140x0  0
r150x1046f51c0  4369371584
rip0x7fff874570da   0x7fff874570da 
eflags 0x202514
cs 0x27 39
ss 0x0  0
ds 0x0  0
es 0x0  0
fs 0x0  0
gs 0x0  0

Then printing each of the registers, the following are the only ones that came 
up with anything interesting:

(gdb) po $rax
-[NMTopicMapViewMO isTemporaryID]: unrecognized selector sent to instance 
0x1046f51c0
(gdb) po $rbx
 (entity: TopicMapView; id: 0x114cbf6b0 

 ; data: {
...
})
(gdb) po $rsi
-[NMTopicMapViewMO isTemporaryID]: unrecognized selector sent to instance 
0x1046f51c0
(gdb) po $rdi
-[NMTopicMapViewMO isTemporaryID]: unrecognized selector sent to instance 
0x1046f51c0
(gdb) po $r12
-[NMTopicMapViewMO isTemporaryID]
(gdb) po $r13
%@: unrecognized selector sent to instance %p
(gdb) po $r14
0x0 does not appear to point to a valid object.
(gdb) po $r15
 (entity: TopicMapView; id: 0x114cbf6b0 

 ; data: {
...})

Does any of that help?


Regards

Gideon

> ...
> Because it says that it's being sent to some generic NSObject, not your 
> custom object, not even an NSManagedObject.
> 
> Click on line #1 in the debugger.  Then, print that object in gdb.  It is the 
> first parameter (self) to the method.  The procedure is explained here:
> 

___

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 arch...@mail-archive.com


Re: isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Jerry Krinock

On 2010 Sep 03, at 18:43, Gideon King wrote:

> Hi, I have a custom NSManagedObject subclass that I am having a problem with. 
> When I delete the object, I get the "isTemporaryID unrecognized selector sent 
> to instance" message being sent to the object being deleted

I'm not quite sure of that.

> #0  0x7fff874570da in objc_exception_throw ()
> #1  0x7fff83622140 in -[NSObject(NSObject) doesNotRecognizeSelector:]

Because it says that it's being sent to some generic NSObject, not your custom 
object, not even an NSManagedObject.

Click on line #1 in the debugger.  Then, print that object in gdb.  It is the 
first parameter (self) to the method.  The procedure is explained here:

http://www.cocoadev.com/index.pl?DebuggingTechniques > "Assembly Code"

And here:
http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html > 
"Architecture Considerations"

But there's a problem.  I see you've got a 64-bit machine.  The first article 
says that "64-bit Intel restores sanity to the equation by passing arguments in 
registers", but he doesn't say which registers, and neither does the Apple 
Technical Note.

I'm going to have to get a 64-bit Mac one of these days.  Does anyone know the 
register mapping for Intel 64?

Jerry

___

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 arch...@mail-archive.com


isTemporaryID unrecognized selector - how do I debug this?

2010-09-03 Thread Gideon King
Hi, I have a custom NSManagedObject subclass that I am having a problem with. 
When I delete the object, I get the "isTemporaryID unrecognized selector sent 
to instance" message being sent to the object being deleted - but ONLY if the 
object has been loaded from a file. If I have created it and then delete it 
while the file is still open (either a new file or a file I have loaded), then 
it works fine, but for objects that were there when I loaded the file, it 
crashes with this exception.

I suspect it may have something to do with some relationship not being loaded 
properly or something, but this particular entity has 12 relationships off it, 
so am not sure what to look for or even whether it could be related to 
relationships, or something else entirely. Unfortunately the error message 
doesn't have any additional information.

#0  0x7fff874570da in objc_exception_throw ()
#1  0x7fff83622140 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#2  0x7fff8359acdf in ___forwarding___ ()
#3  0x7fff83596e28 in __forwarding_prep_0___ ()
#4  0x7fff850bd341 in getValueCore ()
#5  0x7fff850bd2e4 in _PFCMT_GetValue ()
#6  0x7fff850bd22d in -[NSManagedObjectContext(_NSInternalAdditions) 
_retainedObjectWithID:optionalHandler:withInlineStorage:] ()
#7  0x7fff850bfedd in _PF_FulfillDeferredFault ()
#8  0x7fff850de431 in _PF_Handler_WillAccess_Property ()
#9  0x7fff850de2a5 in _PF_ManagedObject_WillChangeValueForKeyIndex ()
#10 0x7fff850de242 in _sharedIMPL_setvfk_core ()
#11 0x7fff850c9638 in 
-[NSManagedObject(_PFDynamicAccessorsAndPropertySupport) 
_setGenericValue:forKey:withIndex:flags:] ()

Where do I look for the cause of this error, or how do I get more information 
about what is going on?

Thanks

Gideon


___

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 arch...@mail-archive.com


Re: How do I debug this? [SOLVED]

2008-10-10 Thread Graham Cox
Thanks to everyone who responded - I found the problem. Though I had  
breakpoints set on [NSException raise], by the time the breakpoint was  
hit there was nothing on the stack trace from my code. Breaking on  
objc_exception_throw didn't work either (that's called even later).  
However by temporarily adding try/catch around the code that I  
suspected contained the fault allowed me to stop in the catch block  
which had a stack trace that revealed the problem.


Curiously, it turned out one of my earlier 'hunches' was right on the  
money.


I'm a bit mystified why the stack trace wasn't showing up in the first  
case, it otherwise works fine AFAICS. Anyhoo, this one's fixed.


thanks, Graham


On 11 Oct 2008, at 12:36 am, Ashley Clark wrote:


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 0x4e73 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 0x2220 in main at main.m:13


--
Ashley Clark



___

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]


Re: How do I debug this?

2008-10-10 Thread Ashley Clark
> Stack trace:
>
> #00x92badc66 in -[NSException raise]
> #10x901c3283 in -[NSCarbonMenuImpl
> performActionWithHighlightingForItemAtIndex:]
> #20x901a0122 in AppKitMenuEventHandler
> #30x90c79303 in DispatchEventToHandlers
> #40x90c7873d in SendEventToEventTargetInternal
> #50x90c95092 in SendEventToEventTarget
> #60x90cc931d in SendHICommandEvent
> #70x90cefb6f in SendMenuCommandWithContextAndModifiers
> #80x90cefb2c in SendMenuItemSelectedEvent
> #90x90cefa3e 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   0x4e73 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 0x2220 in main at main.m:13


-- 
Ashley Clark

___

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]


Re: How do I debug this?

2008-10-10 Thread Jens Miltner


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 0x4e73 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]


How do I debug this?

2008-10-09 Thread 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 0x4e73 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.


tia,

Graham
___

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]