Mac OS Editor crash when opening a project coming from a windows computer

Hi, this is the first time I post on this forum. if this is missplaced please tell me.
(Edit : I just saw there was a dedicated OSX section -.-')
(Edit2 : I’ve posted at the correct place but I can’t delete this obsolet post)

So : I’m making a mobile game.
I mainly develop on my windows computer.
To do IOS Build I need to use a mac.
lately when I pull the project on my mac (I use git) it won’t open. Instead the Editor crash

Here is what I get from the recovery message :

Searchs only lead me to this old forum post :

but it is old and doesn’t correspond exactly to my case.

To bypass this issue I know I can delete the Library folder and then the project will open fine (although it take some times to rebuild)

This is not a blocker for me but it might be for other people

Anton

Are you source controlling you library directory?
Its not interchangeable between platforms, its all temp data. Trying to use it between platforms is likely the reason for your crash.
https://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html
Remove the Library dir from source control and add it to the ignore list so each platform can manage their own version.

I have the same crash - though deleting/rebuilding library does not fix the issue for more than a single unity session, and library folder is not included in source control. As soon as I exit Unity and reopen this one project, it will crash again with:

1877: failed assertion `No valid pixelFormats set.’

And a bunch of other errors related to shader stuff. Was running metal. On airplane, will try to follow up with further details later. Probably some kind of incompatibility between a shader/model/texture in the project and metal/mac unity version, as other projects open fine.

Can you file a bug report and include a sample project which has the problem please?

The bug report options that pops up are just for submitting to Apple, not Unity. And I can’t, unfortunately, share the project it was happening in. I haven’t seen this issue with other cross-platform projects, which is why I think it might have been some kind of incompatibility with a shader imported from a 3rd party plugin. Is there a way to log the opening of a project so that I can see what the project might have been crashing on?

I was able to get my project to open again by manually editing the ProjectSettings.asset file to turn off Metal editor rendering support. So I can at least confirm that the crash is caused by the new metal editor renderer.

We have been hit by this too… If i delete library folder then unity will run ONCE… if i close and repoen unity crash happens again!!

Loading GUID ↔ Path mappings…0.000171 seconds
Loading Asset Database…0.183455 seconds
Audio: FMOD Profiler initialized on port 54900
AssetDatabase consistency checks…0.329651 seconds
Initialize engine version: 5.6.0f3 (497a0f351392)
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Intel Iris Graphics
Launching external process: /Applications/Unity/Unity.app/Contents/Tools/UnityShaderCompiler
Launched and connected shader compiler UnityShaderCompiler after 0.10 seconds
-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:1877: failed assertion `No valid pixelFormats set.’

Native stacktrace:

0 libsystem_kernel.dylib 0x00007fffd183cd42 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fffd17a2420 abort + 129
2 libsystem_c.dylib 0x00007fffd1769893 basename_r + 0
3 Metal 0x00007fffbf878e0b MTLReportFailure + 822
4 Metal 0x00007fffbf877fc9 -[MTLRenderPipelineDescriptorInternal validateWithDevice:] + 1919
5 Metal 0x00007fffbf86a20b -[MTLCompiler newRenderPipelineStateWithDescriptor:options:reflection:error:completionHandler:] + 70
6 Metal 0x00007fffbf852147 -[_MTLDevice newRenderPipelineStateWithDescriptor:options:reflection:error:] + 76
7 Unity 0x0000000102c8dffc _ZN14GfxDeviceMetal11GetPipelineERKNS_7PipeKeyE + 2588
8 Unity 0x0000000102c90324 _ZN14GfxDeviceMetal15CommonDrawSetupEP22VertexDeclarationMetalPK18VertexStreamSourcei17ShaderChannelMask + 580
9 Unity 0x0000000102c90677 _ZN14GfxDeviceMetal11DrawBuffersEP9GfxBufferPK18VertexStreamSourceiPK16DrawBuffersRangeiP17VertexDeclaration17ShaderChannelMask + 103
10 Unity 0x0000000102c9c975 _ZN15MetalDynamicVBO17DrawChunkInternalERK21DynamicVBOChunkHandle17ShaderChannelMaskS3_P17VertexDeclarationP16DrawBuffersRangeij + 981
11 Unity 0x0000000101b7c9d0 _ZN10DynamicVBO9DrawChunkERK21DynamicVBOChunkHandle17ShaderChannelMaskS3_P17VertexDeclarationPKNS_10DrawParamsEi + 1008
12 Unity 0x0000000101a58b44 _ZN15GfxDeviceWorker10RunCommandER20ThreadedStreamBuffer + 17284
13 Unity 0x0000000102c9731c GfxDeviceWorkerAutoreleasePoolProxy + 60
14 Unity 0x0000000101a5e294 _ZN15GfxDeviceWorker3RunEv + 116
15 Unity 0x0000000101a546b1 _ZN15GfxDeviceWorker18RunGfxDeviceWorkerEPv + 81
16 Unity 0x000000010222f47a _ZN6Thread16RunThreadWrapperEPv + 90
17 libsystem_pthread.dylib 0x00007fffd19279af _pthread_body + 180
18 libsystem_pthread.dylib 0x00007fffd19278fb _pthread_body + 0
19 libsystem_pthread.dylib 0x00007fffd1927101 thread_start + 13

Debug info from gdb:

When the crash happens it also leaves behind a single Unity process that starts to overheat the mac because they stack up and are all using heaps of CPU…

Using Unity 5.6.0f3

MacOs 10.12.4

but turning metal support off does fix this issue for me…

We also have this issue while editor metal support is turned on. for Unity 5.6.0p3 and MacOS 10.12.4

I have same problem.
Cannot open project after upgrade to Unity 5.6.1f1
Even if I delete Library folder, I cant open project once.

Also, I found a file “shadercompiler-UnityShaderCompiler0.log” in Library folder,
The content of this file is:

Base path: /Applications/Unity/Unity.app/Contents
Cmd: initializeCompiler
Unhandled exception: Protocol error - failed to read correct magic number

Quitting shader compiler process

the " metal support" option is in the unity or xcode?

In Unity’s ProjectSettings like delphinius81 said.

Same problem and error message as in the original post for me, tested with 5.6.1f1 and 5.6.2f1.
Library folder is not in source control. After deleting the library folder and reimporting the entire project it opens successfully once, then crashes again the next time.

I solved it by running Unity from the Terminal with -force-glcore parameter (the Documentation says this is “Windows only”, but it works on Mac too), then disabling “Metal Editor support” in Edit → Project Settings → Player.

The Mac Player crashes with the same error message when using Metal as the default renderer.

Just tested with 2017.3.1p1, still happening (using macOS 10.13.1).

Still happening … my mac 10.11.6 2017.3.1f1 crashes a specific merge from unity 2017.4.0f1 for window …