I have problem with Thread 1: EXC_BAD_ACCESS (code=1, address=0xf00000c) and I don't know how to resolve it. It appeared when I change some object in core date and save it and I try to pop this controller to parent. This error is in main() with retVal. here is some code
int retVal;
@try {
retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
*/\ error is here**
}
@catch (NSException *exception) {
NSLog(@"%@", [exception callStackSymbols]);
@throw exception;
}
return retVal;
After re-runing app all my changes are in core data. What is more this problem is only on iOS 7. iOS 6.1 is ok.
Does someone have idea how to resolve it?
EXC_BAD_ACCESS means that message was sent to a point in the memory where there's no instance of a class to execute it. Thus âbad accessâ. You will get EXC_BAD_ACCESS in 3 cases: An object is not initialized.
What does EXC_BAD_ACCESS mean? EXC_BAD_ACCESS is an exception raised as a result of accessing bad memory. We're constantly working with pointers to memory in Swift that link to a specific memory address. An application will crash whenever we try to access a pointer that is invalid or no longer exists.
As a comment said this error is likely to be deep in your code. If the culprit is a zombie, the easiest way to find it is to run it (preferably in the latest Xcode, currently Xcode 5, as it has been improved) in profiler and choose "Zombies". When it fails, you can see the history of everything that has happened to the object.
Also, set an exception breakpoint. You may get a break when the error happens instead of in main, where the exception gets passed up.
I resolved this problem with "Zombies" and the problem was with
[UIScrollView(UIScrollViewInternal) _notifyDidScroll]
I added
- (void)dealloc {
self.tableView.delegate = nil;
}
This problem was only in iOS 7.
Thanks for help!
I just had the exact same problem.
Looked here and found nothing so I started backtracking until I thought, maybe I should try Clean Build Folderđ€
I was glad it was as easy as CLEAN BUILD FOLDER!!!
Product- Clean Build Folder(⧠â K)
đ
I have resolve this issue only by debugging the source code and re-analyze my logic.
Below are some reference that help me lot.
EXC_BAD_ACCESS means that message was sent to a point in the memory where thereâs no instance of a class to execute it. Thus âbad accessâ.
You will get EXC_BAD_ACCESS in 3 cases:
Thatâs already a good starting point. Start using the debugger, if you recently added a new object to the class youâre working on, put a breakpoint at the line before the freshly added object is used for the first time and check the values in the debugger.
Whatâs happening most though is that you will be sending a message to an overreleased object â i.e. object that is gone from the call stack. In this cases everything (and indeed everything) you will get in the console will be just :EXC_BAD_ACCESS
This is because the object is gone, there is no information what class was it, or what source file or anything else.
Please try to avoid using zombies for this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With