"clang quit unexpectedly" (xcode Crash) - ios

When i try to Analyze my code (Product -> Analyze), the xcode crash with this title "clang quit unexpectedly"
Process: clang [10074]
Path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Identifier: clang
Version: 3.1 (318.0.61)
Code Type: X86-64 (Native)
Parent Process: clang [10073]
Date/Time: 2012-07-13 18:46:29.862 +0100
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9
Interval Since Last Report: 140604 sec
Crashes Since Last Report: 50
Per-App Crashes Since Last Report: 39
Anonymous UUID: E974A614-4831-478E-8B68-8FE005A98F19
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 000000010180f000-00000001029c8000 [ 17.7M] r-x/rwx SM=COW /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 clang 0x00000001018dc780 clang::Stmt::getSourceRange() const + 16
1 clang 0x00000001021ce0c6 _ZL22getValidSourceLocationPKN5clang4StmtEN4llvm12PointerUnionIPKNS_15LocationContextEPNS_19AnalysisDeclContextEEE + 86
2 clang 0x00000001021ce5d3 clang::ento::PathDiagnosticLocation::genLocation(clang::SourceLocation, llvm::PointerUnion) const + 35
my guest is because LLVM ? i have Apple LLVM compiler 3.1
Thanks!
Edit:
Xcode Version 4.3.3 (4E3002)

I have a file that always crashes clang when analyzed. I submitted abut report on it and Apple dupped the bug - so obviously they know of some bugs already. Note that Xcode 4.4 will be released in a week or two with llvm 4.0 so just wait for it, and if you still get crashes please enter a bug report at bug reporter.apple.com
Edit: my bug report was against 4.3.3

Related

IOS Simulator quit unexpectedly Xcode 10.1

After running automation tests via Appium in parallel (8 concurrent IOS simulators) I can't run simulator anymore. Reason still is not clear. I tried to reinstall Xcode (v10.1 v9.4), recovered Mac OS, used killall -10 com.apple.CoreSimulator.CoreSimulatorService . When I run simulator there it error message:
Simulator quit unexpectedly
Process: Simulator [1439]
Path: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
Identifier: com.apple.iphonesimulator
Version: 10.1 (877)
Build Info: Indigo-877000000000000~218
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Simulator [1439]
User ID: 502
Date/Time: 2019-01-12 16:19:15.922 +0300
OS Version: Mac OS X 10.14.2 (18C54)
Report Version: 12
Bridge OS Version: 3.3 (16P53132a)
Anonymous UUID: 746485C4-4AA2-44F7-C299-5A58EB4FD0C5
Time Awake Since Boot: 170 seconds
System Integrity Protection: enabled
Crashed Thread: 7 Dispatch queue: com.apple.iphonesimulator.deviceCoordinatorQueue.457B5DF1-903C-41E0-A9B7-42D97AC96569
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000070000b351fe8
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [1439]
VM Regions Near 0x70000b351fe8:
Stack 000070000b2cf000-000070000b351000 [ 520K] rw-/rwx SM=COW thread 6
--> STACK GUARD 000070000b351000-000070000b352000 [ 4K] ---/rwx SM=NUL stack guard for thread 7
Stack 000070000b352000-000070000b3d4000 [ 520K] rw-/rwx SM=COW thread 7
Interesting point: when I run Appium test there is still the same error but test is passed as it looks like Simulator still works in headless.
Approximately same issue I have found there but it is a little bit different https://shirome9.wordpress.com/2016/11/27/xcode-quit-unexpectedly/
Do you have any idea ?
I don't know the real cause of the issue, but I got resolved by restarting and opening with different simulator.

Install xcode 4 on OS X Yosemite

