exc-bad-access

iOS 7 MapKit Crash: EXC_BAD_ACCESS in [VKRasterOverlayTileSource invalidateRect:level:]

邮差的信 提交于 2019-12-07 02:26:48
问题 I have an unreproducible crash on iOS 7 only. I'm making heavy use of MKOverlayRenderer to draw shapes on the map. This crash does not happen on iOS 6. Any ideas of what this might be related to will be useful. Exception Type: EXC_BAD_ACCESS Code: KERN_INVALID_ADDRESS at 0x291707628 Stack: 0 libobjc.A.dylib objc_msgSend + 5 1 VectorKit __50-[VKRasterOverlayTileSource invalidateRect:level:]_block_invoke_2 + 38 2 VectorKit -[VKTileKeyMap enumerateKeysAndObjectsUsingBlock:] + 58 3 VectorKit -

“EXC_BAD_ACCESS” vs “Segmentation fault”. Are both same practically?

跟風遠走 提交于 2019-12-06 19:28:40
问题 In my first few dummy apps(for practice while learning) I have come across a lot of EXC_BAD_ACCESS , that somehow taught me Bad-Access is : You are touching/Accessing a object that you shouldn't because either it is not allocated yet or deallocated or simply you are not authorized to access it. Look at this sample code that has bad-access issue because I am trying to modify a const : -(void)myStartMethod{ NSString *str = @"testing"; const char *charStr = [str UTF8String]; charStr[4] = '\0'; /

ASIHTTPRequest dealloc and EXC_BAD_ACCESS problem

浪尽此生 提交于 2019-12-06 11:08:17
I'm using an array of ASIHTTPRequest wrappers (AsyncImageLoader) to download images for cells in a UITableView. I'm having problems handling ASIHTTPRequests lifetime. If I release them, I end up having a EXC_BAD_ACCESS if I keep scrolling up and down while they try to load images. Here's what my wrapper looks like. self.request has retain property, targetCell is the cell I want to put the image in: @implementation AsyncImageLoader - (void)loadImageFromURL:(NSString*)fileName target:(ResultTableViewCell*)targetCell { // check for cached images, etc NSURL* url = [NSURL URLWithString:fileName];

Core Data: -deleteObject: Crashes, Are Delete Rules the Cause?

故事扮演 提交于 2019-12-06 07:37:41
问题 I have the following model, as you can see in the image. alt text http://img521.imageshack.us/img521/9741/schermata20100224a12251.png My application requires refreshing every instance of B, so at each viewWillAppear , I need to delete all the B's in the model. Upon deleting a B, the cascade delete rule on the relationship to C will delete all C and then cascade to all D. A & E are constants. I have the DeleteRule on each object as follows: A: b - Cascade B: c - Cascade, a - Nullify C: b -

Getting “Thread 1:EXC_BAD_ACCESS” error?

偶尔善良 提交于 2019-12-06 07:23:06
I am creating a simple web viewer using WKWebView and the Swift language. Here is my code. import Cocoa import WebKit @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet var containerView : NSView! = nil @IBOutlet weak var window: NSWindow! func applicationDidFinishLaunching(aNotification: NSNotification) { // Insert code here to initialize your application var webView: WKWebView webView = WKWebView() //Thread 1:EXC_BAD_ACCESS (code=1,address=0x20) var url = NSURL(string:"http://www.google.com/") var req = NSURLRequest(URL: url!) webView.loadRequest(req) } func

EXC_BAD_ACCESS upon simple iPhone app startup

╄→尐↘猪︶ㄣ 提交于 2019-12-06 04:30:27
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've checked posted code solutions to see what's different and I'm not sure what to try next. What do

EXC_BAD_ACCESS Crash in UITableView when number of rows is 0

混江龙づ霸主 提交于 2019-12-06 03:16:00
问题 I am having a consistent crash with my UITableView when I set the number of rows in the table to zero. It crashes with an EXC_BAD_ACCESS error. The crash is internal to the UITableView, so I cannot directly see what went wrong, though it should be a stupid mistake on my part. The stack trace is as follows: #0 0x0194ca60 in objc_msgSend () #1 0x00656837 in -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] () #2 0x0064c77f in -[UITableView(UITableViewInternal)

dispatch_once call causes crash

徘徊边缘 提交于 2019-12-05 20:54:25
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 haven't crashed without that call. After that I've tried to put dispatch_once in a method that my app

UIButton touches up IBAction causing EXC_BAD_ACCESS with ARC

若如初见. 提交于 2019-12-05 18:13:42
There have been a few questions on StackOverflow where users have experienced the same problem as I am having. However, none of their solutions fit my case. (See here , here , here and here for some of the SO questions I've read but have not found helpful.) In my case, I have a NIB that has a couple UIButton s, with an associated Controller View. The view is relatively old to my project and I've been able to use these buttons without any trouble until today. After making a few code changes that were not related to the button behavior, I've run into an error that crashes the app, breaks the

Program received signal: “EXC_BAD_ACCESS”

若如初见. 提交于 2019-12-05 17:32:49
I have a string variable which stores date from date picker but when I use its value in other function I am getting error like Program received signal: “EXC_BAD_ACCESS”. Note: variable is globally defined. code : - (void) changedDate: (UIDatePicker *) picker { if (appDelegate.dateint == 8) { NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@"dd MMM, yyyy"]; datestr=[dateFormatter stringFromDate:[dptpicker date]]; NSLog(@"date:%@",datestr); } else if(appDelegate.dateint == 9) { NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc]