XCode Quits Unexpectedly When Running Code Through a Second Time.

I am new to coding and I am working on a project that incorporates three files. While running the code on XCode, everything works as expected until I run to completion and attempt to run the code again. Everytime I run through the code all the way, and hit the play button again, the app quits unexpectedly with the following Problem Report. This same code did not have the same problems when I ran it through XCode version 14.3, but always does on XCode on version 15.0.


Translated Report (Full Report Below)

Process: Xcode [3228] Path: /Applications/Xcode 15.0.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 15.0 (22265) Build Info: IDEApplication-22265000000000000~3 (15A240d) App Item ID: 497799835 App External ID: 859515098 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2023-09-26 16:11:58.5501 -0400 OS Version: macOS 14.0 (23A344) Report Version: 12 Anonymous UUID: 39956118-B5D9-942D-446C-1EB71E28673B

Sleep/Wake UUID: 8501A0C3-6A36-4534-A018-F5A0315B16B0

Time Awake Since Boot: 5000 seconds Time Since Wake: 1121 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

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

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

Application Specific Information: abort() called

Same issue here, consistently happening with a simple one file C program. Also, a student of mine has same issue. Appeared when updated Xcode to version 15.

To reproduce, create a simple C project and run it. Let the app finish, then run it again --> Xcode crashes.

Here is the relevant crash report:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Xcode [6690]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               15.0 (22265)
Build Info:            IDEApplication-22265000000000000~3 (15A240d)
App Item ID:           497799835
App External ID:       859515098
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-09-27 09:48:24.5847 +0300
OS Version:            macOS 14.0 (23A344)
Report Version:        12
Anonymous UUID:        5B7DC7A8-5AAC-B40C-2646-2B1C20EE288A


Time Awake Since Boot: 43000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

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

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

Application Specific Information:
abort() called


Application Specific Signatures:
NSInvalidArgumentException

Application Specific Backtrace 0:
0   CoreFoundation                      0x000000018ba948c0 __exceptionPreprocess + 176
1   DVTFoundation                       0x0000000103f53e30 DVTFailureHintExceptionPreprocessor + 388
2   libobjc.A.dylib                     0x000000018b58deb4 objc_exception_throw + 60
3   CoreFoundation                      0x000000018bb86b3c -[__NSCFString characterAtIndex:].cold.1 + 0
4   CoreFoundation                      0x000000018ba0bf54 -[NSConstantDictionary objectForKey:] + 0
5   SourceEditor                        0x0000000123bcc3ec $s12SourceEditor0ab4DataA0C17deleteTextInRangeyAA0aB8PositionVSnyAFGF + 2300
6   IDEConsoleKit                       0x00000001179f2fb4 $s13IDEConsoleKit0A4ViewC21removeAllConsoleItems33_16D2ADED863F10BE3A741D5B18B494B7LLyyF + 516
7   IDEConsoleKit                       0x00000001179f0c7c $s13IDEConsoleKit0A4ViewC10setMatchesyySaySo0A4ItemCGF + 712
8   IDEConsoleKit                       0x00000001179aa328 $s13IDEConsoleKit0A13FilterManagerC13filterConsole33_2971D1EE5E4DDD5D099E1A896C78B97ALL011incrementalC0ySb_tFyycfU1_ + 128
9   IDEConsoleKit                       0x0000000117993158 $sIeg_IeyB_TR + 28
10  DVTFoundation                       0x0000000103ff2a48 $sIeg_IeyB_TR + 28
11  DVTFoundation                       0x0000000103f97330 __DVT_CALLING_CLIENT_BLOCK__ + 16
12  DVTFoundation                       0x0000000103f97cf0 __DVTDispatchAsync_block_invoke + 48
13  libdispatch.dylib                   0x000000018b793cb8 _dispatch_call_block_and_release + 32
14  libdispatch.dylib                   0x000000018b795910 _dispatch_client_callout + 20
15  libdispatch.dylib                   0x000000018b7a3fa8 _dispatch_main_queue_drain + 984
16  libdispatch.dylib                   0x000000018b7a3bc0 _dispatch_main_queue_callback_4CF + 44
17  CoreFoundation                      0x000000018ba61220 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
18  CoreFoundation                      0x000000018ba1eaac __CFRunLoopRun + 1996
19  CoreFoundation                      0x000000018ba1dc2c CFRunLoopRunSpecific + 608
20  HIToolbox                           0x0000000195f76448 RunCurrentEventLoopInMode + 292
21  HIToolbox                           0x0000000195f76284 ReceiveNextEventCommon + 648
22  HIToolbox                           0x0000000195f75fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
23  AppKit                              0x000000018f1f8f90 _DPSNextEvent + 660
24  AppKit                              0x000000018f9ccb94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
25  DVTKit                              0x0000000102e08a9c -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 300
26  AppKit                              0x000000018f1ec43c -[NSApplication run] + 476
27  DVTKit                              0x0000000102e07cbc -[DVTApplication run] + 60
28  AppKit                              0x000000018f1c3708 NSApplicationMain + 880
29  dyld                                0x000000018b5c9058 start + 2224


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18b90b11c __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18b942cc0 pthread_kill + 288
2   libsystem_c.dylib             	       0x18b852a50 abort + 180
3   IDEKit                        	       0x107a60d58 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 972
4   IDEKit                        	       0x107a61e88 -[IDEAssertionHandler handleUncaughtException:] + 596
5   IDEKit                        	       0x107a621b8 IDEHandleUncaughtException + 68
6   CoreFoundation                	       0x18bb38f84 __handleUncaughtException + 800
7   libobjc.A.dylib               	       0x18b597888 _objc_terminate() + 132
8   libc++abi.dylib               	       0x18b8f9a9c std::__terminate(void (*)()) + 16
9   libc++abi.dylib               	       0x18b8f9a40 std::terminate() + 56
10  libdispatch.dylib             	       0x18b795924 _dispatch_client_callout + 40
11  libdispatch.dylib             	       0x18b7a3fa8 _dispatch_main_queue_drain + 984
12  libdispatch.dylib             	       0x18b7a3bc0 _dispatch_main_queue_callback_4CF + 44
13  CoreFoundation                	       0x18ba61220 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
14  CoreFoundation                	       0x18ba1eaac __CFRunLoopRun + 1996
15  CoreFoundation                	       0x18ba1dc2c CFRunLoopRunSpecific + 608
16  HIToolbox                     	       0x195f76448 RunCurrentEventLoopInMode + 292
17  HIToolbox                     	       0x195f76284 ReceiveNextEventCommon + 648
18  HIToolbox                     	       0x195f75fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
19  AppKit                        	       0x18f1f8f90 _DPSNextEvent + 660
20  AppKit                        	       0x18f9ccb94 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
21  DVTKit                        	       0x102e08a9c -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 300
22  AppKit                        	       0x18f1ec43c -[NSApplication run] + 476
23  DVTKit                        	       0x102e07cbc -[DVTApplication run] + 60
24  AppKit                        	       0x18f1c3708 NSApplicationMain + 880
25  dyld                          	       0x18b5c9058 start + 2224

I have also been encountering this problem. I thought it was a mistake I made, but I'm happy to know it's not just me. I believe the error is occurring because of a bug created by the new update, not something you did.

Well suddenly this crash went away without any explicit update from me.

XCode Quits Unexpectedly When Running Code Through a Second Time.
 
 
Q