Commit Graph

8856 Commits

Author SHA1 Message Date
Chris Babcock
b8bb2eaf1e Fix issue with install batch file detection for Android
#jira UE-89006
#ue4
#android
#rb Brandon.Schaefer

[CL 11504731 by Chris Babcock in 4.25 branch]
2020-02-18 12:57:01 -05:00
PierreOlivier Latour
1d307c0dd7 Fixed UnrealBuildTool crashing on launch if initialization of UnrealTargetPlatform static members variables happens out of order
## Summary

`UnrealTargetPlatform` and `UnrealPlatformGroup` are partial structs which each have a static member variable declared like this:

private static UniqueStringRegistry StringRegistry = new UniqueStringRegistry();

These partial structs have additional implementations in /Engine/Platforms/XXX/Source/Programs/UnrealBuildTool/UEBuildXXX.cs, which also have static member variables declared like this:

public static UnrealTargetPlatform XXX = FindOrAddByName("XXX");

`FindOrAddByName()` is a static method on `UnrealTargetPlatform` and `UnrealPlatformGroup` which accesses `StringRegistry` and requires it to be initialized i.e. non-null.

It appears that there's no guarantee in .NET runtime that the static member variables in the "original" implementation of the partial structs will be initialized _before_ the ones from the "additional" implementations. This means `XXX` above can be initialized in the additonal implementation before `StringRegistry` has been initialized in the original implementation, which means it's still null when `FindOrAddByName()` is called so the tool crashes.

In practice, this is 100% reproducible in our public GitHub mirror when opening `UnrealBuildTool.csproj` with VisualStudio Mac. This IDE rewrites the project file which affects when / how UEBuildXXX.cs is compiled, and static member variables for these partial structs end up being initialized out or order.

The only solution I found that worked was to replace all accesses to the `StringRegistry` static member variables by a wrapper function `GetUniqueStringRegistry()` which takes care of initializing it - only once. Since all this happens while the tool launches, this code should not need to be multithread aware / re-entrant.

NOTE: There is another partial struct `RestrictedFolder` in this codebase which also use `UniqueStringRegistry` in a similar way but the 2 implementations are in the same source file, so the bug may not happen and I left the implementation untouched.

## Test Plan

- Opened `UnrealBuildTool.csproj` with VisualStudio Mac
- Built UnrealBuildTool and verified it crashed on launch due to `StringRegistry` being NULL when used by `FindOrAddByName()`
- Confirmed the crash doesn't happen anymore after applying this change and that the `StringRegistry` static member variable was only set once by `GetUniqueStringRegistry()`


#jira UE-88908
#rb ben.marsh

[CL 11498874 by PierreOlivier Latour in 4.25 branch]
2020-02-18 10:02:51 -05:00
Jack Porter
a9754c84e0 Fixed iOS toolchain crash with missing provision
#jira UE-88744
#rb trivial
#rnx

[CL 11493809 by Jack Porter in 4.25 branch]
2020-02-18 02:02:29 -05:00
Chris Babcock
37d9d57517 Update BundleTool to 0.13.0
#jira UE-88929
#ue4
#android
#rb Tyler.Quinn

[CL 11467813 by Chris Babcock in 4.25 branch]
2020-02-17 17:23:05 -05:00
benoit deschenes
d1e09afa1b Integrating CL# 11292240 from Dev-Enterprise
Fixing crash in 3ds Max Exporter, autodesk noise map are not supported.

#jira UE-88193
#review-11287723 Julien.StJean
#rb Julien.StJean

[CL 11462019 by benoit deschenes in 4.25 branch]
2020-02-17 14:07:28 -05:00
benoit deschenes
0d5ab453b3 Integrating CL# 11427051 from Dev-Enterprise
Fixing 3dsMax exporter crash

#jira UE-86710
#rb none

[CL 11461917 by benoit deschenes in 4.25 branch]
2020-02-17 13:58:51 -05:00
Ben Marsh
196c1088ff Fix null reference when generating project files in binary release.
#rb none
#rnx
#jira UE-88874

[CL 11461845 by Ben Marsh in 4.25 branch]
2020-02-17 13:53:16 -05:00
emil kirichev
73287b232d Wrong Normals orientation on wall entities exported from Revit Datasmith
Integrated from Dev-Enterprise (CL 11194428)

#jira UE-87522
#rb JeanLuc.Corenthin, David.Lesage

[CL 11459071 by emil kirichev in 4.25 branch]
2020-02-17 07:58:46 -05:00
Anthony Bills
6c55e3f1a1 [IOS] Check if the bundle exists before trying to copy manifests.
- This prevents an error being displayed in the log before staging.

