0

全部,当框架调用 objc_retain 时,将引发 EXC_BAD_ACCESS 异常。任何追踪问题的帮助或提示将不胜感激。让我知道是否应该提供更多代码。

问题领域:

- (SCUuidNode*)addUUIDNode:(NSString*)uuid
{
    const char *uuidCStr = [uuid cStringUsingEncoding:NSASCIIStringEncoding];
    SCUuidNode *uuidNode = [[SCUuidNode alloc] initWithNode:create_uuid_node(uuidCStr)];
    composite_node_append_child((Node*)[self node], [uuidNode node]);

    return uuidNode; # Exception is being thrown right around here.
}

...

Composite *paymentNode = [SCCompositeNode createPriceNode:^(SCCompositeNode *cnode) {
    SCUuidNode *uuidNode = [cnode addUUIDNode:buyerDeviceId];
    SCIntNode *buyerIdNode = [cnode addIntNode:[buyerUserId integerValue]];
}];
4

1 回答 1

0

As rob and Space Dust kindly pointed out, adding zombies helped track down the memory bug to an initializer.

于 2012-12-26T05:09:56.507 回答