Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

objc_retain problem #186

Closed
FamilyLab opened this issue Oct 17, 2013 · 1 comment
Closed

objc_retain problem #186

FamilyLab opened this issue Oct 17, 2013 · 1 comment

Comments

@FamilyLab
Copy link

I have this crash:objc_retains in my code.

My project is ARC.

I found it finally crash here:

  • (void)associateCopyOfValue:(id)value withKey:(const char *)key {
    objc_setAssociatedObject(self, key, value, OBJC_ASSOCIATION_COPY_NONATOMIC);
    }
    If I didn't use the function "performBlock...", it works:

  • (void)viewDidLoad
    {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    //if I delete the code below, it works
    [self performBlock:^(id sender) {
    NSLog(@"hit");
    } afterDelay:0.3f];
    }

This is my project: http://www.mediafire.com/download/hppnt7k491y5f1k/QQSDKDemo.zip

This is the call stack:

callStack :(
0 QQSDKDemo 0x00008b8e +[NSObject(A2BlockDelegateBlocksKitPrivate) bk_accessorsMap] + 142
1 QQSDKDemo 0x00008de1 +[NSObject(A2BlockDelegateBlocksKitPrivate) registerDynamicDelegateNamed:forProtocol:] + 81
2 QQSDKDemo 0x00009f58 +[MFMailComposeViewController(BlocksKit) load] + 136
3 libobjc.A.dylib 0x019657f5 call_load_methods + 437
4 libobjc.A.dylib 0x01967de5 load_images + 133
5 ??? 0x8fef0c32 0x0 + 2414808114
6 ??? 0x8feff252 0x0 + 2414867026
7 ??? 0x8feff0ba 0x0 + 2414866618
8 ??? 0x8fef0e05 0x0 + 2414808581
9 ??? 0x8fef4adb 0x0 + 2414824155
10 ??? 0x8fef0376 0x0 + 2414805878
11 ??? 0x8fef0077 0x0 + 2414805111
)

@zwaldowski
Copy link
Collaborator

Hey, I'm checking it out and I'm encountering the EXC_BAD_ACCESS too, but our code in the NSObject category is never getting called at all. Please upgrade to the latest BlocksKit, trying out the version on the next branch if necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants