开发者

Any clue about "SIGSEGV" Crash?

I got the following crash-report:

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 -[Tes开发者_运维问答tSingleView downLightingEnded] (TestSingleView.m:52)

In the following method:

- (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];
}

Of course "currentTestItem" could be nil when the method is startet, yet sending a message to nil isn't a problem, so thats not the reason for the crash.

Any ideas in which direction I'd have to search?

I didn't know where to search for the bug, because this is a report send by a customer, and I'm not yet able to recreate it.


Could currentTestItem be non-nil, but pointing to a released object?

Check by enabling Zombies (Tip #1):

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

Edit (based on comment to question by OP): myTestData could be a zombie -- check by enabling zombies. Basically, it tells Objective-C to not deallocate objects that have a retain count of 0. Instead, it will mark them as a Zombie. If you send any message to a Zombie it will let you know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