Download

Build plugin error on Linux

is anyone else seeing an error while building a plugin on Linux —>

Building UE4Editor…
Using clang version ‘3.5.0’ (string), 3 (major), 5 (minor), 0 (patch)
Compiling game modules for hot reload
ERROR: System.ArgumentOutOfRangeException: < 0 || >= this.Length
Parameter name: startIndex
at System.String.LastIndexOf (Char value, Int32 startIndex, Int32 count) [0x00000] in <filename unknown>:0
at UnrealBuildTool.UnrealBuildTool.PatchActionHistoryForHotReloadAssembling (System.Collections.Generic.List`1 OnlyModules) [0x00000] in <filename unknown>:0
at UnrealBuildTool.UnrealBuildTool.RunUBT (System.String] Arguments) [0x00000] in <filename unknown>:0
make[2]: *** [Source/Libs/SensoryWareUE4/CMakeFiles/SensoryWareUE4Plugin] Error 5
make[1]: *** [Source/Libs/SensoryWareUE4/CMakeFiles/SensoryWareUE4Plugin.dir/all] Error 2
make: *** [all] Error 2

I tracked it down to the function PatchActionHistoryForHotReloadAssembling in UnrealBuildTool.cs, there’s a call to LastIndexOf but IndexOfSecondLastHyphen is -1
a workaround would be to throw a new BuildException but that doesn’t address the underlying issue.