Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSFetchedResultsController and BAD_ACCESS

I have a UITableViewController that is fed by a NSFetchedResultsController.

Everything worked fine, until I added

if (self.fetchedResultsController != nil) 
{
  return self.fetchedResultsController;
} 

to the beginning of my

-(NSFetchedResultsController *)fetchedResultsController { 

method. The error I get is:

Program received signal:  “EXC_BAD_ACCESS”.

Any idea why this could be? I declare

@property (nonatomic, retain) NSFetchedResultsController  *fetchedResultsController; 

in the .h file and

@synthesize fetchedResultsController 

in the implementation file.

Thank you~

like image 402
Bill Smithed Avatar asked Nov 25 '25 16:11

Bill Smithed


1 Answers

Is that setting up a recursive call, with self.fetchedResultsController invoking the fetchedResultsController method?

like image 95
Graham Perks Avatar answered Nov 27 '25 13:11

Graham Perks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!