No explicit failure code handling for error of type 22

Our cloud builds are failing with this error, and we have no idea what it means.
The builds are working fine locally, just not on cloudbuild.

Thanks.

16857: [Unity] Launching external process: /Volumes/2019_4_22f1/Unity.app/Contents/Tools/UnityShaderCompiler
16858: [Unity] No explicit failure code handling for error of type 22
16859: [Unity] UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
16860: [Unity] UnityEngine.Graphics:Blit (UnityEngine.Texture,UnityEngine.RenderTexture) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Graphics/Graphics.cs:565)
16861: [Unity] UnityEditor.TextureInspector:RenderStaticPreview (string,UnityEngine.Object[],int,int) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/TextureInspector.cs:764)
16862: [Unity] UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset (UnityEngine.Object,UnityEngine.Object[],string) (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPreviewUpdater.cs:33)
16863: [Unity] [./Editor/Platform/Posix/LocalIPC/PosixLocalIPC.inl.h line 38]
16864: [Unity] (Filename: /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs Line: 37)
16865: [Unity] Failed to get ipc connection from UnityShaderCompiler shader compiler! /Volumes/2019_4_22f1/Unity.app/Contents/Tools/UnityShaderCompiler
16866: [Unity] Obtained 17 stack frames.
16867: [Unity] #0  0x00000102f977b1 in PosixDomainSocketsIPC::IsConnected(PosixDomainSocketsIPC::Stream&, bool&)
16868: [Unity] #1  0x00000102f98bf6 in PAL_LocalIPC_IsConnected
16869: [Unity] #2  0x00000102d41bbf in GetShaderCompilerPerThreadInternal()
16870: [Unity] #3  0x00000102d427ad in GetShaderCompilerVersion(ShaderCompilerPlatform)
16871: [Unity] #4  0x000001045e5836 in GetShaderCompilerBackendVersion(ShaderCompilerPlatform)
16872: [Unity] #5  0x000001045e5c4a in detail::ComputeShaderSnippetKey(ShaderSnippet const&, ShaderType, ShaderKeywordSet const&, ShaderCompilerPlatform, fixed_bitset<28, unsigned int> const&, Hash128*, ShaderKeywordData&)
16873: [Unity] #6  0x00000101ee5a56 in GetSubProgramForShaderSnippet(ShaderLab::Program*, Shader*, ShaderLab::Pass*, ShaderSnippet const&, ShaderType, unsigned int, ShaderKeywordSet const&, ShaderKeywordSet const&, fixed_bitset<28, unsigned int> const&, ShaderCompilerPlatform, ShaderSnippetResult&, ShaderRequirements, bool, bool)
16874: [Unity] #7  0x0000010461e470 in ShaderLab::Program::CompileShaderSubProgram(Shader*, ShaderLab::Pass*, ShaderSnippet const&, unsigned int, ShaderKeywordSet const&, ShaderKeywordSet&, ShaderSnippetResult&, ShaderRequirements, bool, bool)
16875: [Unity] #8  0x0000010461fef3 in ShaderLab::Program::GetMatchingSubProgram(Shader const*, ShaderLab::Pass const*, ShaderKeywordSet const&, unsigned int, ShaderKeywordSet*, ShaderSnippetResult&, bool, bool) const
16876: [Unity] #9  0x00000104634ad7 in ShaderLab::ShaderState::FindSubProgramsToUse(Shader const*, ShaderLab::Pass const*, ShaderLab::SubPrograms&, ShaderPassContext const&, bool) const
16877: [Unity] #10 0x00000104634ee5 in ShaderLab::ShaderState::ApplyShaderState(unsigned int, ShaderPropertySheet const*, ShaderPassContext const&, Shader*, ShaderLab::Pass*, ShaderLab::SubPrograms*, DeviceRenderStateBlock const*) const
16878: [Unity] #11 0x000001046193b6 in ShaderLab::Pass::ApplyPass(unsigned int, ShaderPropertySheet const*, ShaderPassContext&, Shader*, int, int, ShaderLab::GrabPasses const*, ShaderLab::SubPrograms*, DeviceRenderStateBlock const*)
16879: [Unity] #12 0x00000103c0fb5f in ImageFilters::Blit(ShaderPassContext&, Texture*, RenderTexture*, int, SharedMaterialData const*, char const*, Shader*, int, ImageFilters::BlitFlags, CubemapFace, Vector2f const&, Vector2f const&)
16880: [Unity] #13 0x00000103bfa700 in ImageFilters::Blit(ShaderPassContext&, Texture*, RenderTexture*, int, Material*, int, ImageFilters::BlitFlags, CubemapFace, Vector2f const&, Vector2f const&)
16881: [Unity] #14 0x00000103bf5b50 in ImageFilters::Blit(ShaderPassContext&, Texture*, RenderTexture*, int, int, Vector2f const&, Vector2f const&, ImageFilters::BlitFlags)
16882: [Unity] #15 0x00000104046a99 in GraphicsScripting::Blit(Texture*, RenderTexture*)
16883: [Unity] #16 0x00000104c0abe2 in Graphics_CUSTOM_Blit2(ScriptingBackendNativeObjectPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*)
16884:        Unity ran in '599.501977' seconds
16885:        ! Running unit tests failed!
16886: ! build of 'develop-ios-1' failed. exit

Turns out it’s not a Unity Cloud Build-specific problem, but a mac problem (I suppose UCB is done on mac?).

Part of my script uses System.IO.FileSystemWatcher to monitor file change, and it seems like FileSystemWatcher could cause some weird bugs during asset import on Mac devices. Such as I/O Error- Too many open fiies and the above No explicit failure code handling for error of type 22.

My temporary solution is to warp #if UNITY_EDITOR_WIN around the file system watcher code (since they are not needed for build, but just for editor tools). I will do some more checks on the code, and submit a bug report if it’s not my code’s fault.

Some related thread on this issue:

1 Like