exc-bad-access

EXC_BAD_ACCESS while using CoreAnimation

依然范特西╮ 提交于 2019-12-11 11:54:10
问题 I use CoreAnimation to animate UIImageView (curve Bezier animation). Here`s my code: CAKeyframeAnimation *pathAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; pathAnimation.calculationMode = kCAAnimationCubic; pathAnimation.fillMode = kCAFillModeForwards; pathAnimation.removedOnCompletion = NO; CGPoint endPoint = originalPosition; UIBezierPath *path = [UIBezierPath bezierPath]; [path moveToPoint:star.layer.position]; [path addQuadCurveToPoint:endPoint controlPoint

iOS - setting text of UITextView throws EXC_BAD_ACCESS

…衆ロ難τιáo~ 提交于 2019-12-11 11:52:33
问题 I have a UITextView which I have created programmatically in the following code: NSLog(@"creating the first blurb"); blurb = [[UITextView alloc]initWithFrame:CGRectMake(0, 0, 320, 50)]; [blurb setText:total]; blurb.backgroundColor = [UIColor redColor]; where blurb is defined as a UITextView in the @interface . Here's where I'm having the problem: total is an NSString that is defined to get the text from a .txt file from a specified domain. It is mutated as: NSString *url = @"https://sites

Getting “EXC_BAD_ACCESS” when accessing instance variable from within UITableView delegate method

隐身守侯 提交于 2019-12-11 10:05:41
问题 My iPhone application blows up when it accesses an instance variable from within one of the UITableView delegate methods. I think I'm retaining it so I do not understand why I can't access it without a problem. Here's my .h file #import <Foundation/Foundation.h> #import "AlertSummaryCell.h" #import "AlertDetailViewController.h" @interface AlertSummaryTableViewController : UITableViewController { NSDictionary *alerts; NSString *alertKind; } @property (nonatomic, retain) NSDictionary *alerts;

EXC_BAD_ACCESS using ARC and can't track on simulator

霸气de小男生 提交于 2019-12-11 09:38:46
问题 I have been building an app for a client and everything was going smoothly until I started getting this error. This is a unique situation, I've learned how to use instruments and NSZombie however I can't run instruments with NSZombieEnabled on the iPhone only on the simulator. I have to debug this problem in the iPhone because I'm using UIImagePicker to take a picture and the error happens shortly after I take the picture. I'm also using ARC so I can't set release or retain info at all, ARC

Exc bad access after populating NSMutableArray with custom class extending CLPlacemark

耗尽温柔 提交于 2019-12-11 09:15:58
问题 I have a PlaceAnnotation class that I fill into an NSMutableArray. In viewDidLoad, i initiate ihatethis _ihatethis = [[NSMutableArray alloc]init]; I use a MKLocalSearchCompletionHandler to search. And handle the mapitems like this: for (MKMapItem *mapItem in [response mapItems]){ PlaceAnnotation *place = [[PlaceAnnotation alloc] init]; [place assignTitle:[[mapItem placemark] name]; [_ihatethis addObject:place]; } [_ihatethis removeObjectAtIndex:2]; /*BAD ACCESS HERE*/ [_tableView reloadData];

Thread 1: EXC_BAD_ACCESS (code=1, address=0x20) When subView

假装没事ソ 提交于 2019-12-11 08:07:41
问题 I got a strange error. Thread 1: EXC_BAD_ACCESS (code=1, address=0x20) When a View subView on another view. Both v iew object not nil. How do I solve this issue. Edit: I am implementing a video chat code with VOIP. When an incoming call comes and after accept the call. I need to display a screen. This screen is showing fine and other UIElements button etc.. (including button functionalities) everything is working as expected for audio calls. But, in video call after receive the remote user

Why am I getting EXC_BAD_ACCESS with these c++ functions?

*爱你&永不变心* 提交于 2019-12-11 07:48:29
问题 I am doing a homework assignment and I am running into these issues. I am getting EXC_BAD_ACCESS when I call allocate(); void* Pool::allocate() { if( free == NULL) { this->expandPool(); } void* tmp = free; void* mem = malloc(elemSize); memcpy(&free,free,sizeof(char*)); //exec bad access right here memcpy(tmp,mem,sizeof(elemSize)); return tmp; } Here is my expandPool method: void Pool::expandPool() { poolSize++; // Is this the first time? if(poolSize <= 1) pool = new char*[poolSize]; else {

MySQL XCode C++ Connector Bad Access code=13

我是研究僧i 提交于 2019-12-11 07:09:41
问题 I have a problem with getting MySQL working with my code. I get the EXC_BAD_ACCESS(code=EXC_i386_GPFLT) error on the connect line. The code is the following: try { driver =sql::mysql::get_driver_instance(); connection = driver->connect("tcp://127.0.0.1:3306/", "root", ""); I've seen the post MySQL Connector/C++ OS X 10.9 Mavericks and XCODE 5.0.2 but I can't do the same thing because I use a bunch of libraries that were linked the same way, and they are more difficult to configure in Xcode

EXC_BAD_ACCESS, but not when using breakpoints

女生的网名这么多〃 提交于 2019-12-11 06:19:19
问题 I am getting a crash on my app. It's occurring on dismissModalViewControllerAnimated: message, but... if I set a breakpoint on the NSLog, and step over, it goes through with problem, the EXC_BAD_ACCESS code is 2 and address 0x4: Thread 1: EXC_BAD_ACCESS(code=2, address=0x4) I've never had something work with breakpoints and EXC_BAD_ACCESS without them, any ideas? Please note that my appController is fine. (not released anywhere). if (appController.modalViewController) { NSLog(@"==== RETAIN

text becomeFirstResponder throws EXC_BAD_ACCESS Code=1 Address=0x1

試著忘記壹切 提交于 2019-12-11 05:44:18
问题 This is a Q&A to hopefully help anyone else who runs into this issue. The problem occurred seemingly at random while I was working on transferring the FirstResponder chain between controls. The controls were custom control objects inherited from UIView with either a UITextField or UITextView added as a subview (with other controls) and generated entirely in code. Not every instance of the controls that were generated threw the exception, but the ones that did did so consistently whether the