the second time I execute
[[MOC executeFetchRequest:request error:&error] lastObject];
after having said
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:[NSEntityDescription entityForName:@"Login" inManagedObjectContext:MOC]];
NSError *error = nil;
it crashes with a EXC_BAD_ACCESS. Included is the debug window, and it looks like the crash happens deep down in the Core Data stack. Any idea on how I should go about debugging this to find out what’s going on?
(just in case, here’s the link to the picture http://tinypic.com/r/zmavph/6 Click on the picture in the link and the debug window will get larger)
Cheers
Nik

EXC_BAD_ACCESSis a memory error. You are using an object after deallocating it. It would be difficult to debug this without (more) code.Have you tried running the analyzer (Xcode > Build > Build and Analyze)?
You may also want to break out the fetch and array lookup: