My app crashes with this stack trace:
[DictationDetailsController respondsToSelector:]: message sent to deallocated instance
I tracked that on instruments trying to see the relevant code causing the crash:
here is the relevant code for MyDictationController
in the didSelectRowAtIndexPath: delegate method:
- (void)tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath )indexPath {
DictationDetailsController *controller = GET_CONTROLLER_WITH_CLASS([DictationDetailsController class]);
controller.dictation = [unSubmittedDictations objectAtIndex:indexPath.row];
controller.isEditMode = YES;
controller.selectedDate = _selectedDate;
controller.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:controller animated:YES];
}
@property (copy ,nonatomic) Dictation *dictation;
Also i have used @synthesize
. Help me out in this issue, to get which deallocated method is being called.?
Here's my DictationDetailsController
interface:
@interface DictationDetailsController : BaseController
@property (copy ,nonatomic) Dictation *dictation;
@property (nonatomic) BOOL isEditMode;
@property (nonatomic) NSDate *selectedDate;
@property (weak, nonatomic) IBOutlet UILabel *navigationTitleLabel;
@property (weak, nonatomic) IBOutlet UITextField *patientNameTextField;
@property (weak, nonatomic) IBOutlet UITextField *accountIDTextField;
@property (weak, nonatomic) IBOutlet UITextField *workTypeTextField;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *deleteButtonWidth;
@property (weak, nonatomic) IBOutlet UIView *tutorialView;
@property (weak, nonatomic) IBOutlet UIView *audioContainer;
@property (weak, nonatomic) IBOutlet UISlider *audioSlider;
@property (weak, nonatomic) IBOutlet UILabel *durationLabel;
@property (weak, nonatomic) IBOutlet UILabel *noRecordingLabel;
@property (weak, nonatomic) IBOutlet UIButton *playPauseButton;
@end
And in dealloc
method:
- (void)dealloc {
[player pause];
player = nil;
self.dictation = nil;
}