exc-bad-access

didReceiveAuthenticationChallenge causing EXC_BAD_ACCESS

If the website doesn't require authentication, my code works fine, if it does, it errors with EXC_BAD_ACCESS right after printing "credential created". I'm not releasing anything, and this code is copied straight from the documentation - any idea what's wrong? - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationCha...

Core Data: -deleteObject: Crashes, Are Delete Rules the Cause?

I have the following model, as you can see in the image. My application requires refreshing every instance of B, so at each viewWillAppear, I need to delete all the B's in the model. Upon deleting a B, the cascade delete rule on the relationship to C will delete all C and then cascade to all D. A & E are constants. I have the Delete...

EXC_BAD_ACCESS when calling pushViewController

Hi I have a UITableView inside a UITabBarController. When I'm calling [[self navigationController] pushViewController:myViewController animated:YES]; there is no problem. but, When I'm calling the same line from inside a UIActionSheetDelegate, for example: - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NS...

Debugging EXC_BAD_ACCESS from a NSString

Hello All, I had a EXC_BAD_ACCESS message in my console. I read about the environment variables NSZombieEnabled and MallocStackLoggingNoCompact on this site. I created my environment variables: NSZombieEnabled = YES and MallocStackLoggingNoCompact = 1. In the console, I saw 2010-03-01 19:13:46.924 CruzNomad[7952:207] * -[CFString...

PickerView EXC BAD ACCESS??

I keep getting a exc bad access error and I think it has something to do with my pickerview because this is when the app crashes. Everything works fine until I make a 9th choice from the pickerview. Every single time the app crashes on the 9th choice. Any ideas? - (void)viewDidLoad { [super viewDidLoad]; list = [[NSMu...

What does this error mean: "lo->hi recycling invariant violated!" and what can I do to fix it?

My iPhone app started logging this error: lo->hi recycling invariant violated! followed by: Program received signal: “EXC_BAD_ACCESS” whenever I launched it on my iPod (3.1.3) and sometimes when I launch it in the simulator. What does this error mean, and how can I fix it? I am using cover-flow in my app. I think this might be the pr...

EXC_BAD_ACCESS on startAsynchronous request using ASIFormDataRequest

I am getting EXC_BAD_ACCESS on the Line: [asiUsernameRequest startAsynchronous]; in this code. Spent hours trying to figure it out, but no solution. Any idea? NSString *usernameValue = (NSString*)usernameField.text; NSLog(@"username selected: %@", usernameValue); NSURL *url = [NSURL URLWithString:@"http://www.mywebsite....

Getting EXC_BAD_ACCESS without any helpful msg from NSZombieEnabled

Hello guys. I'm a newbie to iphone development and I've been struggling with an EXC_BAD_ACCESS error I got a couple of days ago. I'm basically taking the Stanford iphone class independently and I am trying to pass an array of NSManagedObjects to a TableViewController that's supposed to display them. The application launches in the si...

EXC_BAD_ACCESS on [error localizedDescription];

This Code trows an EXC_BAD_ACCESS: NSError* error; if(![appdelegate.managedObjectContext countForFetchRequest:request error:&error]) { DLog(@"Failed to save to data store: %@", [error localizedDescription]); NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey]; if(detailedErrors != n...

exc_bad_access on insertNewObjectForEntityForName:inManagedObjectContext

Update I wrote a minimal code example of the issue I am having. I implemented the background work two ways: manually spawning threads and letting NSOperation handle threading. In both cases I am creating NSManagedObjectContexts for each thread/operation. When I spawn the threads myself with performSelectorInBackground:withObject: eve...

CGContextDrawImage returning bad access

Hello guys, I've been trying to blend two UIImage for about 2 days now and I've been getting some BAD_ACCESS errors. First of all, I have two images that have the same orientation, basically I'm using the CoreGraphics to do the blending. One curious detail, everytime I modify the code, the first time I compile and run it on device, I g...

App crashes every second time a tableview row is selected in navigation controller setup

Disclaimer first: I'm pretty new to Objective-C and the retain model. I've been developing in a garbage collected .NET environment for the last five years, so I've been spoiled. I'm still learning. I'm having my iPhone app crash with EXC_BAD_ACCESS. It happens in a navigtation controller/tableview setup. When I select a row the first ti...

I get EXC_BAD_ACCESS when MaxConcurrentOperationCount > 1

Hello i am using NSOperationQueue to download images in the background. I have created a custom NSOperation to download the images. I put the images in table cells. The problem is if I do [operationQueue setMaxConcurrentOperationCount: 10] and i scroll down several cells the program crashes with EXC_BAD_ACCESS. Every time it crashes at t...

IPhone SDK, EXC_BAD_ACCESS Changing image?

I have my code and i recieve the EXC_BAD_ACCESS error when it is suppose to change... any ideas: -(void) updatePlay { UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"bursttt" ofType:@"png"]]; if (CGRectIntersectsRect(pinend.frame, balloonbit1.frame)){ [maintimer invalidate]; ...

EXC_BAD_ACCESS error when my view controller tries to access a singleton variable a second time

I have an app i building which is a simple naviagtion app. I do not want to load the data from my xml multiple times so I am using a singleton to load and hold the data. My first table pushes the view of the second table. This table calls the singleton and the get the array of data from there to display in the table. This all works fine...

I get an "EXC_BAD_ACCESS" when I try to read a NSString...

Hello ! This is a (very) simplified version of my iPhone code : @interface x { NSString * name1; NSString * name2; } -init { name1 = @""; name2 = @""; } -(void) a { Foo * foo = [Foo alloc]; name1 = @"uhuh"; name2 = [foo bar]; // return a (NSString *) [foo release]; ...

Objective C - displaying data in UITextView

Hi, I'm having difficulties displaying data in a UITextView in iPhone programming. I'm analyzing incoming audio data (from the microphone). In order to do that, I create an object "analyzer" from my SignalAnalyzer class which performs analysis of the incoming data. What I would like to do is to display each new incoming data in a TextV...

Avoiding EXC_BAD_ACCESS when using the delegate pattern

A have a view controller, and it creates a "downloader" object, which has a reference to the view controller (as a delegate). The downloader calls back the view controller if it successfully downloads the item. This works fine as long as you stay on the view, but if you navigate away before the download is complete I get EXC_BAD_ACCESS. ...

objective-c EXC_BAD_ACCESS in my code...

I'm new to objective-c and Im trying to write a little sample app that gets some XML from a remote server and outputs it to the console, but when I do it I get a EXC_BAD_ACCESS which I dont understand: NSString *FeedURL = @"MYURLGOESHERE"; NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:FeedURL]]; ...

iPhone app throwing EXC_BAD_ACCESS with dictionary from contents of file

I have the code NSArray *paths = [[NSArray alloc] initWithArray:NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)]; NSString *docsDirectory = [[NSString alloc] initWithString:[paths objectAtIndex:0]]; NSLog(@"This app's documents directory: %@",docsDirectory); NSString *docsDirectoryWithPlist = [[NSS...