exc-bad-access

iAd randomly crashes

Hi, I got this iAd crash randomly in my app. What could I do to fix? I don't see any hints for me to fix it because on the simulator it never happens. Incident Identifier: CA4CBEB9-A081-459B-BAAA-C7D58A0E0ABC CrashReporter Key: e24b9614a897f92ee13ce00b76c71db307c61dcb Hardware Model: iPod2,1 Process: FooApp [737] Path: ...

XCode building: identical configurations behave differently

I have a superweird problem: I get a crash (EXC_BAD_ACCESS) when running my app with Release as active configuration on my 3.1.3 iPhone 3G. (works well in debug configuration or in simulator , works perfectly on device running iOS4). My first guess was one setting in the Release configuration was erroneous/missing. In order to test it ...

EXC_BAD_ACCESS when loading NSArray from .plist

I have a plist written from a NSMutableArray by [NSMutableArray writeToFile]. When trying to load that same plist with the following code: NSArray *testArray = [NSArray arrayWithContentsOfFile:[self pathForDataFile:@"reportingSpeicher.plist"]]; NSLog(@"count = %@",[testArray count]); I get bad access on the count or on any other opera...

EXC_BAD_ACCESS in for loop

Hi Can anyone enlighten me as to why i'm getting an EXC_BAD_ACCESS on this chunk of code? I ran Instruments with Allocations and NSZombie enabled, and it said i messaged a zombie, but can't see whats up with it. NSMutableArray *keys = [NSMutableArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @"keys" ofType:@"plist...

Unable to set class properties

Now Im sure Im doing something extremely schoolboy here, but Im seriously hitting my head against a wall, for some reason Im getting EXEC_BAD_ACCESS when trying to set an NSNumber property on a custom class. Think Im having one of those days! Here my test h and m files: // Test.h #import <Foundation/Foundation.h> @interface Test : ...

EXC_BAD_ACCESS in [window addSubview:viewcontroller.view]

Hi I have two universal applications... one is giving me an EXC_BAD_ACCESS error when i do this in the app delegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. ScrollViewController *vc = [[ScrollViewCon...

Fill Table View with JSON

Here goes a newbie question: Create a new project in Xcode: File > New Project and select Navigation-based Application from iPhone OS templates. Install json-framework as explained here. Edit RootViewController.h's interface section into this: @interface RootViewController : UITableViewController { NSURLRequest *request; NSURL...

ASIHTTPRequest dealloc and EXC_BAD_ACCESS problem

Hi, I'm using an array of ASIHTTPRequest wrappers (AsyncImageLoader) to download images for cells in a UITableView. I'm having problems handling ASIHTTPRequests lifetime. If I release them, I end up having a EXC_BAD_ACCESS if I keep scrolling up and down while they try to load images. Here's what my wrapper looks like. self.request ha...

NSNumber intValue giving EXC_BAD_ACCESS

I have an NSNumber being passed to be via a 3rd party API, and when I call intValue on the index I get a EXC_BAD_ACCESS error: -(CPFill *) barFillForBarPlot:(CPBarPlot *)barPlot recordIndex:(NSNumber *)index; { NSLog(@"bar index %i", index); int value = [index intValue]; } The output I get in the debugger is: bar index 0 ba...

Error EXC_BAD_ACCESS

Hi, I'm new in iPhone developement and I have a EXC_BAD_ACCESS error. In my .h I declare: NSString *myString; In my .m I have to methods: . The (void)locationManager of CLLocationManager interface when I do it: myString = [NSString stringWithFormat:@"%lf",loc.longitude]; NSLog(@"%@",myString); // it works . A (void)sendPosition ...

My subclass as a property won't accept new values for its properties

I have a UIViewController that presents another UIViewController with a picker and returns four values. I also have a custom class called Chemical that can hold these values. In the delegate method that receives the values (the didSelectSource one in AdjustViewController) I put a breakpoint and I can see that the proper values come bac...

NSTextField binding causes EXC_BAD_ACCESS

I have an NSTextField which is bound to an int in an object that I have included in my nib. When the object changes its int, the text field follows suit, and everything looks fine. However, when I try to change it manually the program crashes as soon as I hit a key. It's not even getting into my setter methods, it just crashes with Pr...

EXC_BAD_ACCESS unrecognized selector sent to instance

//adds a button to scroll list -(void) addNode:(NSString *) atitle{ UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [btn setTitle:atitle forState:UIControlStateNormal]; [btn addTarget:self action:@selector(buttonTouched:) forControlEvents:UIControlEventTouchUpInside]; // handle touch [bu...

exc_bad_access in C program

Okay, I know there is another question about "exc_bad_access" here, but that seems to deal with Objective-C and iPhone dev., while mine is only regular C. I am new to C and am almost done with my first program until this error showed up. I have been trying to figure it out for a couple of days and am going insane. Any help is apprecia...

iPhone SDK: NSMutableArray count causes EXC_BAD_ACCESS

Hi everyone This is really twisting my mind… I'm trying to access an NSMutableArray in an IBAction which I defined in viewDidLoad. Unfortunately I keep getting a EXC_BAD_ACCESS. I'm new to all this so I'd really appreciate some insight in what I'm doing wrong. Below find the corresponding code excerpts. CounterViewController.h: @in...

iphone EXC_BAD_ACCESS using my own class

Hi all! I made my own class derived by NSObject, and here is my code: -(void) parseRow:(NSDictionary*) dictionary { NSArray* arName = [[dictionary valueForKey:displayname] componentsSeparatedByString:@"+"]; [self setDriverName:[arName objectAtIndex:0]]; [self setDriverSurname:[arName objectAtIndex:1]]; [arName release]; ...

makeKeyAndOrderFront: again causes EXC_BAD_ACCESS

Hello, Im sure this is something really simple I'm missing. I use makeKeyAndOrderFront: to open a window and it works the first time. When I close the window and try and open it again it quits and gives me the error EXC_BAD_ACCESS. My code is this: - (IBAction)viewScreen:(id)sender { [screenView makeKeyAndOrderFront:sender]; } I can...

iPhone: App crash in MapView after 20 min

I am working on an app that tracks a users location. After about 20 minutes it seems that the app always crashes, and I am not sure why. Device logs show: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x069f6000 Crashed Thread: 0 Thread 0 Crashed: 0 Ride 0x00012e00 -[...

crash when switching between tableviews using tab controller and MBProgressHUD

I have two tableviews. One loads when I select one tab, and the other loads when I select the other tab. I use MBProgressHUD to allow for quick switching between the tabs as I pull the tableview datasource from the web using Objective Resource and that can take a little bit. So I throw up a HUD progress indicator waiting for the data ...

Problem resigning UISearchBar's firstResponder status

Hi there, I've got a UISearchBar on my UITableView and a method -finishSearching which looks like this: - (void)finishSearching { [overlayViewController.view removeFromSuperview]; if ([sb isFirstResponder]) [sb resignFirstResponder]; myTableView.scrollEnabled = YES; } This method gets called everytime I want to st...