New cocos2dx project makes Xcode crash

Hello,

I just updated to latest MacOS and Xcode and created a new cocos2dx project from the latest git clone from v3 branch.

Simply opening the created project makes Xcode crash.

Can anyone help?
I added bellow the stack trace for the crashed thread:
Process: Xcode [1547]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.4 (14160)
Build Info: IDEFrameworks-14160000000000000~21
App Item ID: 497799835
App External ID: 827228858
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1547]
User ID: 501

Date/Time:             2018-06-01 02:02:55.686 +0300
OS Version:            Mac OS X 10.13.4 (17E202)
Report Version:        12
Anonymous UUID:        1E010222-31D3-4BF1-6789-DFC3DE8C1919

Sleep/Wake UUID:       D6A7B45E-C94C-4526-BB02-D4D2F762F90C

Time Awake Since Boot: 8400 seconds
Time Since Wake:       3500 seconds

System Integrity Protection: enabled

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

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 [0]

Application Specific Information:
ProductBuildVersion: 9F1027a

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.MarkupSupport       	0x0000000127d85309 closeReference #1 () in MarkupLanguageService.updateLandmarks() + 1273
1   com.apple.MarkupSupport       	0x0000000127d8caee specialized process #1 (token:) in MarkupLanguageService.updateLandmarks() + 6062
2   com.apple.MarkupSupport       	0x0000000127d84855 MarkupLanguageService.updateLandmarks() + 1365
3   com.apple.MarkupSupport       	0x0000000127d842b2 MarkupLanguageService.landmarks() + 18
4   com.apple.MarkupSupport       	0x0000000127d85da9 protocol witness for SourceEditorLanguageService.landmarks() in conformance MarkupLanguageService + 9
5   com.apple.dt.IDESourceEditor  	0x00000001276927d0 SourceCodeDocument.updateLandmarks() + 192
6   com.apple.dt.IDESourceEditor  	0x000000012757bec3 SourceCodeEditor.updateSelectionDisplay() + 323
7   com.apple.dt.IDESourceEditor  	0x00000001275749ce closure #8 in SourceCodeEditor.prepareForDocument() + 46
8   com.apple.dt.IDESourceEditor  	0x00000001275bdcac partial apply for closure #8 in SourceCodeEditor.prepareForDocument() + 12
9   com.apple.dt.IDESourceEditor  	0x000000012756ef04 _T010Foundation12NotificationVIegi_So14NSNotificationCIeyBy_TR + 68
10  com.apple.dt.DVTFoundation    	0x000000010f88bf0a __106-[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_addObserverForName:object:queue:usingBlock:]_block_invoke + 112
11  com.apple.Foundation          	0x00007fff381fc640 -[__NSObserver _doit:] + 303
12  com.apple.CoreFoundation      	0x00007fff360e161c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
13  com.apple.CoreFoundation      	0x00007fff360e14ea _CFXRegistrationPost + 458
14  com.apple.CoreFoundation      	0x00007fff360e1221 ___CFXNotificationPost_block_invoke + 225
15  com.apple.CoreFoundation      	0x00007fff3609fd72 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
16  com.apple.CoreFoundation      	0x00007fff3609ee03 _CFXNotificationPost + 659
17  com.apple.Foundation          	0x00007fff381bb8c7 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
18  com.apple.dt.DVTFoundation    	0x000000010f88c4da -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 361
19  com.apple.dt.IDESourceEditor  	0x00000001275d9600 IDESourceEditorView.selectionDidChange(from:) + 112
20  com.apple.dt.SourceEditor     	0x00000001278c5fd0 _T012SourceEditor0aB4ViewC9selectionAA0aB9SelectionOSgvWTf4gn_n + 848
21  com.apple.dt.SourceEditor     	0x00000001278c6317 specialized SourceEditorView.setSelection(_:scrollPlacement:alwaysScroll:) + 791
22  com.apple.dt.SourceEditor     	0x00000001278b822d SourceEditorView.selectTextRange(_:scrollPlacement:alwaysScroll:) + 701
23  com.apple.dt.SourceEditor     	0x00000001278b8279 SourceEditorView.selectTextPosition(_:scrollPlacement:alwaysScroll:) + 41
24  com.apple.dt.IDESourceEditor  	0x000000012757558e SourceCodeEditor.didSetupEditor() + 782
25  com.apple.dt.IDESourceEditor  	0x000000012758654b @objc SourceCodeEditor.loadView() + 27
26  com.apple.dt.IDEKit           	0x000000011121d2a0 -[IDEEditorContext _notifyDelegateAndOpenNavigableItem:withContentsURL:documentExtensionIdentifier:locationToSelect:annotationRepresentedObject:stateDictionary:annotationWantsIndicatorAnimation:exploreAnnotationRepresentedObject:highlightSelection:alwaysReplaceExistingNavigableItem:skipSubDocumentNavigationUnlessEditorIsReplaced:] + 3413
27  com.apple.dt.IDEKit           	0x000000011121f6f2 -[IDEEditorContext _notifyDelegateAndOpenEditorOpenSpecifier:updateHistory:] + 1053
28  com.apple.dt.IDEKit           	0x0000000111214555 -[IDEEditorContext openEditorOpenSpecifier:updateHistory:] + 503
29  com.apple.dt.IDEKit           	0x0000000111214a73 -[IDEEditorContext openEditorOpenSpecifier:] + 251
30  com.apple.dt.IDEKit           	0x000000011167db78 -[IDEEditorModeViewController openEditorOpenSpecifier:editorContext:] + 41
31  com.apple.dt.IDEKit           	0x0000000111293798 -[IDEEditorArea _openEditorOpenSpecifier:editorContext:takeFocus:] + 382
32  com.apple.dt.IDEKit           	0x000000011127cec8 __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke_2 + 165
33  com.apple.dt.IDEKit           	0x000000011127ca2c +[IDEEditorCoordinator _shouldNavigateAwayFromEditorContext:block:] + 107
34  com.apple.dt.IDEKit           	0x000000011127cdac __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke + 169
35  com.apple.dt.IDEKit           	0x000000011127c52b +[IDEEditorCoordinator _doOpenWithWorkspaceTabController:editorContext:target:allowFallback:documentURL:usingBlock:] + 1465
36  com.apple.dt.IDEKit           	0x000000011127cc60 +[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:] + 442
37  com.apple.dt.IDEKit           	0x0000000111282390 -[_IDEOpenRequest _primitiveRunIfNecessary] + 717
38  com.apple.dt.IDEKit           	0x0000000111281f74 -[_IDEOpenRequest _runIfNecessary] + 107
39  com.apple.dt.IDEKit           	0x00000001112825db -[_IDEOpenRequest _enqueueForEventBehavior:] + 305
40  com.apple.dt.IDEKit           	0x000000011127d5dc +[IDEEditorCoordinator _openRequestForEditorOpenSpecifier:workspaceTabController:editorContext:eventBehavior:takeFocus:completionBlock:] + 187
41  com.apple.dt.IDEKit           	0x000000011127defa __115+[IDEEditorCoordinator _openEditorOpenSpecifier:forWorkspaceTabController:eventBehavior:takeFocus:completionBlock:]_block_invoke + 51
42  com.apple.dt.IDEKit           	0x000000011128179f +[IDEEditorCoordinator _performBlockInsideReentrantGuard:] + 51
43  com.apple.dt.IDEKit           	0x000000011127d9c7 +[IDEEditorCoordinator _openEditorOpenSpecifier:forWorkspaceTabController:eventBehavior:takeFocus:completionBlock:] + 661
44  com.apple.dt.IDEKit           	0x000000011127efb8 +[IDEEditorCoordinator _openEditorOpenSpecifier:forWorkspaceTabController:eventType:completionBlock:] + 190
45  com.apple.dt.IDEKit           	0x000000011127ee3a +[IDEEditorCoordinator openEditorOpenSpecifier:forWorkspaceTabController:eventType:] + 64
46  com.apple.dt.IDEKit           	0x000000011148d73f __44-[IDEStructureNavigator _revertWithoutState]_block_invoke.1387 + 110
47  com.apple.dt.DVTFoundation    	0x000000010f9207dc __DVTDispatchAsync_block_invoke + 97
48  libdispatch.dylib             	0x00007fff5e44d64a _dispatch_call_block_and_release + 12
49  libdispatch.dylib             	0x00007fff5e445e08 _dispatch_client_callout + 8
50  libdispatch.dylib             	0x00007fff5e4513e5 _dispatch_main_queue_callback_4CF + 1148
51  com.apple.CoreFoundation      	0x00007fff36109ea9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
52  com.apple.CoreFoundation      	0x00007fff360cc6ba __CFRunLoopRun + 2586
53  com.apple.CoreFoundation      	0x00007fff360cba07 CFRunLoopRunSpecific + 487
54  com.apple.HIToolbox           	0x00007fff353a9d96 RunCurrentEventLoopInMode + 286
55  com.apple.HIToolbox           	0x00007fff353a9b06 ReceiveNextEventCommon + 613
56  com.apple.HIToolbox           	0x00007fff353a9884 _BlockUntilNextEventMatchingListInModeWithFilter + 64
57  com.apple.AppKit              	0x00007fff3365ca73 _DPSNextEvent + 2085
58  com.apple.AppKit              	0x00007fff33df2e34 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
59  com.apple.dt.DVTKit           	0x000000010ff06fc0 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
60  com.apple.AppKit              	0x00007fff33651885 -[NSApplication run] + 764
61  com.apple.AppKit              	0x00007fff33620a72 NSApplicationMain + 804
62  com.apple.dt.Xcode            	0x000000010f66fa7e main + 350
63  libdyld.dylib                 	0x00007fff5e47f015 start + 1

What macOS specifically?

What version of XCode?

Did you also run all git steps and download-deps?

How did you create the new project?

Hello,

What macOS specifically?

It is the log above Mac OS X 10.13.4 (17E202)

What version of XCode?

Also in the log 9.4 (14160)

Did you also run all git steps and download-deps?

Yes

How did you create the new project?

I did the steps just as in documentation
$ cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

Eventually I got it working, I think the issue may be with cocos2dx project file.
So I renamed the cocos2dx project file then opened the project which did not load the cocos2dx project because I renamed it.
After that I renamed cocos2dx project file back to the correct name, while xcode was running => no crash.
Then closed Xcode and opened it again and the crash was gone.

For me it was 100% reproduction rate before the rename trick. Did you try using the latest version of Xcode and found it different?

Regards,
Cristian

What was the name and what did you change it to?