サイトアイコン braveam

[Unity2019][MacOSX][AppleSiliconM1]起動時にハングアップする

プロジェクトをUnity2018から2019にアップグレード後、起動すると以下のようなエラーを出してハングアップする。

Application Specific Information:
-[MTLTextureDescriptorInternal validateWithDevice:]:1248: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has width of zero.
'
 

Thread 0 Crashed:: tid_203  Dispatch queue: com.apple.main-thread
0   ???                           	0x00007ffe962faa30 ???
1   libsystem_kernel.dylib        	0x00007fff202f7462 __pthread_kill + 10
2   libsystem_c.dylib             	0x00007fff20278720 abort + 120
3   com.unity3d.UnityEditor5.x    	0x000000010392ea0e HandleSignal(int, __siginfo*, void*) + 62
4   libmonobdwgc-2.0.dylib        	0x000000015a7ba9bd mono_chain_signal + 79
5   libmonobdwgc-2.0.dylib        	0x000000015a7bad00 sigabrt_signal_handler + 86
6   libsystem_platform.dylib      	0x00007fff20369d7d _sigtramp + 29
7   ???                           	000000000000000000 0 + 0
8   libsystem_c.dylib             	0x00007fff20278720 abort + 120
9   libsystem_c.dylib             	0x00007fff202779d6 __assert_rtn + 314
10  com.apple.Metal               	0x00007fff285ecfe4 MTLReportFailure.cold.1 + 43
11  com.apple.Metal               	0x00007fff285db1b2 MTLReportFailure + 538
12  com.apple.Metal               	0x00007fff285d4f6a _MTLMessageContextEnd + 987
13  com.apple.Metal               	0x00007fff2853d151 -[MTLTextureDescriptorInternal validateWithDevice:] + 2220
14  com.apple.AGXMetal13-3        	0x000000014d215500 0x14cb34000 + 7214336
15  com.apple.AppleMetalOpenGLRenderer	0x0000000151c5daba GLDTextureRec::load() + 3454
16  com.apple.AppleMetalOpenGLRenderer	0x0000000151c7a94b GLRDrawable::attachDrawable(GLDContextRec*, unsigned int, GLDDrawableRec*, unsigned int, GLTDimensionsRec*, GLRDrawable const*) + 2593
17  com.apple.AppleMetalOpenGLRenderer	0x0000000151c7ca1b gldAttachDrawable + 563
18  GLEngine                      	0x00007fff6cd00d01 gliAttachDrawableWithOptions + 251
19  com.apple.opengl              	0x00007fff6cacbbcc 0x7fff6cabf000 + 52172
20  com.apple.opengl              	0x00007fff6cacbed2 CGLEnable + 97
21  com.unity3d.UnityEditor5.x    	0x0000000104ae4e0f -[GUIOpenGLView UpdateGraphicsContext] + 207
22  com.unity3d.UnityEditor5.x    	0x0000000104ae520b -[GUIOpenGLView setFrameSize:] + 59
23  com.apple.AppKit              	0x00007fff22bb3b71 -[NSView setFrame:] + 423
24  com.unity3d.UnityEditor5.x    	0x0000000104ae518c -[GUIOpenGLView setFrame:] + 60
25  com.unity3d.UnityEditor5.x    	0x0000000104ab8c47 GUIView::SetPosition(RectT<float> const&) + 551
26  com.unity3d.UnityEditor5.x    	0x0000000102594cc1 GUIView_CUSTOM_Internal_SetPosition_Injected(ScriptingBackendNativeObjectPtrOpaque*, RectT<float> const&) + 369

Thread 1:: Profiler.Dispatcher
0   ???                           	0x00007ffe962faa30 ???
1   libsystem_kernel.dylib        	0x00007fff202f0eba semaphore_wait_trap + 10
2   libdispatch.dylib             	0x00007fff2017a12e _dispatch_semaphore_wait_slow + 98
3   com.unity3d.UnityEditor5.x    	0x0000000104c56e38 Baselib_SystemSemaphore_Acquire + 24
4   com.unity3d.UnityEditor5.x    	0x0000000100466aaa Semaphore::WaitForSignal(int) + 138
5   com.unity3d.UnityEditor5.x    	0x000000010384e263 profiling::Dispatcher::ThreadFunc(void*) + 147
6   com.unity3d.UnityEditor5.x    	0x00000001037b7ddc Thread::RunThreadWrapper(void*) + 1228
7   libsystem_pthread.dylib       	0x00007fff20325950 _pthread_start + 224
8   libsystem_pthread.dylib       	0x00007fff2032147b thread_start + 15

解決方法

Unity起動時に-force-metalオプションをつけて起動する。
UnityHubの場合はプロジェクトの右をクリックして「詳細なプロジェクト設定」から起動オプションを指定できる。

モバイルバージョンを終了