jacksondunstan / UnityNativeScripting

Unity Scripting in C++

Home Page:https://jacksondunstan.com/articles/3938

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MacOS il2cpp build thread problem

sekkit opened this issue · comments

Unity2018.4.5f1, build with il2cpp on. When exit the program, it crashes.

Path:                  /Users/USER/*/test.app/Contents/MacOS/test
Identifier:            unity.DefaultCompany.UnityPlayground
Version:               1.0 (0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           test [18850]
User ID:               501

Date/Time:             2019-08-04 02:37:15.592 +0800
OS Version:            Mac OS X 10.14.6 (18G87)
Report Version:        12
Anonymous UUID:        6DB50D53-DA47-9FD4-6E53-08D77FBA2524


Time Awake Since Boot: 70000 seconds

System Integrity Protection: disabled

Crashed Thread:        45  UnityPreload

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

Application Specific Information:
Assertion failed: (value != __null), function GetCurrentThread, file /Applications/Unity/Unity.app/Contents/il2cpp/libil2cpp/os/Thread.cpp, line 271.
 

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff66b1c9de __ulock_wait + 10
1   libsystem_pthread.dylib       	0x00007fff66bdd6de _pthread_join + 358
2   UnityPlayer.dylib             	0x000000010444753b PlatformThread::Join(Thread const*) + 283
3   UnityPlayer.dylib             	0x0000000104436a7a Thread::WaitForExit(bool) + 42
4   UnityPlayer.dylib             	0x000000010436519a PreloadManager::Stop() + 186
5   UnityPlayer.dylib             	0x0000000104349eba NotifyPlayerQuit(bool) + 298
6   UnityPlayer.dylib             	0x000000010434acda PlayerCleanup(bool) + 26
7   UnityPlayer.dylib             	0x0000000104bb8a52 DoQuit(bool) + 34
8   UnityPlayer.dylib             	0x0000000104bac95b -[PlayerAppDelegate UpdatePlayer] + 555
9   com.apple.Foundation          	0x00007fff3cd3cc3b __NSFireTimer + 80
10  com.apple.CoreFoundation      	0x00007fff3aaaf060 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
11  com.apple.CoreFoundation      	0x00007fff3aaaec0c __CFRunLoopDoTimer + 851
12  com.apple.CoreFoundation      	0x00007fff3aaae752 __CFRunLoopDoTimers + 330
13  com.apple.CoreFoundation      	0x00007fff3aa8f962 __CFRunLoopRun + 2130
14  com.apple.CoreFoundation      	0x00007fff3aa8eebe CFRunLoopRunSpecific + 455
15  com.apple.HIToolbox           	0x00007fff39cee1ab RunCurrentEventLoopInMode + 292
16  com.apple.HIToolbox           	0x00007fff39cedee5 ReceiveNextEventCommon + 603
17  com.apple.HIToolbox           	0x00007fff39cedc76 _BlockUntilNextEventMatchingListInModeWithFilter + 64
18  com.apple.AppKit              	0x00007fff3808679d _DPSNextEvent + 1135
19  com.apple.AppKit              	0x00007fff3808548b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
20  com.apple.AppKit              	0x00007fff3807f5a8 -[NSApplication run] + 699
21  com.apple.AppKit              	0x00007fff3806eae8 NSApplicationMain + 777
22  UnityPlayer.dylib             	0x0000000104bba4e9 PlayerMain(int, char const**) + 1881
23  libdyld.dylib                 	0x00007fff669e53d5 start + 1

Thread 1:
0   libsystem_pthread.dylib       	0x00007fff66bd83f0 start_wqthread + 0

Thread 2:: Profiler.Dispatcher
0   libsystem_kernel.dylib        	0x00007fff66b1a266 semaphore_wait_trap + 10
1   libdispatch.dylib             	0x00007fff66998bd9 _dispatch_sema4_wait + 16
2   libdispatch.dylib             	0x00007fff6699939f _dispatch_semaphore_wait_slow + 98
3   UnityPlayer.dylib             	0x00000001045bcd19 profiling::Dispatcher::Run() + 185
4   UnityPlayer.dylib             	0x00000001045bc79e profiling::Dispatcher::ThreadFunc(void*) + 46
5   UnityPlayer.dylib             	0x000000010443691c Thread::RunThreadWrapper(void*) + 1356
6   libsystem_pthread.dylib       	0x00007fff66bd92eb _pthread_body + 126
7   libsystem_pthread.dylib       	0x00007fff66bdc249 _pthread_start + 66
8   libsystem_pthread.dylib       	0x00007fff66bd840d thread_start + 13

Thread 3:
0   libsystem_pthread.dylib       	0x00007fff66bd83f0 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	0x00007fff66bd83f0 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib       	0x00007fff66bd83f0 start_wqthread + 0

Build with static linking library, this problem seems to be gone