I’m new to iOS,, I got an EXC_BAD_ACCESS exception in following line
nextscrn.fullTextValue=self.fulltextFromSecond;
This nextscrn object has created in this way above to that line.
ImageVisible *nextscrn=[[ImageVisible alloc]initWithNibName:nil bundle:nil];
Can any one explain me what is the reason for this and how can I solve this.
Thanks
If
nextscrn.fullTextValue=self.fulltextFromSecond;is the line where you’re getting the exception then almost certainly one ofnextscrnor.selfis set to an invalid pointer.First step is to establish which one it is, then find out why it got that way.
One way to establish which is the problem is with debugging tools (probably the best way). If that’s not possible, you can try something like:
and see if that crashes (I’ve used
void *because I don’t know what type yourselfis, but you should probably substitute the “real” type).If that crashes, it’s the
selfthat’s corrupted but I’d consider this possibility the least likely. If not, try a similar method fornextscrn.fullTextValue.