When my app throws an exception it prints the following in the debugger output:
First throw call stack:
(0x310f88bf 0x3829d1e5 0x31e76015 0x31e7640d 0x31e764c5 0x9e903 0x9edfb 0x32b15d55 0x32b20e8d 0x310cb2dd 0x3104e4dd 0x3104e3a5 0x33c7cfed 0x330c0743 0x3267 0x3220)
Software stack:
Xcode 4.2 in Lion 10.7.2 (Xcode 4.1 is not installed)
I am leaning towards this this being an Xcode bug, but do you see anything obvious that I missed?
Build Settings:
Debug
Strip Debug Symbols During Copy = NO
Strip Linked Product = NO
Optimization Level = -O0 and-Os
Symbols Hidden By Default = YES and NO
Compiler = LLVM 3.0 and LLVM GCC 4.2
Scheme:
Debugger = GDB and LLDB
Cleaning:
Clean
Clean Build Folder
Delete Derived Data Directory (remove from organizer)
Devices:
iOS 5 Simulator
iOS 5 iPhone 4
iOS 5 iPhone 3Gs
Random:
I originally had this problem with both Xcode 4.1 and 4.2 installed, so uninstalled both and reinstalled just 4.2
Tried with different projects with the same results.
When fiddling with breakpoints I see this in the debugger output before the exception:
Catchpoint 36 (throw)Catchpoint 37 (catch)Pending breakpoint 2 - "__cxa_begin_catch" resolved
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
Catchpoint 36 (exception thrown).warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
Ok, found the issue: Well not me but Joe (a phillyCocoa member)… But since he is not on SO, I will post his solution.
The deployment target was set to 4.0, but since the 4.0 debug symbols must be downloaded separately in Xcode 4.2, the DSYM wasn't valid.
2 ways to fix:
1. Install the debug symbols for 4.0 from the Xcode preferences.
2. Set the deployment target to 4.3 or higher.
The only thing that sticks out is that development builds should probably have optimisation switched off altogether with -O0
.
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