x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Path too long during stage (DLC)

I'm getting path too long problems while staging (using RunUAT).

Even with the project moved down to d:\Projects\ProjectName its still going over the limit:

 Project.RunUnrealPak: Running UnrealPak *******
 CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.10\Engine\Binaries\Win64\UnrealPak.exe D:\Projects\UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\UE4Cooker\Content\Paks\UE4Cooker-WindowsNoEditor.pak -create="C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Logs\PakList_UE4Cooker-WindowsNoEditor.txt" -order=D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log -UTF8Output
 UnrealPak: LogPakFile:Display: Loading response file C:\Program Files (x86)\Epic Games\4.10\Engine\Programs\AutomationTool\Saved\Logs\PakList_UE4Cooker-WindowsNoEditor.txt
 UnrealPak: LogPakFile:Display: Added 2 entries to add to pak file.
 UnrealPak: LogPakFile:Display: Loading pak order file D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log...
 UnrealPak: LogPakFile:Display: Finished loading pak order file D:\Projects\UE4Cooker\Build\WindowsNoEditor\FileOpenOrder\CookerOpenOrder.log.
 UnrealPak: LogPakFile:Display: Collecting files to add to pak file...
 UnrealPak: LogPakFile:Display: Collected 2 files in 0.00s.
 LogTemp: UnrealPak: LogPakFile:Display: Added 2 files, 83148 bytes total, time 0.01s.
 CommandUtils.Run: Run: Took 0.2377557s to run UnrealPak.exe, ExitCode=0
 Project.CreatePak: UnrealPak Done *******
 BuildCommand.Execute: ERROR: BUILD FAILED
 Program.Main: ERROR: AutomationTool terminated with exception:
 Program.Main: ERROR: Exception in mscorlib: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
 Stacktrace:    at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
    at System.IO.Path.GetDirectoryName(String path)
    at AutomationTool.CommandUtils.CopyFileIncremental(String Source, String Dest, Boolean bAllowDifferingTimestamps, Boolean bFilterSpecialLinesFromIniFiles)
    at Project.CopyManifestFilesToStageDir(Dictionary`2 Mapping, String StageDir, String ManifestName, List`1 CRCFiles)
    at Project.CopyUsingStagingManifest(ProjectParams Params, DeploymentContext SC)
    at Project.ApplyStagingManifest(ProjectParams Params, DeploymentContext SC)
    at Project.CopyBuildToStagingDirectory(ProjectParams Params)
    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
    at BuildCommand.Execute()
    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
    at AutomationTool.Automation.Process(String[] CommandLine)
    at AutomationTool.Program.MainProc(Object Param)
    at AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)
    at AutomationTool.Program.Main()
 ProcessManager.KillAll: Trying to kill 0 spawned processes.
 Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
Product Version: UE 4.10
Tags:
more ▼

asked Jan 25 '16 at 05:55 PM in Bug Reports

theonecalledtom gravatar image

theonecalledtom
972 39 28 203

theonecalledtom gravatar image theonecalledtom Jan 25 '16 at 06:13 PM

This is the commandline causing the problem.

C:/Program Files (x86)/Epic Games/4.10/Engine/Build/BatchFiles/RunUAT.bat BuildCookRun -project="D:/Projects/UE4Cooker/UE4Cooker.uproject" -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -rocket -utf8output -platform=Win64+Win64 -targetplatform=Win64 -cook -map= -unversionedcookedcontent -pak -dlcname=DLC -basedonreleaseversion=1.0 -compressed -stage -package -cmdline= -Messaging -SessionName='DLC'

theonecalledtom gravatar image theonecalledtom Jan 25 '16 at 09:56 PM

Certainly looks like something is going a bit wild in the creation process - this folder exists on my computer - notive the repetition of "UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor".

D:\Projects\UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\UE4Cooker\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\UE4Cooker\Plugins\DLC

theonecalledtom gravatar image theonecalledtom Jan 25 '16 at 10:33 PM

