if([timer isValid]) // << breakpoint here
{
NSLog(@"Timer Valid");
}
timer = [NSTimer scheduledTimerWithTimeInterval:[timeinterval intValue] target:self selector:@selector(PlayDelaySound) userInfo:nil repeats:NO];
The function runs properly the first time when timer is not scheduled. However, for subsequent calls, while debugging, the console gives me the log (given below) logging on single stepping. and subsequently gives sigabrt.
Any help?.
Thanks
Log
Single stepping until exit from function objc_msgSend,
which has no line number information.
warning: Remote failure reply: E37
Single stepping until exit from function objc_msgSend,
which has no line number information.
warning: Remote failure reply: E37
Maybe you’re missing a
retain?Like this:
Update: because if you’re not retaining, the timer instance may be released sometime, and your call to
isValidcauses a crash.