Clustering job failed Out of memory loading input data

when bake lighting with unity3d 5.6. I got error at follow
Clustering job failed for system: 0x4526e1e8513eff5cd598cc4afaa3b3a9, error: 4 - ‘Out of memory loading input data.’.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 49886MB.
But I think I have enough memory!My Computer has 16GB !

1 Like

48Gb of memory is a lot, even for a big scene. Have you tried reducing indirect resolution and gone through these steps Precomputed Realtime GI (Global Illumination) - Unity Learn

2 Likes

Having the same issue,

Clustering job failed for system: 0xcf5ccc96c238a65b2ff640af57bc050d, error: 4 - ‘Out of memory loading input data.’.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 21274MB.

Using 5.6.1f1, maybe I should update.

1 Like

@KEngelstoft Could there also be a memory issue in Unity somewhere, related to lighting, in 5.6.1f1? The reason I ask is this:

I had 16GB of memory and received this exact error, but after restarting Unity, the bake went through. But seeing the error message, and the need to restart, made me wary and so I bought another 16GB of memory. I installed it this morning (now I have 32GB total), however, upon rebuilding, I got the exact same error message, and had to restart again, and as before it worked on the second attempt.

Besides the same message regardless of main memory, I believe it shouldn’t work upon restart if max memory was really an issue, or should it?

Error message with 32GB of main memory:

[C:\buildslave\unity\build\Runtime/Graphics/Mesh/VertexData.cpp line 647]
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)

Clustering job failed for system: 0x3bceb150b5d2e367f11a1b90b303029f, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 42285MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Clustering job failed for system: 0xa1a1aa64f039190809521fac18d9d77c, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 42285MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Clustering job failed for system: 0x97d108a838004e71664212e75a4cd494, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 43326MB.


(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Assertion failed on expression: '(srcData.GetChannelMask() & copyChannels) == copyChannels'
UnityEditor.InternalMeshUtil:GetCachedMeshSurfaceArea(MeshRenderer)
UnityEditor.LightingSettingsInspector:RenderMeshSettings(Boolean) (at C:\buildslave\unity\build\Editor\Mono\Inspector\LightingSettingsInspector.cs:221)
UnityEditor.MeshRendererEditor:LightingFieldsGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\MeshRendererEditor.cs:64)
UnityEditor.MeshRendererEditor:OnInspectorGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\MeshRendererEditor.cs:80)
UnityEditor.InspectorWindow:smile:rawEditor(Editor, Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1229)
UnityEditor.InspectorWindow:smile:rawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1019)
UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:358)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:262)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:255)
UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:222)
UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:346)

[C:\buildslave\unity\build\Runtime/Graphics/Mesh/VertexData.cpp line 647]
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)

[00:20:55] Enlighten: Finished 27 Clustering jobs (29.01s execute, 0.00s integrate, 15.90s wallclock)
[00:20:55] Enlighten: Finished 1 Create Geometry job (0.05s execute, 0.00s integrate, 0.10s wallclock)
[00:20:57] Enlighten: Finished 1 Layout Systems job (1.65s execute, 0.00s integrate, 1.69s wallclock)
[00:20:58] Enlighten: Finished 4 Create System jobs (2.34s execute, 0.00s integrate, 0.82s wallclock)
[00:20:58] Enlighten: Finished 1 Create SystemAtlas job (0.00s execute, 0.00s integrate, 0.03s wallclock)
Assertion failed on expression: '(srcData.GetChannelMask() & copyChannels) == copyChannels'
UnityEditor.InternalMeshUtil:GetCachedMeshSurfaceArea(MeshRenderer)
UnityEditor.LightingSettingsInspector:RenderMeshSettings(Boolean) (at C:\buildslave\unity\build\Editor\Mono\Inspector\LightingSettingsInspector.cs:221)
UnityEditor.MeshRendererEditor:LightingFieldsGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\MeshRendererEditor.cs:64)
UnityEditor.MeshRendererEditor:OnInspectorGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\MeshRendererEditor.cs:80)
UnityEditor.InspectorWindow:smile:rawEditor(Editor, Int32, Boolean, Boolean&, Rect&) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1229)
UnityEditor.InspectorWindow:smile:rawEditors(Editor[]) (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1019)
UnityEditor.InspectorWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:358)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:262)
UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:255)
UnityEditor.HostView:InvokeOnGUI(Rect) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:222)
UnityEditor.DockArea:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:346)

[C:\buildslave\unity\build\Runtime/Graphics/Mesh/VertexData.cpp line 647]
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs Line: 222)

Clustering job failed for system: 0xd5778e4154744fb541520eb96f969e9d, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 46437MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Clustering job failed for system: 0x7142e37da4d3373237a0c46d6047298d, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 46437MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Clustering job failed for system: 0xd659fc66b436744b9661e7cbe3f60331, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 46449MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Clustering job failed for system: 0x643ed1a7303f263c01cd0d96e004de72, error: 4 - 'Out of memory loading input data.'.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.
Total memory (physical and paged): 46449MB.

(Filename: C:\buildslave\unity\build\Editor/Src/GI/GIPreprocessManager.cpp Line: 189)

Thanks,

Philip

Du you happen to have a terrain or a very large mesh in the scene? Clustering can use a lot of memory is the resolution is set too high and a failed clustering job sounds like this is the case.

I’ve posted my problem in another thread, but I can see that guys here get the same error:

Clustering job failed for system: 0x2d843a78818f5a8bf4d380b9726ba5ca, error: 4 - ‘Out of memory loading input data.’.
Please close applications to free memory, optimize the scene, increase the size of the pagefile or use a system with more memory.

5.5.1f1 works fine, but 5.6.1 doesn’t bake light at all. I’m working with a large scene (4x4km) with lots of assets.
I’ve already tried lowering all possible values (Realtime resolution to 0.01!) and clustering freezes.

I’m using computer with 16GB of RAM, but Unity 5.5.1 baked light for this scene with only 8 GB!

Mike

Hi @KEngelstoft , thanks for the response. I don’t have terrain, but there is a very large mesh (500x500 plane) which may be the issue. I’ve now excluded it from static lightmapping, hopefully this solves the issue. One question though, how come it works after restarting Unity? Do you store intermediate results from which the system starts again after restart?

Philip

Yes, intermediate results are stored in the GI Cache https://docs.unity3d.com/Manual/GICache.html

@KEngelstoft OK, so what seemingly happens is that Unity does not manage to bake the objects in one go, but after I restart it builds on previously stored results and is then able to bake the objects? This would suggest that it could be possible for Unity to do it in one go if you check for out-of-memory problems and free some memory, right? Should I report a bug for this then?

Yes, please report the issue so we can investigate it.

Thanks

I will definitely follow this because I thought the same thing with my own project thank you.

I face Same Problem
Clustering job failed

i am disable Auto Generation and error are fix
Go;
1: Windows option in unity
2: Rendering\Lightning Settings
3: Lightning-Scene
4: Auto Generation option Set false

1 Like

Getting this on 5.6.2xf1…I’m no where near “out of memory” (easily 40+gigs free)