This looks like a problem create when running via a process from the editor (using: FPlatformProcess). Removing the quotes around the project name stops the recursion.

I'm not sure what the proper approach to project names is. Code I'm suing follows:

 FString UATCommandLine = FString::Printf(TEXT("BuildCookRun -project=%s"), *FPaths::GetProjectFilePath());
 FString defaultCmds = FString::Printf(TEXT(" -noP4 -clientconfig=%s -serverconfig=%s -nocompile -nocompileeditor -rocket -utf8output -platform=Win64+Win64 -targetplatform=Win64 -cook -map= -unversionedcookedcontent -pak -dlcname=DLC -basedonreleaseversion=1.0 -compressed -stage -package -cmdline= -Messaging -SessionName='DLC'"), *build, *build);
 //FString defaultCmds = FString::Printf(TEXT(" -noP4 -clientconfig=%s -serverconfig=%s -nocompile -nocompileeditor -rocket -utf8output -platform=Win64+Win64 -targetplatform=Win64 -cook -map= -unversionedcookedcontent -pak -dlcname=DLC -basedonreleaseversion=1.0 -compressed -stage -package -cmdline= -Messaging -SessionName='DLC'"), *build, *build);
 UATCommandLine += defaultCmds;
 // specify the path to the editor exe if necessary

 // launch UAT and monitor its progress
 void* ReadPipe = nullptr, *WritePipe = nullptr;
 FPlatformProcess::CreatePipe(ReadPipe, WritePipe);
 FString exePath = ExecutablePath / Executable;
 UE_LOG(LogTemp, Log, TEXT("Starting '%s'"), *exePath);
 UE_LOG(LogTemp, Log, TEXT("   commandline: %s"), *UATCommandLine)
 FProcHandle ProcessHandle = FPlatformProcess::CreateProc(*exePath, *UATCommandLine, false, true, true, NULL, 0, *ExecutablePath, WritePipe);



theonecalledtom gravatar image theonecalledtom Jan 25 '16 at 10:34 PM

And really I don't want to be triggering commandline builds - I'd prefer to use the project launcher I just don't know how to invoke it from my own plugin.

theonecalledtom gravatar image theonecalledtom Jan 25 '16 at 11:07 PM

Well anyway. It wasn't fixed, I just got a couple of successful stages after removing the "s.

Looks like it adds deeper child directories every time I stage, so I've added a directory deletion to the process and that seems to have worked around the problem.

Nothing wrong the the "s. I've put them back now.

Seems like a bug in RunUAT though!

Matthew Clark gravatar image Matthew Clark ♦♦ STAFF Feb 04 '16 at 04:29 PM

Hello theonecalledtom,

Thank you for all of the information. I'll be taking a look at this but just started so I don't have much information yet. I did want to ask however; Are you able to reproduce this issue in a fresh project or is it something only occurring with the project you're working in? Having a reproduction case would help a lot in a case like this.

theonecalledtom gravatar image theonecalledtom Feb 04 '16 at 05:44 PM

Hi Matthew,

