Two similar Xcode environments. One is producing code that crashes
Two similar Xcode environments. One is producing code that crashes
- Subject: Two similar Xcode environments. One is producing code that crashes
- From: Matt Thomas <email@hidden>
- Date: Mon, 04 Apr 2011 11:34:02 -0400
Hi all,
I work with another developer on iOS apps. We try to keep our build environments as similar as possible (same version of Mac OS X, same version of Xcode). Recently, the other developer started producing code that would randomly crash on armv6 devices. The crash logs was very strange giving very little thread information (see below). We tested with iOS 3.1.3 to iOS 4.2.1 and got the same crashy behavior.
The odd part is, when I build the same project with the same setting, I don't get these random crashes. We double checked the configuration of the 2 environments and even uninstalled (via the Xcode readme instructions) and reinstalled on her machine and still get the same crashes.
One thing I discovered was that we can get rid of the crash by changing the optimization level to "None [-O0]", but any other optimization setting causes the crash. This unfortunately doesn't explain why only one of the 2 machines would produce code that crashes. At first I thought it might be related to
this post I found on the dev forums, but that is with Xcode 4 and the LLVM 2.0 compiler. But we're running Xcode 3.
The only difference I can find between the two machines is:
1. The iPhone OS SDK on the machine that produces bad code is: 4.3 (8F191m) while the version on the machine that doesn't produce bad code is: 4.3 (8F190).
2. On the machine that produces bad code, the dev tools are installed at /Developer. On the machine that doesn't produce bad code, they're installed at /Xcode3
3. The machine that produces bad code previously had Xcode 4 installed but it has since been uninstalled. The machine that doesn't produce bad code has Xcode 4 installed
4. The machine that produces bad code is a 6 month old MacBook Pro Core i7. The machine that doesn't produces bad code is a 4 year old MacBook Pro Core 2 Duo.
Here's the environment details that are the same:
Mac OS X 10.6.7
Xcode 3.2.6
Xcode Core: 1809.0
ToolSupport: 1806.0
Compiler: LLVM 1.7
And here's the crash:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x38388ff4
Crashed Thread: 0
Thread 0 Crashed:
0 ??? 0x38388ff4 0 + 943230964
Thread 1:
0 libSystem.B.dylib 0x00001488 mach_msg_trap + 20
1 libSystem.B.dylib 0x00004064 mach_msg + 60
2 CoreFoundation 0x00057002 CFRunLoopRunSpecific + 982
3 CoreFoundation 0x00056c18 CFRunLoopRunInMode + 44
4 WebCore 0x000841d4 RunWebThread(void*) + 412
5 libSystem.B.dylib 0x0002b780 _pthread_body + 20
Thread 0 crashed with ARM Thread State:
r0: 0x00000000 r1: 0x00000000 r2: 0x00000007 r3: 0x3837ea40
r4: 0x00232d10 r5: 0x000990d4 r6: 0x00232d10 r7: 0x3838a1b4
r8: 0x00000007 r9: 0x002fc098 r10: 0x3837ea40 r11: 0x00000000
ip: 0x384e1810 sp: 0x2ffff1c8 lr: 0x33ab0694 pc: 0x38388ff4
cpsr: 0x200f0010
thanks,
Matt
_______________________________________________
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