Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSCFArray problems

NSCFArray problems
Thread Tools
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
May 19, 2003, 10:53 PM
 
I'm writing a fairly simple Obj-C/Cocoa program for my physics class, and under certain situations it will give me this error (in the PB console thingy)

2003-05-19 20:43:41.108 Planets[19425] *** NSTimer ignoring exception 'NSRangeException' (reason '*** -[NSCFArray objectAtIndex:]: index (2147483647) beyond bounds (11)') that raised during posting of timer with target 19e610 and selector 'tick:'

In my searches for this error, I found that NetNewsWire had almost the exact same error (the array part of it anyway. It even had the same index), but no info was given on possible causes/solutions.

Any help would be appreciated, and I'll be happy to provide more info or source code.
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 19, 2003, 11:16 PM
 
I'm not sure what's causing the error (though I'd guess a pointer being passed instead of a value), but the significance of that number is that it's INT_MAX.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
May 20, 2003, 02:41 AM
 
In the PB console, you can type
br -[NSException raise]
to drop into the debugger whenever an exception is raised. You can then look at the stack trace to see where in your code the problem is.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
May 20, 2003, 10:20 AM
 
Originally posted by smeger:
In the PB console, you can type
br -[NSException raise]
to drop into the debugger whenever an exception is raised. You can then look at the stack trace to see where in your code the problem is.
Thanks! I've been trying to figure out how to do that for ages now. I'll try that when I get home today.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
May 21, 2003, 10:35 AM
 
Scratch one crasher. Thanks guys.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:34 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2