I was able to get a repro in a fresh project, this time in 4.11 Preview 4, very easily.

  • Create a new project

  • Add a DLC plugin (I've attached a zip of the one I used to repro)

  • In the project launcher setup profiles for a release 1.0 build (WindowsNoEditor) and plugin DLC based on that release.

  • Build the Release 1.0

  • Build the DLC, and again, and again, and again (my test project fails on attempt number 3 but I would guess it depends on your original path length)

  • Delete the plugins/dlc/saved folder and try again... it'll work the same number of times

As far as I can tell my test is pure Unreal and doesn't have any me in it.

Here's the path that is getting longer and longer with each build - see the repetition on "StagingTest\Plugins\DLC\Saved"

 C:\Users\Thomas Shepherd\Documents\Unreal Projects\StagingTest\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\StagingTest\Plugins\DLC\Saved\StagedBuilds\WindowsNoEditor\StagingTest\Plugins\DLC

link text

Matthew Clark gravatar image Matthew Clark ♦♦ STAFF Feb 04 '16 at 06:30 PM

Thank you for the steps. Unfortunately, I'm not getting the same issue. Could you specify what settings you're using for your Release and DLC profiles in the Project Launcher? That is the only thing what was vague about your previous post which could be there the missing detail is.

theonecalledtom gravatar image theonecalledtom Feb 04 '16 at 07:55 PM

Base profile:

  • Build

  • - ticked, though I'm not sure it needs to be

  • Configuration: Development

  • Cook

  • By the Book

  • WindowNoEditor

  • Ticked: Create a release version of the game for distribution

  • Name: 1.0

  • Advanced setrtings

  • ticked: Compress Content

  • ticked: Save packages without versions

  • ticked: Store all content in a single file (UnrealPak)

  • Package

  • Package & store locally

  • Deploy

  • Do not deploy

DLC profile - Same except: - Build - NOT ticked - Release / DLC / Patching Settings - NOT ticked: Create a release - Name: Empty - Release Version this is based on - 1.0

Steps: 1. Build the Base profile, click Done 2. Build the DLC profile, click Run at the end (not done). 3. Keep clicking Run

Could be that making the DLC configuration build a pak file is critical.

Matthew Clark gravatar image Matthew Clark ♦♦ STAFF Feb 04 '16 at 09:34 PM

Thank you for those settings. I've reproduced it but I do have a quick question before I put the report in, seeing as the plugin can't be used in earlier version of the engine. Did this occur for you at all in 4.9 or any earlier builds of the engine or did it start with 4.10.2?

theonecalledtom gravatar image theonecalledtom Feb 04 '16 at 10:42 PM

Sorry Matthew - I didn't try packing prior to 4.10 beyond the occasional test.

Matthew Clark gravatar image Matthew Clark ♦♦ STAFF Feb 12 '16 at 01:41 PM

Hello theonecalledtom,

I'm still looking into this problem. I just wanted to let you know that I haven't forgotten about your issue and I'll let you know whenever I have more information.

theonecalledtom gravatar image theonecalledtom Feb 12 '16 at 06:09 PM

Thanks Matthew! My workflow is out of the norm, which in this case makes it easy for me to automatically nuke the directories ever time I package but I figure it'll bite others down the line as the plugin system gets more exercise.

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first

I've been looking into this further and decided to place a bug report in for the issue. For reference, the report's number is UE-27067. I'll be sure to update you on its status when it gets updated, but in the meantime I can't really think of any other workarounds past deleting those directories.

Have a nice day!

more ▼

answered Feb 17 '16 at 06:33 PM

Matthew Clark gravatar image

Matthew Clark ♦♦ STAFF
27.5k 510 77 383

IdentityCrisisUK gravatar image IdentityCrisisUK STAFF Feb 18 '16 at 03:07 PM

I've fixed this in CL#2871980, there was an issue where the staging code would search for .uplugin files recursively and find the .uplugin that was copied to the Saved folder on the last run. Each new run would copy more files deeper and deeper. Good catch, thanks for reporting it :)

Dominik123123 gravatar image Dominik123123 Mar 06 '16 at 10:42 AM

few days ago i got same problem, i fixed my issue with 'Long Path Tool', it was worked for me, you can try, i hope the problem will fixed. i was searching path too long delete files problem and found it, nice conversation, its helped me.

hunter wyatt gravatar image hunter wyatt Mar 24 '16 at 07:16 AM

my friend i was in same issue, i fixed my issue with"Long Path Tool", i was search -filename too long for destination folder- and found the video, its just awesome, thanks nice conversation here if you want you can try first time and see the result. thanks

Kamila564 gravatar image Kamila564 Jun 15 '16 at 01:39 PM

I am getting this same issue and its very difficult to solve this problem without any third party app, i guess the best thing to do is to use a third party app like Long Path Tool. Just download it and use it to solve this issue. I hope this would help.

(comments are locked)
10|2000 characters needed characters left
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question