#review-11458300 @jack.porter
#jira UE-86335
#rb jack.porter

[CL 11458335 by Anthony Bills in 4.25 branch]
2020-02-16 21:46:00 -05:00
Michael Sartain
63b75a2301 Linux AArch64 libs for FreeType2 v2.10.0, ICU 64.1, and HarfBuzz 2.4.0
Includes BuildForLinuxAArch64.sh cross compilation scripts

Adds LinuxAArch64 back to installed engine builds (CL 11419001)

#jira UE-88745
#rb Brandon.Schaefer

[CL 11452535 by Michael Sartain in 4.25 branch]
2020-02-14 19:11:35 -05:00
Brandon Schaefer
e266d81a91 Move to new llvm clang 9.0.1 v16 toolchain
#jira UE-85219
#rb none
#fyi Michael.Sartain

[CL 11448348 by Brandon Schaefer in 4.25 branch]
2020-02-14 16:01:35 -05:00
Ben Marsh
30e6fe0805 Ignore duplicate lib*.dylib files produced as build artifacts. Hopefully fix installed build on Mac.
#rb none
#rnx
#jira

[CL 11448131 by Ben Marsh in 4.25 branch]
2020-02-14 15:53:46 -05:00
Ben Marsh
b37d68e4a5 Remove Gnmx from hard-coded list of modules that aren't IWYU compatible.
#rb none
#rnx
#jira UE-84505

[CL 11433161 by Ben Marsh in 4.25 branch]
2020-02-13 21:09:57 -05:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
JeanMichel Dignard
ccbeb192c3 Datasmith 3dsMax Exporter: More int to bool conversion fixes for operator== that returns an int.
#jira UE-88378
#rb none

[CL 11361910 by JeanMichel Dignard in Main branch]
2020-02-11 18:00:12 -05:00
JeanMichel Dignard
dedb269658 Build fix for int to bool implicit conversion
#jira UE-88378
#rb none

[CL 11360229 by JeanMichel Dignard in Main branch]
2020-02-11 17:22:57 -05:00
Brandon Schaefer
b16b8c8ac8 For non dll, assume our ../../.. structure for rpaths. Keep the new way to DSOs which will play a role when it comes to plugins etc.
#jira UE-87705
#rb none
#fyi Michael.Sartain

[CL 11359548 by Brandon Schaefer in Main branch]
2020-02-11 17:04:04 -05:00
daniel lamb
886cb4736c Prevent shader bytecode and shader pipeline cache files from being compressed.
#rb Chris.Bunner


#ROBOMERGE-SOURCE: CL 11353179 via CL 11353457 via CL 11355086 via CL 11355318
#ROBOMERGE-BOT: (v654-11333218)

[CL 11355543 by daniel lamb in Main branch]
2020-02-11 15:59:57 -05:00
Josh Adams
6bd5d97d8b - Moved AudioCaptureModuleName spec to a .ini setting, and updated all relevant .ini files
- Fixed .ini staging to follow the IniParent chain for PlatformExtensions
#rb ethan.geller

[CL 11346916 by Josh Adams in Main branch]
2020-02-11 13:51:26 -05:00
Ben Marsh
64e23d62de UBT: Output toolchain info when doing XGE export.
#rb none
#rnx

[CL 11341939 by Ben Marsh in Main branch]
2020-02-11 12:56:09 -05:00
Ben Marsh
6615366b2f Use VS2017 by default when running static analysis with PVS studio.
#rb none
#fyi Marc.Audy
#rnx

[CL 11341779 by Ben Marsh in Main branch]
2020-02-11 12:38:20 -05:00
Josh Adams
eafc89607e - Yet more lz4 fixes, for NonUnity, this time
#rb none
#jira UE-88502, UE-88501
#rnx

[CL 11341032 by Josh Adams in Main branch]
2020-02-11 10:59:23 -05:00
hongyi yu
6113e739fc Merge JoshA's fix to config hierarchy from engine
- Fixed the platform extension config location checks in C# to match C++

[FYI] Josh.Adams


#ROBOMERGE-SOURCE: CL 11310070 via CL 11310074
#ROBOMERGE-BOT: (v653-11302973)

[CL 11311379 by hongyi yu in Main branch]
2020-02-10 16:05:03 -05:00
Josh Adams
fc1220a663 - Fixed the platform extension config location checks in C# to match C++
#rb hongyi.yu

[CL 11309846 by Josh Adams in Main branch]
2020-02-10 15:17:47 -05:00
Josh Adams
75ef276574 - Final fix for lz4 IncludeTool warnings
#rb none

[CL 11309470 by Josh Adams in Main branch]
2020-02-10 15:04:04 -05:00