exc-bad-access

Assigning an existing CGColor to a CGColor property works in iOS Simulator, not iOS device. Why?

耗尽温柔 提交于 2019-12-17 09:53:58
问题 I know how to fix the problem that I am about to outline, however, I am a bit baffled as to why the code scenario works in the iOS simulator but not on my iPad. I have a method that checks various properties, and then sets the background color of a CALayer depending on the state of a property. The following code is similar to my method of color assignment: //This will be the CALayer BGColor... CGColor c = UIColor.blueColor.CGColor; //Blue is the default switch (myState) { case state_one: c =

CGImage/UIImage lazily loading on UI thread causes stutter

南笙酒味 提交于 2019-12-17 06:26:10
问题 My program displays a horizontal scrolling surface tiled with UIImageViews from left to right. Code runs on the UI thread to ensure that newly-visible UIImageViews have a freshly loaded UIImage assigned to them. The loading happens on a background thread. Everything works almost fine, except there is a stutter as each image becomes visible. At first I thought my background worker was locking something in the UI thread. I spent a lot of time looking at it and eventually realized that the

Break on EXC_BAD_ACCESS in Xcode?

混江龙づ霸主 提交于 2019-12-17 04:22:51
问题 I'm new to iPhone development and Xcode in general and have no idea how to begin troubleshooting an EXC_BAD_ACCESS signal. How can I get Xcode to break at the exact line that is causing the error? I can't seem to get Xcode to stop on the line causing the problem, but I do see the following lines in my debug console: Sun Oct 25 15:12:14 jasonsmacbook TestProject[1289] : CGContextSetStrokeColorWithColor: invalid context Sun Oct 25 15:12:14 jasonsmacbook TestProject[1289] : CGContextSetLineWidth

EXC_BAD_ACCESS when I scroll my view

做~自己de王妃 提交于 2019-12-16 18:03:13
问题 I have two views: the first one is a UITableView in plain style (created programmatically); the second one is a UIScrollView that contains an image and a UITableView in grouped style (also created programmatically). When I navigate from the firstView -> secondView everything works fine. However if I come back to the firstView and then I try to navigate firstView ->secondView for the second time, I get a EXC_BAD_ACCESS error. UPDATE This is the code of the UITableView delegate in the

EXC_BAD_ACCESS when I scroll my view

孤者浪人 提交于 2019-12-16 18:03:09
问题 I have two views: the first one is a UITableView in plain style (created programmatically); the second one is a UIScrollView that contains an image and a UITableView in grouped style (also created programmatically). When I navigate from the firstView -> secondView everything works fine. However if I come back to the firstView and then I try to navigate firstView ->secondView for the second time, I get a EXC_BAD_ACCESS error. UPDATE This is the code of the UITableView delegate in the

NSDateComponents on IOS6 not working?

↘锁芯ラ 提交于 2019-12-14 04:22:49
问题 I have a simple program which was working with IOS4 and 5. Now with IOS 6 I'm getting the following error message: 2012-10-05 11:08:16.386 app[1698:19d03] 2012-10-05 09:08:11 +0000 2012-10-05 11:08:18.072 app[1698:19d03] 2012-10-05 09:08:11 +0000 2012-10-05 11:08:19.273 app[1698:19d03] 2012-10-05 09:08:11 +0000 2012-10-05 11:08:19.274 app[1698:19d03] 2012-10-05 09:08:11 +0000 2012-10-05 11:08:19.275 app[1698:19d03] 0 2012-10-05 11:08:25.055 app[1698:19d03] 2011-10-05 09:08:11 +0000 2012-10-05

UITableView reloadData EXC_BAD_ACESS code=2

℡╲_俬逩灬. 提交于 2019-12-14 03:53:32
问题 I have this code for loading the UITableView: - (int)numberOfSectionsInTableView:(UITableView *)tableView { if (tableView == self.peopleTableView) return [self.people count]; else return [[[self.scheduleDays objectAtIndex:self.dayInt] periods] count]; } - (int)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (tableView == self.peopleTableView) return [[self.people objectAtIndex:section] count]; else return 1; } - (NSString *)tableView:(UITableView *)tableView

UIWebView loading html5-Video EXC_BAD_ACCESS crash

若如初见. 提交于 2019-12-14 03:39:43
问题 in our iPad-App we are using an UIWebView to load different sites from one domain some of them with a hml5-Video. Sites without a Video do load perfectly. But when I'm loading a site containing htmlt5-video sometimes my app crashes during the loading-process of the UIWebView with EXC_BAD_ACCESS and sometimes it does not. Whenever such a crash occurs it seems to happen at the point where the Video-Player is added into the site. I did download the UICatalog-Example from Apple and just did

Can somebody give me a hand about this stacktrace in iPhone app?

有些话、适合烂在心里 提交于 2019-12-14 03:08:24
问题 Program received signal: “EXC_BAD_ACCESS”. (gdb) bt #0 0x30011940 in objc_msgSend () #1 0x30235f24 in CFRelease () #2 0x308f497c in -[UIImage dealloc] () #3 0x30236b78 in -[NSObject release] () #4 0x30a002a0 in FlushNamedImage () #5 0x30250a26 in CFDictionaryApplyFunction () #6 0x30a001a4 in _UISharedImageFlushAll () #7 0x30a00738 in +[UIImage(UIImageInternal) _flushCacheOnMemoryWarning:] () #8 0x3054dc80 in _nsnote_callback () #9 0x3024ea58 in _CFXNotificationPostNotification () #10

Why do I get EXC_BAD_ACCESS right after instantiation?

萝らか妹 提交于 2019-12-14 02:27:34
问题 I was reading this question and still can't figure out something. I placed breakpoints at AA & BB and saw that first AA happens which means destinationPlacemark gets instantiated. later at line BB I po destinationPlacemark and get error : expression produced error: error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x10). The process has been returned to the state before expression evaluation. I read some of the answers found here but they are talking about a released