exc-bad-access

exc_bad_access on [NSDate timeIntervalSinceReferenceDate]

六月ゝ 毕业季﹏ 提交于 2019-12-23 19:00:51
问题 I'm getting weird behavior out of [NSDate timeIntervalSinceReferenceDate] . I have the following function: -(void) insertRow{ NSTimeInterval timeNow = [NSDate timeIntervalSinceReferenceDate]; if (timeNow - secondsSinceTableViewScroll <0.5){ [self insertRow]; return; } NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:[self.itemsToFollow count] - 1]; [self.tableView insertSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic]; } which is a callback from an ASIHTTPRequest

Cocos2d EXC_BAD_ACCESS

怎甘沉沦 提交于 2019-12-23 16:34:18
问题 I am new to cocos2d and suddenly got this EXC_BAD_ACCESS, I made a new winning menu and i got the error I think the error is because i called a released object, but i dont release anything? My Debug Console had no error, which is strange here is my Level_1.m // // Level_1.m // iPadGame // // Created by My Name on 1/25/12. // Copyright 2012 __MyCompanyName__. All rights reserved. // #import "Level_1.h" #import "HelloWorldLayer.h" CCSprite *player; CCSprite *enemy; CCSprite *enemy2; CCSprite

UICollectionView bad acces on -> UICollectionViewData _setLayoutAttributes:atGlobalIndex:

半城伤御伤魂 提交于 2019-12-23 11:56:40
问题 I use an UICollectionView to display a lot of images with a batch of 32. Every time the i reach the end of the collection view i load an other batch of 32 images and resize the collectionView contentsize.width to accepte the new items. The loading is made by calling a webservice with AFNetworking. When i scroll very fast from the start to the end and to the end to the start i receive a EXC_BAD_ACCESS. It also happend when a reach the end of the CollectionView. It's like it tries to load some

EXEC_BAD_ACCESS in UITableView cellForRowAtIndexPath

白昼怎懂夜的黑 提交于 2019-12-23 10:55:30
问题 My UITableView 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", [allXYZArray count]);" (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAt IndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier

MKMapView crashing with EXC_BAD_ACCESS

不羁的心 提交于 2019-12-23 09:19:46
问题 I have the following line of code which activates the breakpoint [mapView addAnnotations:grabinstance.itemArray]; This crashing randomly. grabinstance.itemArray is fully populated always and is never changing at the time due to this bit of code only being called once the array is full. This particular time this was confirmed as 323 items in the array. NSZombieEnabled doesn't find anything at all either. The backtrace is below and line 1154 is the line above. #0 0x0126a372 in _insert () #1

EXC_BAD_ACCESS upon simple iPhone app startup

陌路散爱 提交于 2019-12-22 18:35:30
问题 Background: I'm trying out the "HelloPoly" assignment in the CS193P course. I've created my .xib file, and a custom Controller class. I haven't fleshed out any methods - I've only allowed IB to write the class files into xcode. Problem: Every single time I startup the application, it bombs out. When I run gdb I see it's an EXC_BAD_ACCESS error. This means I'm accessing something non-existent in memory right? Thing is, all I have is the default files created by IB and the main. Nothing more. I

dispatch_once call causes crash

时间秒杀一切 提交于 2019-12-22 08:33:20
问题 dispatch_once call causes crash (in simulator) after I've converted my project to ARC. My original problem was that I've got EXC_BAD_ACCESS (in objc_retain call) crash in one of my singleton object's + (SingletonClass)shared { ... dispatch_once(..., ^{}); ... } method exactly one line before the dispatch_once call. Based on loggings, and breakpoints my code have not run into the dispatch_once call's block. I didn't know the reason, so I've just commented out the dispatch_once call. My app

Apple rejected my app due to crash, can't reproduce it

☆樱花仙子☆ 提交于 2019-12-22 07:08:13
问题 I just uploaded an app to the appstore, it was developed for ios7. They rejected the app because of a crash I can't reproduce... They sent me this crash report: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000008 Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x000000018e0501c8 objc_msgSend + 8 1 UIKit 0x000000018493e940 __97-[UITabBarController transitionFromViewController

ios notifications to “dead” objects

感情迁移 提交于 2019-12-22 05:34:11
问题 I have a number of UIViews coming into view, then going out of view and being unused. However, I believe some of them are still receiving notifications even after they are gone wich is causing problems. On the UIView "parent" container: if(self._content != nil && [self._content respondsToSelector:@selector(presentMe:)]) { [self._content presentMe:NO]; } On the UIView "child": [[NSNotificationCenter defaultCenter] <-- EXC_BAD_ACCESS (code=1, address=0x70000008 postNotificationName:PRESENTING

EXC_BAD_ACCESS on UIAlertview code=1

故事扮演 提交于 2019-12-22 04:33:27
问题 I am getting the EXC_BAD_ACCESS on [alert show] line. Why I am getting this? alert = [[UIAlertView alloc]initWithTitle:@"Application Alert" message:@"all date popup" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Update",nil]; [alert show]; //EXC_BAD_ACCESS on this line 回答1: Just make delegate nil ,don't apply self to delegate .code it like below alert = [[UIAlertView alloc]initWithTitle:@"Application Alert" message:@"all date popup" delegate:nil cancelButtonTitle:nil