有关“SIGSEGV”崩溃的任何线索?

时间:2010-12-08 15:07:17

标签: iphone objective-c crash sigsegv

我收到了以下崩溃报告:

OS Version:      iPhone OS 4.2.1
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x12803ea4
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                     0x0000930a realizeClass(class_t*) + 18
1   libobjc.A.dylib                     0x0000935d realizeClass(class_t*) + 101
2   libobjc.A.dylib                     0x0000953f prepareForMethodLookup + 51
3   libobjc.A.dylib                     0x00005f39 lookUpMethod + 41
4   libobjc.A.dylib                     0x00003781 _class_lookupMethodAndLoadCache + 13
5   libobjc.A.dylib                     0x000034b7 objc_msgSend_uncached + 27
6   Oculus                              0x0001449f -[TestSingleView downLightingEnded] (TestSingleView.m:52)

在以下方法中:

- (void) downLightingEnded {
    [currentTestItem removeFromSuperview];
    currentTestItem = nil;
    CGRect frame = CGRectMake(0, 0, [myTestData heightOfRow:newI], [myTestData heightOfRow:newI]); //line 52
    currentTestItem = [[TestItemView alloc] initWithFrame:frame AndEyeTestItem:[myTestData signAtRow:newI Column:newJ]];
    currentTestItem.alpha = 0.0;
    [self addSubview:currentTestItem];
    currentTestItem.center = self.center;

    [UIView beginAnimations:nil context:nil];
    currentTestItem.alpha = 1.0;
    [UIView commitAnimations];

    [currentTestItem release];
}

当方法是startet时,“currentTestItem”当然可以是nil,但是向nil发送消息不是问题,所以这不是崩溃的原因。

我必须搜索哪个方向的想法?

我不知道在哪里搜索错误,因为这是客户发送的报告,我还无法重新创建它。

1 个答案:

答案 0 :(得分:3)

currentTestItem可能是非零的,但是指向一个已发布的对象?

启用Zombies检查(提示#1):

http://www.loufranco.com/blog/files/debugging-memory-iphone.html

编辑(基于对OP提问的评论):myTestData可能是一个僵尸 - 通过启用僵尸来检查。基本上,它告诉Objective-C不释放保留计数为0的对象。相反,它会将它们标记为Zombie。如果您向僵尸发送任何消息,它会通知您。

相关问题