Commit Graph

3252 Commits

Author SHA1 Message Date
JeanFrancois Dube
978c409e32 Fix SPropertyEditorAsset to properly handle SoftObjectPtr for partitioned worlds by testing existence of the unloaded actors instead of failing if the world is loaded but not the actor.
Also hide the browse button on SoftObjectPtr properties when in a partitioned world, as it used to load the corresponding sublevel. This could be replaced with a "load referenced actor" button in the future.

#rb richard.malo
#robomerge[STARSHIP] Release-5.0-EarlyAccess

[CL 15675812 by JeanFrancois Dube in ue5-main branch]
2021-03-11 08:52:37 -04:00
Zousar Shaker
508cca6baf Control lazy load of TObjectPtr properties through the use of metadata on the referenced class type or the individual property. Not currently enabled without the presence of "-AllowLazyResolve" on the command line.
Ensured loads that need to happen from a reference resolve off the game thread get shunted to the game thread.
Code changes to avoid easily-avoidable object reference resolves that would otherwise reduce benefits of lazy load.
Further work pending to avoid object resolution during serialization phases at cook time and define cook-specific lazy load configuration.

Tested:
ShooterGame editor, cook, PIE

#rb devin.doucette

[CL 15647559 by Zousar Shaker in ue5-main branch]
2021-03-08 19:03:51 -04:00
Dave Belanger
cd95a938f5 Ensure that the class source object is marked standalone so it doesn't get GC'd in the editor. This is needed for a BPGC asset in a cooked package.
#rb Phillip.Kavan
#jira none

[CL 15644776 by Dave Belanger in ue5-main branch]
2021-03-08 15:52:23 -04:00
Matt Peters
6895cee3ee EditorDomainSave - Strip bulk data from EditorDomain copies of packages. BulkData types in the EditorDomain have flags set to load the data from workspace domain version of the file.
#rb Paul.Chipchase
#rnx

[CL 15643329 by Matt Peters in ue5-main branch]
2021-03-08 14:13:00 -04:00
Marc Audy
8f73cd7fa9 Merge UE5/Release-Engine-Staging @ 15630841 to UE5/Main
This represents UE4/Main @ 15601601

[CL 15631170 by Marc Audy in ue5-main branch]
2021-03-05 19:27:14 -04:00
etheranger
6682e5e5e0 Unshelved from pending changelist '15566751':
PR #7802: Allow spaces in CoreRedirect definitions. (Contributed by etheranger)

[CL 15623861 by etheranger in ue5-main branch]
2021-03-05 10:01:44 -04:00
richard malo
ba02b6c542 Fixed LinkerLoad not remapping imports when running with -game
#rb francis.hurteau
[FYI] jeanfrancois.dube

#ROBOMERGE-SOURCE: CL 15587924 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15587932 by richard malo in ue5-main branch]
2021-03-03 17:24:37 -04:00
Zousar Shaker
be45ee6a23 Fix non-unity compile error due to missing include.
#jira UE-109855
#rb trivial

[CL 15584093 by Zousar Shaker in ue5-main branch]
2021-03-03 12:50:39 -04:00
Zousar Shaker
c85c06f057 Revision 2 (with handling for uninitialized object references):
-Compile in lazy resolve functionality for editor binaries
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
  -Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
  -Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve

Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet

Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests

#rb devin.doucette

[CL 15571874 by Zousar Shaker in ue5-main branch]
2021-03-02 14:39:53 -04:00
francis hurteau
5709d06148 Change relevant ensure in Save2 to use their ensureMsgf variant to provide additional error context.
#rb Matt.Peters
#jira UE-108910

#ROBOMERGE-SOURCE: CL 15568966 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15569010 by francis hurteau in ue5-main branch]
2021-03-02 10:58:23 -04:00
danny couture
47635f88b0 Fix potential garbage collector starvation in editor when all worker threads are busy
- Use ParallelFor for reference collection so the game-thread can make progress without the help of worker threads
  - This fixes a potential deadlock between worker threads using FGCScopeGuard and the game-thread trying to complete a GC
  - Add starvation unittest to detect if the garbage collector implementation is starvation free
  - Also protects against ABA problems that might occur when using TLockFreePointerListUnordered and going too wide

NOTES
  - The fix is only active in Editor to avoid introducing regression where big/little cores are important
  - Heavy use of FGCScopeGuard is currently not expected for non-editor workflows, this might get revisited later

TESTS
  - Confirm that FGarbageCollectorStarvationTest fails without the ParallelFor
  - Confirm that FGarbageCollectorStarvationTest succeeds when using the ParallelFor

#rb Francis.Hurteau, Robert.Manuszewski

[CL 15568134 by danny couture in ue5-main branch]
2021-03-02 07:41:04 -04:00
Yuriy ODonnell
6679906437 Fixed compile errors when static analyzer is enabled in Test configs.
Static analyzer always evaluates expressions in check(), despite DO_CHECK=0 due to implementation of check():

    #define check(expr) { CA_ASSUME(expr); }

If checked expression depends on something that's wrapped in `#if DO_CHECK`, it will produce a compile error. The fix is to add USING_CODE_ANALYSIS condition where applicable.

#robomerge Release-5.0-EarlyAccess
#rb Steve.Robb

