exc-bad-access

CGContextStrokePath triggers EXC_BAD_ACCESS in iOS > 5 [duplicate]

别说谁变了你拦得住时间么 提交于 2019-12-05 16:26:51
This question already has an answer here: Assigning an existing CGColor to a CGColor property works in iOS Simulator, not iOS device. Why? 3 answers I have a custom UIButton class that adds a gradient and a gloss effect to the UIButton the code works perfectly in iOS 4 and on iOS5 simulator but when i run it on iOS 5 devices it gives me the exception EXC_BAD_ACCESS , the exception is triggered by the line : CGContextStrokePath(context); any help is really appreciated , here's my code - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGFloat actualBrightness

How to work around/handle delegation EXC_BAD_ACCESS errors? Obj C

﹥>﹥吖頭↗ 提交于 2019-12-05 14:06:50
I'm coding a library (Obj-C for iPhone) that I want to package and sell, so I obviously need to work out any design kinks before listing it for sale. I am also utilizing this library to help me develop another app. My library is heavily built on task delegation. The primary function I have is to launch a (potentially) long-running process, and when it's done, I call a Delegate Protocol method in the class's delegate. An additional complicating factor here is that I will often schedule this task to fire off every 30 seconds or so. Usually, I do this with [self performSelector:@selector

ARC: EXC_BAD_ACCESS when calling a method from inside a block, inside a delegate method

时间秒杀一切 提交于 2019-12-05 12:34:19
I created a block, inside a delegate method and I am using it to call a static method in another class. I am getting an EXC_BAD_ACCESS error even when I have NSZombies enabled. There are a few posts on here about similar problems - I think this one is the closest: ARC: Getting EXC_BAD_ACCESS from inside block used in delegate method But, I haven't found anything so far that has helped. Here is the code: @interface MyClass() @property (nonatomic, copy) CaseBlock c; @end .... //NSURLConnection delegate method - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSDictionary *d =

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

限于喜欢 提交于 2019-12-05 12:17: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:toViewController:transition:shouldSetSelected:]_block_invoke718 + 52 2 UIKit 0x00000001846b6504 -

SecKeyGetBlockSize or SecKeyRawVerify for Public Key throw EXC_BAD_ACCESS code=2

半世苍凉 提交于 2019-12-05 10:55:44
Upon trying to implement Security.Framework SecKeyRawVerify iOS function from Apple's example, programm halts with bad pointer error (EXC_BAD_ACCESS code=2). Any help or suggestions would be appreciated. Here is my code: - (BOOL)verifySignature:(NSData *)plainText signature:(NSData *)sig { size_t signedHashBytesSize = 0; OSStatus sanityCheck = noErr; SecKeyRef publicKeyA = NULL; NSMutableDictionary * queryPublicKeyA = [[NSMutableDictionary alloc] init]; NSData * publicTag = [NSData dataWithBytes:publicKeyAIdentifier length:strlen((const char *)publicKeyAIdentifier)]; // // Set the public key

Core Data: solve a strange EXC_BAD_ACCESS error

断了今生、忘了曾经 提交于 2019-12-05 07:32:23
I am facing a really strange problem with Core Data. Let's describe it: Definitions Let's say I have two models, ModelA and ModelB . In the data model ModelA has a reference to ModelB as a one-to-many association, and consequently ModelB has a one-to-one association with ModelA . Update When the application launches (especially at first launch), or when the user asks, I have to create or update all the ModelB instances for each ModelA instance. ModelA instances are predetermined. For each ModelA instance I have about 200 instances of ModelB . I use a code like this: ModelB *model =

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

心已入冬 提交于 2019-12-05 06:26:42
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 -[VKTilePool enumerateKeysAndObjectsUsingBlock:] + 76 4 VectorKit __50-[VKRasterOverlayTileSource

EXC_BAD_ACCESS (SIGSEGV)

本秂侑毒 提交于 2019-12-05 00:52:52
I got this crash report from a remote user, but I cannot find any useful tip to resolve this issue, may be it's a retain problem but I cannot understand why because of I'm using ARC. Very small number of users are issuing this problem. I've tried all things both on simulator and on device (iPhone 4s) without any crash occurs... If I was able to crash on my device it will be very simple to find out what the problem is. Somebody knows how to fix this issue? Incident Identifier: F30F9C75-0FE3-4B39-AA17-209690A4787D Hardware Model: iPod4,1 Process: Body-Language [1220] Path: /var/mobile

EXC_BAD_ACCESS when updating Swift dictionary after using it for evaluate NSExpression

和自甴很熟 提交于 2019-12-04 20:00:49
问题 I'm using a dictionary to evaluate an expression, when the expression has variables and the dictionary is actually used by NSExpression, something happens and I get EXC_BAD_ACCESS when trying to update the dictionary, this only happens when debugging in an iPhone6, not in the simulator and not in an iPhone 4S. let strExpression = "a+b+20" let exp = NSExpression(format:strExpression) self.dictionary = ["a":10.0, "b":15.0, "c":25.0] let value:AnyObject = exp.expressionValueWithObject(self

Swift set delegate to self gives EXC_BAD_ACCESS

▼魔方 西西 提交于 2019-12-04 17:45:53
问题 I'm going through and learning Swift by porting an existing application. I'm stuck on setting a delegate and cannot work out what the issue is. I have a class which extends UITableViewCell import UIKit protocol SwitchCellDelegate{ func switchChanged(switchCell: SwitchCell, state: Bool) } class SwitchCell: UITableViewCell { @IBOutlet var swtSelector: UISwitch @IBOutlet var lblTitle: UILabel var delegate: SwitchCellDelegate? init(style: UITableViewCellStyle, reuseIdentifier: String) { super