exc-bad-access

NSThread called second time (after first didn't finish) get "EXC_BAD_ACCESS"

Hello I have a cover flow and it has 3 different image sets. One of them needs to be generated and I have been trying to get it populated with a thread for larger selections of images. Here is a bit of my code: - (void) startSongThread { [NSThread detachNewThreadSelector:@selector(songThreadMain) toTarget:self withObject:nil]; ...

UIScrollView EXC_BAD_ACCESS crash in iOS SDK

I have an iPhone SDK application that has several views that appear and disappear as the user creates content. After using the application on a device for a while, I get the following crash: Program received signal: “EXC_BAD_ACCESS”. (gdb) backtrace #0 0x33369ebc in objc_msgSend () #1 0x320e5248 in -[UIScrollView(UIScrollViewInterna...

iphone : random EXC_BAD_ACCESS with NSURLConnection

Hi guys. I sometimes get crash reports about an EXC_BAD_ACCESS with NSURLConnection (i guess it's about NSURLConnection according to crash reports). I found a question here on StackOverflow with the same kind of report but nothing helped there :/ (http://stackoverflow.com/questions/3111051/nsurlconnection-causes-bad-access-crash); i tr...

iPhone - Problem switching scenes in cocos2d (EXC_BAD_ACCESS)

My AppDelegate makes the following call to start my game scene: [[CCDirector sharedDirector] replaceScene: [HelloWorld sceneWithResponseDelegate:self]]; When the scene is finished it adds a MenuLayer (which is a singleton): MenuLayer *menu = [MenuLayer layerWithLevel:@"forest" score:score responseDelegate:mainMenu]; [[[CCDirector sha...

Random malloc crashes in stringByReplacingOccurrencesOfString

Hi, I am getting random malloc crashes in stringByReplacingOccurrencesOfString. I've noticed that it crashes on longer strings, but I can't seem to find why. What could be the problem? The error: CashTrader(53448,0xb0103000) malloc: *** error for object 0x5c5eca0: incorrect checksum for freed object - object was probably modified afte...

Unpredictable EXC_BAD_ACCESS and objc_msgSend_vtable5

Hello, I was testing my application and suddenly it had EXC_BAD_ACCESS. Now this has become a semi-regular thing, happening on some builds and not others. It also spits out lots of errors in the debugger such as objc_msgSend_vtable5 What could cause such a weird issue like this? ...

Repeated call of push for UINavigationController causes access error

I have a TabView application with a tab that has a NavView as one of it's views. This view has a sub view with a TableView to hold events. I've enabled the "Add" button on the top right of the nav bar and assigned the IBAction to the button. The objective is to show a page to add a new event which is defined by a NIB file loaded whe...

Weird EXC_BAD_ACCESS, what am I doing wrong?

Hi, I have a UITabBarController. One of the tab shows application "bookmarks", these bookmarks are basicly search types saved to a Core Data (SQLLite) database. When I load my application, go to the bookmark view (bookmarksViewController), it loads a function in my appDelegate (getBookmarks) and shows the result in an table. This work...

MKReverseGeocoder causing EXC_BAD_ACCESS?

I have an app that is exhibiting an intermittent crash. The crash logs are showing a stack trace that is tough for me to decipher, so hoping that someone else has seen this and can point me in the right direction. Basically the app does a reverse geocoding request at startup to show the user's location in a label. Additionally, I do a...

Printing userInfo of an NSError from Core Data throws EXC_BAD_ALLOC

I'm using this code (from http://stackoverflow.com/questions/1283960/iphone-core-data-unresolved-error-while-saving/1297157#1297157) to print a more detailed description of an NSError object: - (NSString*)debugDescription { NSMutableArray* errorLines = [NSMutableArray array]; [errorLines addObject:[NSString stringWithFormat:@"Faile...

Bad access while parsing with NSXMLParser

I use following code for parsing: //init parser with readStr NSData* xmlData = [stringToParse dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSXMLParser* xmlParser = [[NSXMLParser alloc] initWithData:xmlData]; //parse with events [xmlParser setDelegate:self]; [xmlParser parse];//<<<< BAD ACC...

Zombie Messaged In For Loop

I have an ivar, keys which is an NSMutableArray containing 50 strings. When my view loads, i am getting a zombie messaged error in Instruments, and it is directing me to this line of code: for (int row = 0; row < r; row++) { for (int column = 0; column < c; column++){ otherArray[column][row] = [[[keys objectAtIndex:0] retain...

EXC_BAD_ACCESS while accessing some files

I have a bunch of .gif files that I am displaying, in turns, in a UIImageView. On the click of specific buttons, the respective gif images are to be displayed. Some of the gifs display just fine when i click the button but for most of the cases, the App crashes without any error message. Debugging shows 'EXC_BAD_ACCESS' but when I add a ...

Symbols in dylib, Works with gcc-4.0 not in gcc-4.2 (OSX-default)

hi, i'v got an dynamic-Lib which i build with OBJECTS=keys.o etc2.o foo.o $(CC) -DSYS_MACOSX -g -fPIC -flat_namespace -L. -lpthread -Wl,-flat_namespace -dynamiclib -shared -o libmylib.dylib $(OBJECTS) My test progam links with this library $(CC) -DSYS_MACOSX -g -fPIC testmain.c -o testmain -I. -flat_namespace -L. -lpthread -lm...

ipad / iphone application EXC_BAD_ACCESS only in simulator, not on device

Hi guys - I was at client site today and made a couple of bug fixes there and then. I deployed the working copies of the app to their iPads and iPhone. Perfect. I have come home and now run the app in the Simulator.... but it crashes each time and I cannot figure out how. Unfortunately, I cannot see what I have changed which would cause ...

Getting error when added NSNumber to an array

When my program gets to the line: [userNumSequence addObject:[NSNumber numberWithInteger: sequenceNumber]]; it gets the error: Program received signal: “EXC_BAD_ACCESS”. All I'm wanting to do is to store an integer in the array. // JBNumberGeneration.m #import "JBNumberGeneration.h" @implementation JBNumberGeneration - (id) init...

EXC_BAD_ACCESS - NSZombieEnabled is not showing anything.

I am getting an EXC_BAD_ACCESS when trying to push a view controller onto the navigation stack. When enabling NSZombies, I do not get any extra information for some reason, and I can't work out why. I'm pretty certain I don't need to use CFZombies. Here is the code that seems to be causing the issue: - (void)tableView:(UITableView *)tab...

Core Data Migration loses NSNumber value

After migration, one of my numerical values that should be non-zero now appears as zero. If I don't migrate, the value retains its non-zero value. I first tried to set a number value in a managed object like this: [temp setNumUses:temp.numUses+1]; ... but that caused an'EXC_BAD_ACCESS' so I changed it to: int hold = ((int)[[temp val...

Array giving EXC_BAD_ACCESS in for loop

I have a C array defined in my method as: int c = 4; int r = 5; keysArray[c][r]; I have this for loop, which works, populating the keysArray as expected. for (int row = 0; row < r; row++) { for (int column = 0; column < c; column++){ keysArray[column][row] = [anotherArray objectAtIndex:0]; NSLog(@"array1 %@",keysA...

Strange EXC_BAD_ACCESS error in ObjC

I know this error is relating to memory management. However, I can't work out what is wrong with the management. With the following code: id month = [monthsArray objectAtIndex:indexPath.row]; NSLog(@"%@", [month class]); NSDictionary *dict = [logbookDataController summaryForMonth:month inYear:yearToView]; summaryForMonth:inYe...