exc-bad-access

Memory over-release problem when I am animating UIView

I have enabled NSZombie's and I am getting the following message in my console when I am running my application: *** -[UIViewAnimationState release]: message sent to deallocated instance 0xf96d7e0 Here is the method that is performing the animation -(void)loadAvatar:(STObject*)st { NSAutoreleasePool * pool = [[NSAutoreleasePo...

objective-c having issues with an NSDictioary object

I have a simple iPhone app that Im learning and I want to have an instance variable called urlLists which is an NSDictionary I have declared it like so: @interface MyViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate>{ IBOutlet UIPickerView *pickerView; NSMutableArray *categories; NSDictionary *...

EXEC_BAD_ACCESS in UITableView cellForRowAtIndexPath

My UITable is returning EXEC_BAD_ACCESS, but why! See this code snippet! Loading the UITableView works fine, so allXYZArray != nil and is populated! Then scrolling the tableview to the bottom and back up causes it to crash, as it goes to reload the method cellForRowAtIndexPath It fails on line: "NSLog(@"allXYZArray::count: %i", [allX...

AVAudioPlayer crash after playing from an AVAudioRecorder

I've got a button the user tap to start recording and tap again to stop. When it stop I want the recorded voice 'echo' back so the user can hear what was recorded. This works fine the first time. If I hit the button for the third time, it starts a new recording and when I hit stop it crashes with EXC_BAD_ACCESS. - (IBAction) readToMeTap...

iPhone: Accessing Composite Name in AddressBook Causes EXC_BAD_ACCESS

Hi everyone. I'm new to iPhone development and have a question I hope someone can help me with. I have a programmer working on an iPhone app for me and when I run the app in the simulator, it works great. But when I try to run it on my actual iPhone, I get a EXC_BAD_ACCESS error and the app locks up. Looking at the debugger, it's refe...

NOOB Memory Problem - EXC_BAD_ACCESS (OBJ-C/iPhone)

I have been banging my head against the wall for a couple days and need some help. I have a feeling that I am doing something really silly here, but I cannot find the issue. This is the controller for a table view. I put the SQL in line to simplify it as part of the troubleshooting of this error. Normally, it would be in an accessor ...

Problem with Core Data - EXC_BAD_ACCESS

I'm using the following code and I'm getting an EXC_BAD_ACCESS when trying to get the count of objects - anyone have any idea why? Oddly enough, the error only happens if the count should be one or greater, if there are no objects it seems to work fine (it outputs null). NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NS...

CLLocation is not nil but trying to print it out throws EXC_BAD_ACCESS

Sorry, this may be a noob question but I'm working with CoreLocation and this has be stumped. I'm looking up the currentLocation using a singleton that was recommended on this site and when I get the currentLocation object, it returns true to a not nil check. However, when I try to print out its description, it throws EXC_BAD_ACCESS. ...

IBAction UIButton and EXC_BAD_ACCESS

in .h file I write -(IBAction)openShuffleForm; and .m -(IBAction)openShuffleForm{ NSLog(@"XXXXXXX"); } and connect with even touch up inside but when I run my program it error show this message -[UITouchData openShuffleForm]: unrecognized selector sent to instance 0x391cc20 ** what happen I don't know why !? ...

UINavigationController crash because of pushing and poping UIViewControllers

My question is related to my discovery of a reason for UINavigationController to crash. So I will tell you about the discovery first. Please bare with me. The issue: I have a UINavigationController as as subview of UIWindow, a rootViewController class and a custom MyViewController class. The following steps will get a Exc_Bad_Access, 1...

EXC_BAD_ACCESS in drawRect

Hi, The code below "sometimes" causes a crash (EXC_BAD_ACCESS) when run on the device. Never on the simulator. To reproduce it I keep overlaying a modal view controller over my table view controller. It usually happens when the modal view controller is dismissed. Any ideas why this happens? CGContextRef context = UIGraphicsGetCurrent...

xCode for iPhone EXC_BAD_ACCESS error only occurs when stepping through the debugger?

I am working on a project in xCode for iPhone where I am receiving an EXC_BAD_ACCESS error, HOWEVER, I only receive the error when stepping through a function I am trying to debug. When I take my breakpoint off the function, but still run the project in Debug Mode, I never receive this error. Is there anyway to solve this or find out w...

iphone - how to properly handle exceptional situations (signals ?)

Hi In my iphone app, I want to provide some sort of app termination handler that will do some final work (delete some sensitive data) before the application terminates. I want to handle as much of the termination situations as possible: 1) User terminates the app 2) The device runs out of battery 3) The system terminates the app du...

Core Data error when assigning variable with one-to-one relationship

I tried to assign a managed object (C) with its property another managed object (B) (a one-to-one relationship) in which this other managed object (B) has a to-many relationship with one other managed object (A). There is an error from this assignment in which I copied as follows: #0 0x020e53a7 in ___forwarding___ #1 0x020c16c2 in __f...

Objective-C NSMutableArray Count Causes EXC_BAD_ACCESS

I've been stuck on this for days and each time I come back to it I keep making my code more and more confusing to myself, lol. Here's what I'm trying to do. I have table list of charges, I tap on one and brings up a model view with charge details. Now when the model is presented a object is created to fetch a XML list of users and parses...

Singleton array deallocated? EXC_BAD_ACCESS

Ok, so I have this singleton object and in it is an array that needs to be shown in a tableview. The thing is that it deallocates and after the first show, i get EXC_BAD_ACCESS in cellForRowAtIndexPath - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [[dataBase shareddataBase].dateActive...

'EXC_BAD_ACCESS' When trying to access a variable?

I get an 'EXC_BAD_ACCESS' error when trying to access variable in a function other than the one it was set in The variable is set in the 'awakeFromNib' function: //Retrieve Session-ID sessionID = [self getSessionID]; And accessed in 'searchBtnClick': NSLog(@"Commening search (%@)",sessionID); // This causes the error The variable ...

Memory management error, using cocos2d for iPhone

Hi, So I'm getting a EXC_BAD_ACCESS error in cocos2d. From what I've been searching so far it's mostly related to attempting to free an object which has already been released. I have encountered this error before, and its solution was simple and pretty much caused by freeing a released object. But now, using cocos2d (not sure if it's a ...

Why am I getting a EXC_BAD_ACCESS in a NSTimer selector?

I've got quite a weird problem. To make it short, i'll write some pseudo-code: init: create a dictionary and insert n elements. create a "repeat timer" and add it to the currentRunLoop using the timerRefresh selector. timerRefresh: using a list of keys, find the items in the dictionary if the item exists -> call a f...

EXC_BAD_ACCESS on button press for button dynamically added to UIView within UIScrollView

OK. It's an iPad app. Within the DetailViewController I have added a UIScrollView through IB and within that UIScrollView I have added a UIView (also added through IB) which holds various dynamically added UITableViews, UILabels and UIButtons. My problem is that I'm getting errors on the UIButton clicks. I have defined this method: -...