Cannot generate C++ project on OSX

I have compiled the engine from source code successfully, and started the editor and generated blueprint projects without any problem. However when I create a C++ project, the following error occurred (I’m using Xcode 7.2 on EI Capitan):

Running Mono…

Setting up Mono
~/UnrealEngine/Engine ~/UnrealEngine/Engine/Binaries/Mac
Stacktrace:

Native stacktrace:

Debug info from gdb:

(lldb) command source -s 0 ‘/tmp/mono-gdb-commands.ZbBUf1’
Executing commands in ‘/tmp/mono-gdb-commands.ZbBUf1’.
(lldb) process attach --pid 55924
Process 55924 stopped

  • thread #1: tid = 0x32ad172, 0x00007fff8c90967e libsystem_kernel.dylib__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fff8c90967e libsystem_kernel.dylib__wait4 + 10
    libsystem_kernel.dylib`__wait4:
    → 0x7fff8c90967e <+10>: jae 0x7fff8c909688 ; <+20>
    0x7fff8c909680 <+12>: movq %rax, %rdi
    0x7fff8c909683 <+15>: jmp 0x7fff8c903c02 ; cerror
    0x7fff8c909688 <+20>: retq

Executable module set to “/Users/hoolai/UnrealEngine/Engine/Build/BatchFiles/Mac/…/…/…/Binaries/ThirdParty/Mono/Mac/bin/mono”.
Architecture set to: x86_64-apple-macosx.
(lldb) thread list
Process 55924 stopped

  • thread #1: tid = 0x32ad172, 0x00007fff8c90967e libsystem_kernel.dylib__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP thread #2: tid = 0x32ad205, 0x00007fff8c9033c2 libsystem_kernel.dylibsemaphore_wait_trap + 10
    thread #3: tid = 0x32ad206, 0x00007fff8c9096de libsystem_kernel.dylib__workq_kernreturn + 10 thread #4: tid = 0x32ad207, 0x00007fff8c909ff6 libsystem_kernel.dylibkevent_qos + 10, queue = ‘com.apple.libdispatch-manager’
    (lldb) thread backtrace all

  • thread #1: tid = 0x32ad172, 0x00007fff8c90967e libsystem_kernel.dylib`__wait4 + 10, queue = ‘com.apple.main-thread’, stop reason = signal SIGSTOP

    • frame #0: 0x00007fff8c90967e libsystem_kernel.dylib__wait4 + 10 frame #1: 0x000000010011a5d2 monomono_handle_native_sigsegv + 626
      frame #2: 0x00000001001ddfbd monomono_arch_handle_altstack_exception + 125 frame #3: 0x00000001000121a4 monomono_sigsegv_signal_handler + 788
      frame #4: 0x00007fff8f252eaa libsystem_platform.dylib`_sigtramp + 26

    thread #2: tid = 0x32ad205, 0x00007fff8c9033c2 libsystem_kernel.dylibsemaphore_wait_trap + 10 frame #0: 0x00007fff8c9033c2 libsystem_kernel.dylibsemaphore_wait_trap + 10
    frame #1: 0x000000010038277a monomono_sem_wait + 26 frame #2: 0x00000001003088f4 monofinalizer_thread + 196
    frame #3: 0x00000001002d50e4 monostart_wrapper_internal + 740 frame #4: 0x00000001002d4df1 monostart_wrapper + 33
    frame #5: 0x000000010038a551 monoinner_start_thread + 577 frame #6: 0x00000001003a6d6e monoGC_start_routine + 110
    frame #7: 0x000000010063b9f9 libsystem_pthread.dylib_pthread_body + 131 frame #8: 0x000000010063b976 libsystem_pthread.dylib_pthread_start + 168
    frame #9: 0x0000000100638fbd libsystem_pthread.dylib`thread_start + 13

    thread #3: tid = 0x32ad206, 0x00007fff8c9096de libsystem_kernel.dylib__workq_kernreturn + 10 frame #0: 0x00007fff8c9096de libsystem_kernel.dylib__workq_kernreturn + 10
    frame #1: 0x000000010063b4f2 libsystem_pthread.dylib_pthread_wqthread + 1283 frame #2: 0x0000000100638fad libsystem_pthread.dylibstart_wqthread + 13

    thread #4: tid = 0x32ad207, 0x00007fff8c909ff6 libsystem_kernel.dylibkevent_qos + 10, queue = 'com.apple.libdispatch-manager' frame #0: 0x00007fff8c909ff6 libsystem_kernel.dylibkevent_qos + 10
    frame #1: 0x00000001005df9cf libdispatch.dylib_dispatch_mgr_invoke + 216 frame #2: 0x00000001005df55b libdispatch.dylib_dispatch_mgr_thread + 52
    (lldb) detach

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

Process 55924 detached
(lldb) quit
/Users/hoolai/UnrealEngine/Engine/Build/BatchFiles/Mac/RunMono.sh: line 23: 55924 Abort trap: 6 mono “$@”

Hello hszhsh,

Have you used any previous versions of UE4 and, if so, were you able to create code projects in those versions? Also, could you try navigating to the project folder, opening the workspace file and compiling directly in XCode? I’m curious to see if you get any different output from there. I’m assuming this message you gave was from the window that pops up after the project creation fails.

Could you also try making a new blueprint project and then adding a new C++ class to it to see what the results are there?

I’ve used version 4.5 without any problem.
I created a blueprint project and the added a new C++ class, then generated workspace file with GenerateProjectFiles.sh script, and compiled directly in XCode. It’s OK. However similar error was reported when I run Cook Content for Mac from the Editor’s file menu

I have managed to cook content in the command line, but it won’t work in the editor.

Could you post the logs from when this problem occurs? You can find them in the project’s directory under Saved > Logs

We haven’t heard from you in a while, hszhsh. Are you still experiencing this issue? If so, could you provide the logs as I asked for in my previous post? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

I did not find Logs in the project’s Saved directory. I have changed a computer, and it works fine. I think there must be something wrong with my software environment.