I need to install old version of Xcode on Yosemite. Xcode 5 installed perfectly but I am facing problem with Xcode 4. It crashes, these are the errors:
Process: Xcode [4341]
Path: /Applications/Xcode 3.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.6.3 (2068)
Build Info: IDEApplication-2068000000000000~3
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [4341]
User ID: 501
OS Version: Mac OS X 10.10 (14A389)
Report Version: 11
Anonymous UUID: 5F18251C-5B88-768B-7023-12B7B510FD63
Time Awake Since Boot: 13000 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4H1503
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Error getting value for key 'delegateClass' of extension 'Xcode.OrganizerSource.ArchivedApplications.ArchiveListContextualMenu' in plug-in 'com.apple.dt.IDE.IDEArchivedApplicationsViewer'
UserInfo: {
NSUnderlyingError = "Error Domain=DVTPlugInErrorDomain Code=2 \"Loading a plug-in failed.\" UserInfo=0x4016afbe0 {DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEiPhoneSupport, DVTPlugInExecutablePathErrorKey=/Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/IDEiPhoneSupport.ideplugin/Contents/MacOS/IDEiPhoneSupport, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., NSLocalizedDescription=Loading a plug-in failed., NSFilePath=/Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/IDEiPhoneSupport.ideplugin, NSLocalizedFailureReason=The plug-in \U201ccom.apple.dt.IDE.IDEiPhoneSupport\U201d at path \U201c/Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/IDEiPhoneSupport.ideplugin\U201d could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x40033a480 \"The bundle \U201cIDEiPhoneSupport\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.\"}";
}
Hints: None
Backtrace:
0 0x00007fff97fe3634 __exceptionPreprocess (in CoreFoundation)
1 0x00007fff8db0c6de objc_exception_throw (in libobjc.A.dylib)
2 0x0000000106012e16 -[DVTExtension valueForKey:] (in DVTFoundation)
ect....
Instead of trying to run Xcode 4, I suggest you run Xcode 5 or 6 but install the iOS 6 SDK so you can compile your iOS 6 SDK app on Xcode 5 or 6.
Be aware that Apple will not accept any app submission with SDK < 8 after February 2015. Apps also need to be 64-bit as well (of course, you're still allowed to ship a dual 32-bit/64-bit app).

iOS Simulator Crash in xcode 5.1

Simulator crash occurs frequently while running app and also using in build app like maps , safari , settings etc.. .
The error response is shared below
Process: iPhone Simulator [2454]
Path: /Applications/Xcode 5.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator
Identifier: com.apple.iphonesimulator
Version: 7.1 (463.9.41)
Build Info: Indigo-463009041000000~2
Code Type: X86-64 (Native)
Parent Process: launchd [182]
Responsible: iPhone Simulator [2454]
User ID: 850824327
Date/Time: 2014-07-30 14:47:41.082 +0530
OS Version: Mac OS X 10.9.3 (13D65)
Report Version: 11
Anonymous UUID: F291053A-A0B0-6AF4-1BF0-5D6C2199246F
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000001
VM Regions Near 0x1:
-->
__TEXT 00000001082b4000-00000001082f2000 [ 248K] r-x/rwx SM=COW /Applications/Xcode 5.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone Simulator
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.AppKit 0x00007fff88f2a702 -[NSThemeFrame
Reset Content and Settings of your simulator and try again. If it doesn't work try this : delete the derived data from Xcode folder in this path : user/lib/xcode/derived data.

Xcode 5.0.2 crashes on start-up (OSAKit plugin - code signature invalid)

Today Xcode is crashing for me every time I start it up. When I last used it last week it was working fine and I haven't changed anything.
I've tried reinstalling Xcode but it has made no difference. Does anybody have any ideas how I can get it working again?
Process: Xcode [1062]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 5.0.2 (3335.32)
Build Info: IDEApplication-3335032000000000~4
App Item ID: 497799835
App External ID: 106632651
Code Type: X86-64 (Native)
Parent Process: launchd [260]
Responsible: Xcode [1062]
User ID: 501
PlugIn Path: /System/Library/Frameworks/OSAKit.framework/Versions/A/OSAKit
PlugIn Identifier: com.apple.OSAKit
PlugIn Version: 1.4 (89)
Date/Time: 2014-01-14 14:09:05.686 +0000
OS Version: Mac OS X 10.9.1 (13B42)
Report Version: 11
Anonymous UUID: B2D995CA-38C1-0B1C-DA4E-8DD870BE2A37
Crashed Thread: 0 Dispatch queue: DVTPlugInExtensionFaultingLock
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
VM Regions Near 0x7fff7692ee40 (cr2):
__DATA 00007fff7691b000-00007fff76920000 [ 20K] rw-/rwx SM=COW /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
--> __DATA 00007fff76920000-00007fff76936000 [ 88K] rw-/rwx SM=COW /System/Library/Frameworks/OSAKit.framework/Versions/A/OSAKit
__DATA 00007fff76936000-00007fff76937000 [ 4K] rw-/rwx SM=COW /usr/lib/system/libsystem_m.dylib
Application Specific Information:
ProductBuildVersion: 5A3005
As pointed out by trojanfoe in the comment above, the OSAKit framework had become corrupted somehow. Copying an uncorrupted version of the files from another machine fixed the problem.

iOS App crashes under 3.1.3 when compiled with LLVM2

I have an iOS app with the following (selected) build settings in XCode 4.0.1:
Architecture = Standard (armv6 armv7)
Base SDK = Latest iOS (iOS 4.3)
iOS Deployment Target = iOS3.1
Other linker flags = -lxml2 -weak-library /usr/lib/libSystem.B.dylib
Under Targets/Build Phases, I have libSystem.B.dylib as Optional (Link Binary With Libraries).
On a 1st gen iPod Touch, I'm getting the following results:
Debug Build, C/C++ Compiler Version = LLVM Compiler 2.0, all OK
Ad Hoc Release Build, C/C++ Compiler Version = GCC 4.2, all OK
Ad Hoc Release Build, C/C++ Compiler Version = LLVM GCC 4.2, all OK
Ad Hoc Release Build, C/C++ Compiler Version = LLVM Compiler 2.0, crash a few seconds after starting.
In case 4., the crash report looks like this:
Incident Identifier: 10B8B9C5-0FA5-4C83-AB13-4C3F59D5962D
CrashReporter Key: 29f7901a33e9b055c9034cd051902ea0c87e61f6
Process: TPE [1484]
Path: /var/mobile/Applications/4FA4C8CA-DB5D-4096-8458-C76382E68D02/TPE.app/TPE
Identifier: TPE
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-04-09 17:56:58.188 +1000
OS Version: iPhone OS 3.1.3 (7E18)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0000000000 0 + 0
Thread 1:
0 libSystem.B.dylib 0x00001488 mach_msg_trap + 20
1 libSystem.B.dylib 0x00004064 mach_msg + 60
etc.
The crash happens after a number of routines in my code have executed (I can see console output confirming it).
Does anyone have any ideas what would cause this to work under GCC4.2, but crash under LLVM2?
It's just a wild guess, but there was a compiler bug recently in llvm2 that made our app crash the same way. It only happened in release mode with full optimization and only on older devices (probably a specific processor). We switched back to gcc and everything was fine again. Apple updated their compiler in mean time which "fixes bugs for iOS", but we didn't test it yet.
The same problem still occurs with XCode 4.2 (4D199) when code is generated with Apple LLVM compiler 3.0.
AdHoc App works fine on iOS5 on simulator, iPad1 and iPhone4.
Same AdHoc code crashes on iPhone 3 and iPod3 on iOS 4.2.1 (8C148).
Debug code works fine on all platforms.
When the problem occurs the console log shows the following:
SpringBoard[25] <Warning>: Received memory warning. Level=1
MobileSafari[283] <Warning>: Received memory warning. Level=1
configd[23] <Notice>: jetsam: kernel memory event (93), free: 241, active: 1109, inactive: 760, purgeable: 0, wired: 7878
configd[23] <Notice>: jetsam: kernel termination snapshot being created
com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilesafari[0xc614]) Exited: Killed
com.apple.launchd[1] <Notice>: (UIKitApplication:com.myapp.test[0x47db]) Exited: Killed
SpringBoard[25] <Warning>: Application 'MyApp' exited abnormally with signal 9: Killed
Peak memory usage of the App is a couple Mb. The debug code never reaches a critical memory limit.
The problem disappears when either:
Optimization Level for AdHoc is set to None (-O0)
The compiler is changed to LLVM GCC 4.2
So far, extensive analyzes of code and memory management have not provided an indication what might be causing this. It seems like a compiler bug...

Resources