NSRangeException is raised when you access a range outside its normal bounds. Range exceptions most commonly occur when looping an array starting at index 1 rather than starting at index 0 as intended.
Questions tagged [nsrangeexception]
130 questions
0
votes
1 answer
NSRangeException error... NSDictionary, NSArray, UISearchBar
I am quite new with Objective C and I have been having trouble a a little while and I have been looking over answers, watching tutorials, and I have not been able to find a solution to my problem. Maybe its right in front of my face and I am not…

GunplaGamer
- 41
- 9
0
votes
3 answers
how to solve NSRangeException
hi i am new to iphone programing,i am using EGOPhotViewer and want to show images by using this code,
for ( recipeImages in recipeImages.imgArray) {
photo = [[MyPhoto alloc] initWithImageURL:[NSURL…

Noor
- 2,071
- 19
- 28
0
votes
2 answers
How to fix UISearchBar returning NSRangeException when clear button is clicked? (FIXED!!!)
I have implemented a UISearchBar in my app that is crashing when I hit the clear button and while there's one item found. It's like I type in some character, the app searches and display 1 item, but I when I clear the search, it crashes.
I searched…

Marco Almeida
- 1,285
- 3
- 17
- 39
0
votes
0 answers
ios - NSRangeException
I get this exception in my Crashalytics:
0 CoreFoundation
__exceptionPreprocess + 162
1 libobjc.A.dylib
objc_exception_throw + 30
2 CoreFoundation
-[NSException initWithCoder:]
3 CoreFoundation
-[__NSCFArray objectAtIndex:] +…

Genadinik
- 18,153
- 63
- 185
- 284
0
votes
2 answers
NSMutableOrderedSet NSRangeException
I am getting a NSRangeException error and I can not find the error in this very basic bit of code. Can someone help correct my blindspot?
uint32_t offsetVal = 0;
int num = 100;
_offsetVals=[[NSMutableOrderedSet alloc]initWithCapacity:num+1];
for…

user216661
- 323
- 3
- 14
0
votes
1 answer
Baffling crash; NSRangeException
Upon completing the loading and displaying of a UITableView which has been correctly populated, my application then crashes and gives this output:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM…

Jace
- 145
- 2
- 11
0
votes
1 answer
'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds for empty array'
i have created a class for downloading music from internet, while i am trying to download the song after the completion of first song download, i got the error
'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds…

Neeraj Neeru
- 570
- 8
- 28
0
votes
1 answer
tableView - sometimes with error, sometimes without - trying to load label in last cell
I am trying to implement a load more method to my last cell. After experimenting I finally could implement the load more (without function yet) to my cell. But it seems to be a bit harder, because I'm loading my content from a XML.
Here is what I…

Blade
- 1,435
- 1
- 14
- 22
0
votes
3 answers
iOS - NSRangeException only when breakpoints are disabled
Recently started developing apps, so excuse my ignorance. I have a tableView, and when a cell in the table view is clicked, I want to insert a new row directly below it. This currently works in my code. However, I also want the row that has been…

CHawk
- 1,346
- 5
- 22
- 40
-1
votes
1 answer
SIGABRT Error From An NSArray Out of Bounds Exception In a Swift App With No NSArrays
I am making an app, and I am doing my first test right now that should just show the basic layout and a little functionality. I have of course found all the compile time and runtime errors that xcode has caught, and I assume there are at least a…

Liam Keeley
- 187
- 1
- 10
-1
votes
2 answers
how do i solve NSRangeException into swift 4?
I am working on app where I using swift 4. But when I want to go from first viewcontroller to second viewcontroller I got this error
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayI objectAtIndex:]: index…

mab
- 225
- 3
- 10
-1
votes
1 answer
NSRangeException Xcode
I'm having a problem with my app and CoreData. I am using CoreData to save the user information and I have spent a long time searching how to use core data correctly. I have found and I learned how to use, but the problem have started when I deleted…

David Sousa
- 43
- 5
-1
votes
4 answers
Removing object of NSMutableArray returns exception after row deleting
Here is my problem :
I have an NSMutableArray *notes and which the source of my UITableView* _gradesTV.
I added the method - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle…

H. Wolber
- 23
- 1
- 7
-1
votes
1 answer
NSRangeException index 1 beyond bounds [0 .. 0] for non-empty array
Context: I'm currently on Assignment 2 for Stanford's most recent cs193p course on iTunes U. I'm trying to avoid simply looking up the solutions, but I'm stuck.
Problem: For the following code:
for (Card *c in self.chosenCards) { // for debugging…

theRenaissanceMan
- 61
- 1
- 1
- 9
-1
votes
1 answer
Uncaught exception - NSRangeException
I've been trying to sort out this error I keep getting with NSArray and NSMutableDictionary. It keeps giving me this error:
ERROR:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex(inlove):…

YaBCK
- 2,949
- 4
- 32
- 61