【发布时间】:2010-12-08 15:07:16
【问题描述】:
我收到以下崩溃报告:
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 发送消息不是问题,所以这不是导致崩溃的原因。
有什么想法我必须搜索的方向吗?
我不知道在哪里搜索错误,因为这是客户发送的报告,我还不能重新创建它。
【问题讨论】:
-
第 52 行是哪一行?
-
好点,问题似乎出在“myTestData”上。到目前为止,我非常关注“currentTestItem”,谢谢。不幸的是,我无法通过点击那里造成任何崩溃,所以我仍然卡住了。
-
6 Oculus... 是我想的那样吗?
标签: iphone objective-c crash segmentation-fault