Take the 2-minute tour ×

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 -[TestSingleView 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.

share|improve this question
Which line is number 52? –  Migol Dec 8 '10 at 15:09
Good point, the problem seems to lie with "myTestData". I was very fixed on "currentTestItem" up to now, thank you. Unfortunately I can't create any crash by clicking around there, so I'm still stuck. –  Bersaelor Dec 8 '10 at 16:02
6 Oculus... Is that what I think it is? –  Jason Sperske Mar 15 '13 at 20:39
add comment

1 Answer

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

Check by enabling Zombies (Tip #1):


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.

share|improve this answer
Since he is assigning nil to it, I don't think this is it. –  Benjamin Egelund-Müller Dec 8 '10 at 15:13
He first sends the old instance a release message before assigning nil to it. –  Eiko Dec 8 '10 at 15:32
What Lou said in his edit; until we see more code, the assumption that myTestData has been over-released is a good one. (I edited the answer to not mention retainCount; an object can never have a retainCount of zero...) –  bbum Dec 8 '10 at 16:52
add comment

Your Answer


