Bug related to GCC_OPTIMIZATION_LEVEL
Bug related to GCC_OPTIMIZATION_LEVEL
- Subject: Bug related to GCC_OPTIMIZATION_LEVEL
- From: Jason Swain <email@hidden>
- Date: Tue, 1 Jun 2010 13:30:09 +0100
I have an XCode project that runs find in Debug configuration, but when I change to Release if fails with a bug that is hard to track down.
Through trial and error I found that if I turn of all optimizations the code will run correctly, but with any optimization level set the code fails. Debugging is difficult with optimization turned on as the debugger has less information to go on.
The bug presents itself as various Objective-c object variables being nil when they shouldn't be. I've added NSLogs() and they are all set correctly in a property setter in both Debug and Release, but when accessed later in the code they are nil in Release and correct in Debug. This is consistent and only happens in a few classes (with a common parent), so it is probably related to something in that class tree.
This is a difficult one to track down as I can't change to Debug configuration to debug the problem, and in the Release configuration gdb doesn't give me enough information to see what the problem is.
Does anyone have any suggestions on how I should attack this problem?
Jason
---
bookshelfapps.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden