Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

cannot launch Xcode app

When I try to launch Xcode app, it takes loop with "Xcode quit unexpectedly".


Here is problem report for xcode.


Process: Xcode [7557]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 15.3 (22618)
Build Info: IDEApplication-22618000000000000~2 (15E204a)
App Item ID: 497799835
App External ID: 863955376
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
...
Time Awake Since Boot: 42000 seconds
Time Since Wake: 12456 seconds

System Integrity Protection: enabled

Crashed Thread: 9 Dispatch queue: */O work queue (1)

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [7557]

Application Specific Information:
abort() called


Application Specific Signatures:
success

...

Thread 9 Crashed:: Dispatch queue: */O work queue (1)
0 libsystem_kernel.dylib 0x18cccea60 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18cd06c20 pthread_kill + 288
2 libsystem_c.dylib 0x18cc13a20 abort + 180
3 IDEKit 0x1060a7b64 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 972
4 IDEKit 0x1060a7fa4 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 872
5 DVTFoundation 0x10269a73c _DVTAssertionHandler + 424
6 DVTFoundation 0x10269a8bc _DVTAssertionFailureHandler + 196
7 DVTFoundation 0x102560410 +[DVTFilePath _filePathForParent:pathString:] + 512
8 DVTFoundation 0x102560a9c -[DVTFilePath filePathForRelativePathString:] + 48
9 IDEFoundation 0x107a81648 __51-[_IDEFolderContents _updateContentsFromFileSystem]_block_invoke + 20
10 DVTFoundation 0x102694700 -[NSArray(DVTFoundationClassAdditions) dvt_arrayByApplyingBlock:] + 224
11 IDEFoundation 0x107a815d4 -[_IDEFolderContents _updateContentsFromFileSystem] + 152
12 IDEFoundation 0x107a813dc __32+[_IDEFolderContents initialize]_block_invoke + 16
13 DVTFoundation 0x1027ff7f4 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed NSObject) -> () + 24
14 DVTFoundation 0x1027fea54 specialized UniquingOrderedWorkQueue._performWorkBlockOnItems() + 108
15 DVTFoundation 0x1027fe988 specialized closure #2 in UniquingOrderedWorkQueue._schedule(numberOfItems:) + 32
16 DVTFoundation 0x102800cb4 partial apply for specialized closure #2 in UniquingOrderedWorkQueue._schedule(numberOfItems:) + 24
17 DVTFoundation 0x1027476f4 thunk for @escaping @callee_guaranteed () -> () + 28
18 DVTFoundation 0x1026e0598 __DVT_CALLING_CLIENT_BLOCK__ + 16
19 DVTFoundation 0x1026e0fc0 __DVTDispatchAsync_block_invoke + 152
20 libdispatch.dylib 0x18cb54750 _dispatch_call_block_and_release + 32
21 libdispatch.dylib 0x18cb563e8 _dispatch_client_callout + 20
22 libdispatch.dylib 0x18cb5da14 _dispatch_lane_serial_drain + 748
23 libdispatch.dylib 0x18cb5e578 _dispatch_lane_invoke + 432
24 libdispatch.dylib 0x18cb692d0 _dispatch_root_queue_drain_deferred_wlh + 288
25 libdispatch.dylib 0x18cb68b44 _dispatch_workloop_worker_thread + 404
26 libsystem_pthread.dylib 0x18cd0300c _pthread_wqthread + 288
27 libsystem_pthread.dylib 0x18cd01d28 start_wqthread + 8

...

Does anyone handle this problem??

MacBook Pro 14″, macOS 14.4

Posted on May 13, 2024 6:40 PM

Reply
4 replies

May 13, 2024 11:51 PM in response to seowo_

This is a user-to-user forum. Apple largely is not here. Xcode is an Apple product, so you'd want to report crashes to Apple – or possibly to post crash reports in the Apple Developer forums.


I can make an educated guess what's going on here, but I am not an Apple employee, and don't have access to any Xcode IDE source code.


This crash happened because of an assertion failure. That is, the code detected some condition that should never occur – so instead of having it limp on, the developers had it intentionally crash itself. There is a school of thought that it is better to have crashes (which result in customers complaining, and hopefully in the bug being found, and fixed) than to limp on in some bad state that may snowball into even worse things.


The interesting part of the stack trace is


7 DVTFoundation 0x102560410 +[DVTFilePath _filePathForParent:pathString:] + 512
8 DVTFoundation 0x102560a9c -[DVTFilePath filePathForRelativePathString:] + 48
9 IDEFoundation 0x107a81648 __51-[_IDEFolderContents _updateContentsFromFileSystem]_block_invoke + 20
10 DVTFoundation 0x102694700 -[NSArray(DVTFoundationClassAdditions) dvt_arrayByApplyingBlock:] + 224
11 IDEFoundation 0x107a815d4 -[_IDEFolderContents _updateContentsFromFileSystem] + 152


The name of the method "filePathForRelativePathString" suggests that its job is to take a relative file name and to figure out the corresponding absolute file path. My guess (not having seen source code) is that this code expects its input to have been validated; and if the caller lets certain types of unvalidated strings through, it sees that, and intentionally crashes.


All this is something for Apple's developers (who have access to debugging tools and source code) to figure out. But my guess is that a bad filename (or buggy code that failed to translate between Finder and Unix filenames) is tied up with this somehow.


If there's a newer version of Xcode that runs on your system, have you tried installing it?

May 15, 2024 6:24 PM in response to seowo_

If Xcode 15.4 doesn’t clear this, please download and run EtreCheck and share the report to the clipboard, and then open a new reply here and press the Additional Text button (that looks like a printed page) to get a text input box big enough to paste the hardware and software configuration report here, and paste and post that here.


Usual suspects are add-on security apps, add-on anti-malware apps, add-on VPN client apps, and such.

cannot launch Xcode app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.