[CL 15527660 by Yuriy ODonnell in ue5-main branch]
2021-02-25 08:57:17 -04:00
Zousar Shaker
0c60eda086 Editgrate-undo //UE5/Main/Engine/Source/Runtime/CoreUObject/... changelist 15514386 as it is suspected in a Frosty issue.
[CL 15524151 by Zousar Shaker in ue5-main branch]
2021-02-24 20:09:58 -04:00
Francis Hurteau
f95f9b2808 Fix FindMostLikelyCulprit for Save2 to adequately report referencers information if a package ends up with illegal references
#rb Matt.Peters
#jira UE-109221

[CL 15522002 by Francis Hurteau in ue5-main branch]
2021-02-24 17:45:22 -04:00
Zousar Shaker
3470e2f356 -Compile in lazy resolve functionality for editor binaries
-Add "-LazyResolveAllImports" commandline switch to allow lazy RESOLVE of all wrapped object references
  -Functionality confirmed: load default map in ShooterGame Editor, cook ShooterGame, load LumenReflectiveTest in FortGPUTestbed, load default map and P_Construct in Frosty
-Renamed "-DisableLoadingAllImports" to "-LazyLoadAllImports" commandline switch to allow lazy LOAD of all wrapped object references and ensured it works with AsyncLoading code path
  -Non functional when combined with lazy resolve - will be worked on afterwards
-Added CPU timing scopes to measure performance impact of lazy resolve

Fixed lazy resolve bugs:
-Ensure null check on an unresolved object reference resolves the object reference (a non-null unresolved reference can become a null resolved reference)
-Ensure hash of an unresolved object reference resolves the object reference and hashes the resultant address (otherwise we can't reliably ensure hash consistency in the face of object redirection or stale references)
-Avoid using package name hash internally as it immediately manifested in hash collisions on a moderately sized project
-Ensure StaticFindObjectFastInternal instead of StaticFindObjectFast to ensure we can find/resolve not fully loaded objects
-Ensure UObjectRedirectors are handled when resolving wrapped object pointers
-Ensure we handle the possibility that a package has been partially loaded and we may not find our target object within it because the object hasn't been created yet

Automated testing:
-Adding hash consistency and redirector resolve tests to ObjectPtr unit tests

#rb devin.doucette

[CL 15514386 by Zousar Shaker in ue5-main branch]
2021-02-24 11:26:58 -04:00
Matt Peters
6b0166c2b5 FUntypedBulkData::Serialize: refactor to ensure that all options for BulkData location (Inline, end of file, various separate files) are supported in all serialization environments.
#rb Paul.Chipchase
#rnx

[CL 15507362 by Matt Peters in ue5-main branch]
2021-02-23 17:21:09 -04:00
sebastien lussier
4c26fc4c10 Fix non-unity build error in ArchiveCrc32.cpp
#rb trivial
#jira UE-109085

#ROBOMERGE-SOURCE: CL 15489762 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15489783 by sebastien lussier in ue5-main branch]
2021-02-22 11:24:17 -04:00
Matt Peters
359d7e314c #jira UE-108869
FindPackagesRecursive needs to handle IPlatformFilePak returning relative paths.
FPackageName::SearchForPackageOnDisk (and therefore the simpler version of FindPackagesRecursive that it uses) needs to consider only headersegment packages.
#rb PJ.Kack
#rnx

[CL 15488968 by Matt Peters in ue5-main branch]
2021-02-22 09:58:07 -04:00
Sebastien Lussier
2aed158821 Removed FHashBuilderArchive, added FArchiveCrc32
#rb jeanfrancois.dube, patrick.enfedaque
#robomerge Release-5.0-EarlyAccess

[CL 15474543 by Sebastien Lussier in ue5-main branch]
2021-02-19 15:13:52 -04:00
Marc Audy
9753392e2b Merge UE5/RES CL# 15462083 to UE5/Main
This represents UE4/Main @ 15414221

[CL 15463811 by Marc Audy in ue5-main branch]
2021-02-18 18:13:28 -04:00
Matt Peters
55210445cc Fix compile errors from IPackageResourceManager refactor if WITH_IOSTORE_IN_EDITOR.
#rb Per.Larsson
#rnx

[CL 15454465 by Matt Peters in ue5-main branch]
2021-02-18 13:21:18 -04:00
Zousar Shaker
985d0221af Avoid installing test access tracker on test construction as that causes it to get used in editor when no tests have been run. Instead install on instantiation of the metrics tracking struct.
#rb devin.doucette

[CL 15425911 by Zousar Shaker in ue5-main branch]
2021-02-16 19:22:58 -04:00
francis hurteau
74e2491115 Fix ArchiveUObject SerializeObjectPtr not updating pointers when modifying reference and the pointer to be set is nullptr
#jira UE-108422, UE-108456
#rb Zousar.Shaker

#ROBOMERGE-SOURCE: CL 15423084 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15423108 by francis hurteau in ue5-main branch]
2021-02-16 17:36:58 -04:00
Francis Hurteau
b0b7099b27 Do not capture objects to transaction when they are marked with any async flags
Do not allow new transaction to be created while in the midst of loading packages or post loading objects
Temporarily shelve an opened transaction while ticking async loading in the main thread and consider this scope as "loading packages"

#rb Jamie.Dale

[CL 15397637 by Francis Hurteau in ue5-main branch]
2021-02-12 10:56:07 -04:00
Matt Peters
59e73d3ee0 Editor Domain Prototype
#rb Zousar.Shaker, Devin.Doucette
#rn Minor Cooking

[CL 15393096 by Matt Peters in ue5-main branch]
2021-02-11 18:17:01 -04:00