Xcode 12 crash when building

I have updated to Xcode 12 GM, and Xcode crashes when I try build my project.

Process: Xcode [89536]
Path: /Applications/Xcode 12.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.0 (17219)
Build Info: IDEFrameworks-17219000000000000~2 (12A7209)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [89536]
User ID: 501
Date/Time: 2020-09-21 20:38:11.427 -0300
OS Version: Mac OS X 10.15.6 (19G2021)
Report Version: 12
Bridge OS Version: 4.6 (17P6610)

Time Awake Since Boot: 12000 seconds
Time Since Wake: 2 seconds

System Integrity Protection: enabled

Crashed Thread: 18 Dispatch queue: XCBuild.XCBBuildOperation.buildOperationHandlerQueue

Exception Type: EXCBADINSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXCCORPSENOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [89536]

Application Specific Information:
dyld: in dlopenpreflight()
ProductBuildVersion: 12A7209

Thread 0:: Dispatch queue: com.apple.main-thread
0 com.apple.dt.IDEFoundation 0x000000010ac9f6ff -[IDEActivityLogChangeEvent initWithSection:] + 91
1 com.apple.dt.IDEFoundation 0x000000010aca0957 -[IDEActivityLogStopRecordingChangeEvent initWithSection:supersections:] + 83
2 com.apple.dt.IDEFoundation 0x000000010aca0e19 +[IDEActivityLogChangeEvent(RecordingMethods) stopRecordingEventWithSection:supersections:] + 74
3 com.apple.dt.IDEFoundation 0x000000010a7dcbd5
99-[IDEActivityLogSectionRecorder stopRecordingWithResultCode:wasCancelled:duration:completionBlock:]blockinvoke + 955
4 com.apple.dt.DVTFoundation 0x0000000109e5f2ba DVT
CALLINGCLIENTBLOCK + 7
5 com.apple.dt.DVTFoundation 0x0000000109e61924 _DVTDispatchSyncblockinvoke + 99
6 libdispatch.dylib 0x00007fff6f745658
dispatchclientcallout + 8
7 libdispatch.dylib 0x00007fff6f7517ab dispatchasyncandwaitinvoke + 87
8 libdispatch.dylib 0x00007fff6f745658
dispatchclientcallout + 8
9 libdispatch.dylib 0x00007fff6f750cab dispatchmainqueuecallback4CF + 936
10 com.apple.CoreFoundation 0x00007fff35772e81 CFRUNLOOP
ISSERVICINGTHEMAINDISPATCHQUEUE + 9
11 com.apple.CoreFoundation 0x00007fff35732c87
CFRunLoopRun + 2028
12 com.apple.CoreFoundation 0x00007fff35731e3e CFRunLoopRunSpecific + 462
13 com.apple.HIToolbox 0x00007fff3435eabd RunCurrentEventLoopInMode + 292
14 com.apple.HIToolbox 0x00007fff3435e7d5 ReceiveNextEventCommon + 584
15 com.apple.HIToolbox 0x00007fff3435e579
BlockUntilNextEventMatchingListInModeWithFilter + 64
16 com.apple.AppKit 0x00007fff329a4039 DPSNextEvent + 883
17 com.apple.AppKit 0x00007fff329a2880 -[NSApplication(NSEvent)
nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
18 com.apple.dt.DVTKit 0x000000010a4dfbd0 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 421
19 com.apple.AppKit 0x00007fff3299458e -[NSApplication run] + 658
20 com.apple.AppKit 0x00007fff32966396 NSApplicationMain + 777
21 libdyld.dylib 0x00007fff6f79ecc9 start + 1

I'm on the same boat :/
My projects no longer build on Xcode 12, they work fine on XCode 11.7, which I luckily still have around

I've been trying everything, but without a shred of indication of what's going on I'm absolutely lost
Reverting to the legacy build system does not help
Sometimes Xcode doesn't crash but still doesn't build, spitting out "unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace." instead.
Same :(
I'm facing the same issue too.
It was working fine till Xcode 12 beta 2 but since beta 3 it is crashing. Tried many things but not able to get to a conclusion.

Code Block Process: Xcode [2742]
Path: /Users/USER/Downloads/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.0 (17219)
Build Info: IDEFrameworks-17219000000000000~2 (12A7209)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [2742]
User ID: 882789207
Date/Time: 2020-09-28 16:24:52.905 -0400
OS Version: Mac OS X 10.15.4 (19E287)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)
Anonymous UUID: 42335963-5875-5860-05E1-3D2F68B041CF
Time Awake Since Boot: 780 seconds
System Integrity Protection: enabled
Crashed Thread: 19 Dispatch queue: XCBuild.XCBBuildOperation.buildOperationHandlerQueue
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [2742]
Application Specific Information:
ProductBuildVersion: 12A7209
Thread 0:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff348ee871 _CFRelease + 502
1 com.apple.CoreFoundation 0x00007fff348619ee CFRunLoopTimerSetNextFireDate + 472
2 com.apple.CoreFoundation 0x00007fff348224f5 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
3 com.apple.CoreFoundation 0x00007fff34822427 __CFRunLoopDoObservers + 457


Any apple developer here who can please look into this?
Same too, Any Response yet ? :(
I'm having the same issue, has anyone been able to find any solution?
After 2 weeks of research we were able to solve this.
We had objective c code in our code base - NSUserActivity+MediaPlayerAdditions.h
commenting out all the code from that file solved the issue.

Code Block #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSUserActivity (MediaPlayerAdditions)
/// A unique identifier relative to the app's media content catalog for the displayed media item.
@property (nonatomic, copy, nullable) NSString *externalMediaContentIdentifier NS_AVAILABLE_IOS(10_1) TVOS_AVAILABLE(10_0_1) WATCHOS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END

Hope this will help something solving this.
Xcode 12 crash when building
 
 
Q