Swarm failed to kick off

Hi everyone.

I have a problem with the swarm agent. As the title says, it fails to kick off. In the swarm logs, is appears the following message:

[Interface:OpenChannel] Error: System.IO.IOException: El proceso no puede obtener acceso al archivo ‘F:\UnrealEngine-4.8.3-release\Engine\Saved\Swarm\SwarmCache\AgentStagingArea\8487AD2E5DBA413C81373D29B2915895.9A357CD44AC5B4D1E91BA8A7A9451DC0.mtrlgz’ porque está siendo utilizado en otro proceso

The spanish part means the file cannot be accessed because some other process is using it

The project has two levels. One builds fine, the other one has this kick off problem. (The map where lightmass build is larger than the one where it fails, but it has less actors)

I have been searching on internet about this problem and how to fix it. What I have tried until now, with no luck, is:

  • Cleaning Swarm Cache (both manually and using the swarm clean cache)
  • Recompiling lightmass and try to rebuild
  • Checking my static meshes, renaming these with duplicate names
  • Deleting 1 by 1 different types of actors from my level to try to find the root of the problem

I though it would be some new mesh because 3 days ago I rebuilt the light without problems, however removing actors from the level didnt help.

What else could I do?

Regards,

PS: Im using 4.8.3

After 1 day working on it, I managed to fix it. The problem was that there was a bunch of materials with the same name. To fix it, I just went to the content browser. I clicked in the root folder (Usually Content) and applied a filter to see only Materials (with which I would see all my materials). Then ill check one by one. Those with duplicate names were replaced or renamed. After that, I ensure the swarm agent was not running, restarted the editor, and build the light. Everything worked flawlessly.

In the event of swarm agent not being able to access a given file because another process is using it, it is because elements with same name (meshes, materials, and I dont know if anything else) produce the same hash to name the file where the baked light is stored, so swarm tries to access the same file more than once, and it is unable to do so because its the swarm agent itself who is using the file that it is trying to access.

THIS WORKED FOR ME:

If you’re using 4.10 or later you will need to have the VS2015 dependencies installed.
You can download the Visual Studio Dependencies from Microsoft’s website:

VS2013: Download Visual C++ Redistributable Packages for Visual Studio 2013 from Official Microsoft Download Center
VS2015: Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center