Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Crash due to optimization level setting under XCode 4.4 - LLVM 4.0 #341

thiagoperes opened this Issue Aug 8, 2012 · 2 comments


None yet
3 participants


I'm posting this issue more like a heads up than a report, but people might wanna fix this aswell.

I started getting crashed ONLY when deploying Ad-Hocs, while on debug everything worked just fine.

A common exception is:

Exception Codes: KERN_INVALID_ADDRESS at 0x00000058
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_c.dylib               0x32c71918 OSAtomicCompareAndSwapPtrBarrier$VARIANT$mp + 0
1   Foundation                      0x353cccd0 ____addOperations_block_invoke_0 + 44
2   Foundation                      0x353cbd76 __addOperations + 306
3   BoaDiversao                     0x001192fa +[BOASessionManager requestWithPath:completionBlock:failureBlock:] (BOASessionManager.m:101)

So after looking into my build settings, I saw that two options differ from debug and release, which is Optimization Level. On debug it was None, and on Release it was Fastest, Smallest [-Os]

The solution was to set both settings to None.

More info:
-Using ARC
-ASI files with -fno-objc-arc flag

fabrice commented Aug 9, 2012

Xcode 4.4.1 seems to have fixed an issue with the optimizations. Maybe that issue is fixed.

horak commented Aug 23, 2012

  • Xcode 4.4.1
  • Using ARC
  • ASI files with -fno-objc-arc flag

So I'm in the same boat as you but I don't really think this is a good workaround seeing as Apple by default recommends you use "Fastest, Smallest [-Os]" optimization. Does anybody know the consequences of not using any optimization? I'm thinking of switching to MKNetworkKit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment