exc-bad-access

EXC_BAD_ACCESS EXC_I386_GPFLT while click on button

落爺英雄遲暮 提交于 2019-12-01 08:56:26
i have a UIViewController with UITableView , when the tableView is empty i want to show another view so i am using this [self.tableView setHidden:YES]; NoKidsViewController *noKids = [self.storyboard instantiateViewControllerWithIdentifier:@"NoKidsView"]; [self.view addSubview:noKids.view]; all is fine, i'm able to see the view. but when i tap on one of the buttons in it i'm getting the EXC_BAD_ACCESS EXC_I386_GPFLT error. //NoKidsViewController - (IBAction)addNewKid:(id)sender { AddKid *addKidController = [self.storyboard instantiateViewControllerWithIdentifier:@"AddKid"]; [self

MySQL Connector/C++ BAD ACCESS crash

不问归期 提交于 2019-12-01 07:10:39
Using C++ in Xcode I try to access a MySQL database with the MySQL Connector/C++. Problem is that the program (compiled with Xcode) always crashes with EXC_BAD_ACCESS (code=13, address=0x0) when calling driver->connect(url, user, pass) In Xcode I created a complete new project (OS X > Command Line Tool), inserted the code (see below) in the main.cpp, added Boost and MySQL Connector header include paths as well as libmysqlcppconn.6.1.1.1.dylib as Link Library and hit the Run button. Next thing is, when I compile the program manually using c++ -o test -I /usr/local/mysqlConnector/include/

EXC_BAD_ACCESS on device, but fine on Simulator

强颜欢笑 提交于 2019-12-01 06:12:12
问题 I have a scroll view app which runs fine on the simulator, however, when installed on the device, it gives me an EXC_BAD_ACCESS, when i attempt to scroll one page. I have ran it through Instruments with Allocations and Leaks, but nothing is leaked and no zombies are messaged... i'm just curious what could cause such a difference in simulator vs device? Any ways to debug this, since my symbolicated crash log (partial below), doesn't seem to be very symbolicated. Exception Type: EXC_BAD_ACCESS

EXC_BAD_ACCESS in UITextField while typing

大兔子大兔子 提交于 2019-12-01 05:12:53
I created a brand new view-based project and added into the viewDidLoad - (void)viewDidLoad { [super viewDidLoad]; myField = [[UITextField alloc] initWithFrame:CGRectMake(50, 50, 150, 31)]; myField.delegate=self; [self.view addSubview:myField]; [myField release]; } my header file is @interface textfieldpracticeViewController : UIViewController<UITextFieldDelegate>{ UITextField *myField; } when i click in the textfield and the keyboard pops up, i start typing but on the 2nd character, i get the exc_bad_access error. I ran it with NSZombieEnabled, NSDebugEnabled, MallocStackLoggin, and

MySQL Connector/C++ BAD ACCESS crash

北城余情 提交于 2019-12-01 04:56:34
问题 Using C++ in Xcode I try to access a MySQL database with the MySQL Connector/C++. Problem is that the program (compiled with Xcode) always crashes with EXC_BAD_ACCESS (code=13, address=0x0) when calling driver->connect(url, user, pass) In Xcode I created a complete new project (OS X > Command Line Tool), inserted the code (see below) in the main.cpp, added Boost and MySQL Connector header include paths as well as libmysqlcppconn.6.1.1.1.dylib as Link Library and hit the Run button. Next thing

EXC_BAD_ACCESS on NSManagedObjectContext save method inside NSOperation and ARC, why?

强颜欢笑 提交于 2019-11-30 23:43:08
问题 I have found some problems when saving NSManagedObjectContext inside NSOperation with turned on ARC. Without ARC everything was fine before. It is always gives EXC_BAD_ACCESS during saving. The code looks like this: //on the main thread -(void)someFunc { array = ... //fetching an array of entities from a core data for(SomeEntity * obj in array) { NSSomeOperation * op = [[NSSomeOperation alloc] initWithValue:[obj someField]]; //start an operation } } //NSSomeOperation implementation //... -

EXC_BAD_ACCESS on objc_setAssociatedObject with -weak_library /usr/lib/libSystem.B.dylib linker flags

倾然丶 夕夏残阳落幕 提交于 2019-11-30 19:53:14
I have a EXC_BAD_ACCESS when I call objc_setAssociatedObject with the linker flags : -weak_library /usr/lib/libSystem.B.dylib linker flags. I absolutely need the linker flag because of this , do somebody know a workaround? (I also have a crash on dispatch_async but I can work around that... Also, I'm building a iOS 4 only feature on my app that is iOS 3 compatible) EDIT: With more research, I found this and this question but no more answer... The problem is simply a bug in the iOS Simulator. The codes works fine on the device. I've filled a radar on Apple's bug reporter (radar://9470793) EDIT:

EXC_BAD_ACCESS using iCloud on multiple devices

喜夏-厌秋 提交于 2019-11-30 17:38:08
问题 I'm creating an app with iCloud. But I have some problem. It creates directory on iCloud using NSFileWrapper, then it creates NSData (container) file in NSFileWrapper directory. I'm using this code to convert NSFileWrapper to NSMutableArray: NSFileWrapper *MyWrapper=[[[MyDocument data] fileWrappers] objectForKey:@"myFile.doh"]; NSData *MyData=[NSData dataWithData:[MyWrapper regularFileContents]]; NSMutableArray *MyList=[NSPropertyListSerialization propertyListFromData:MyData mutabilityOption

How to solve KERN_INVALID_ADDRESS on EXC_BAD_ACCESS (SIGSEGV)

半世苍凉 提交于 2019-11-30 17:28:48
On my mac OSX snow leopard and xcode 4.1 and the last SDK, My application crash on my phone but on my phone friend it don't crash. I've got this error, I launch my application, wait RSS feed and after 2/3 seconds it crashed : Thank you for your help.... Date/Time: 2011-10-07 10:15:54.675 +0200 OS Version: iPhone OS 4.3.3 (8J2) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x2040b743 Crashed Thread: 6 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0: 0 libsystem_kernel.dylib 0x332a5c00 mach_msg_trap + 20 1 libsystem_kernel

How to replace current viewController with a new viewController

随声附和 提交于 2019-11-30 15:07:32
I'm trying to replace my current viewController with a new one. I've been able to do this before but I'm having some issues with BAD_ACCESS. This is the code that will run when I want to replace the current view with a new one. (The function will be called using a local property "self.some_data" (nonatomic, retain)) -(void) labelSelected:(SomeDataObject*) some_data{ SomeViewController *viewController = (SomeViewController*)[[ClassManager sharedInstance] viewControllerForClassIdentifier:@"com.somename" fromPlistFileName:@"iPhoneScreenList"]; viewController.data = (NSObject*)some_data; [some