Skip to content
This repository

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

Open
thiagoperes opened this Issue · 2 comments

3 participants

Thiago Peres fabrice truillot de chambrier Alex Horak
Thiago Peres

Hello,

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 Type:  EXC_BAD_ACCESS (SIGSEGV)
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 truillot de chambrier

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

Alex Horak
  • 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
Something went wrong with that request. Please try again.