Commit Graph

2020 Commits

Author SHA1 Message Date
michael nicolella
cd56533446 Adding a thread_local global FFrame* tracking pointer that mimics the ScriptStack in the FBlueprintContextTracker, but remains enabled when DO_BLUEPRINT_GUARD=0
#rb Phillip.Kavan
#preflight 6279dc5b5b16ddee36e88d21

#ROBOMERGE-AUTHOR: michael.nicolella
#ROBOMERGE-SOURCE: CL 20118901 via CL 20120619 via CL 20120654 via CL 20120674
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20121921 by michael nicolella in ue5-main branch]
2022-05-10 09:04:27 -04:00
robert millar
ef3f3a4ef0 Always include referencing property info in HandleGarbageReference since it's guarded by a cvar anyway.
Allow ENABLE_GC_OBJECT_CHECKS to be overriden outside of GarbageCollection.h

#rb none

#ROBOMERGE-AUTHOR: robert.millar
#ROBOMERGE-SOURCE: CL 20085499 via CL 20086136 via CL 20086228 via CL 20086317
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20108298 by robert millar in ue5-main branch]
2022-05-09 15:04:33 -04:00
louisphilippe seguin
521fda3d2d NetConditionGroup feature
* Added new ELifetimeCondition COND_NetGroup, that is only supported on replicated subobjects.
* Any subobject using COND_NetGroup must be part of a netcondition group via the NetConditionGroupManager world subsystem for it to get replicated.
* PlayerControllers can be members of a group via IncludeInNetConditionGroup
* When a netgroup subobject replicates to a connection we will only replicate it if the playercontroller of the connection is a member of atleast one group of that subobject.
* NetGroupOwner and NetGroupReplay are special groups that automatically replicate to the owner's connection or the replay net driver.
* This feature is only available to Actors or Actorcomponents with bReplicateUsingRegisteredSubObjectList = true

#jira UE-132891
#rb Ryan.Gerleve, Mattias.Hornlund, John.Barrett

#ROBOMERGE-AUTHOR: louisphilippe.seguin
#ROBOMERGE-SOURCE: CL 20076279 via CL 20076546 via CL 20076844
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20106219 by louisphilippe seguin in ue5-main branch]
2022-05-09 13:48:08 -04:00
paul chipchase
6cef6bb3c3 Add a utility to load a package trailer directly from an archive
#rb trivial
#rnx
#preflight 6273dd6a5c29fb7661e98c60

[CL 20057584 by paul chipchase in ue5-main branch]
2022-05-05 10:34:32 -04:00
nick darnell
06aed28a93 Engine - Adding support for Double Range types, as well as reading doubles in metadata.
[REVIEW] [at]Matt.Kuhlenschmidt

#ROBOMERGE-AUTHOR: nick.darnell
#ROBOMERGE-SOURCE: CL 20029842 via CL 20029853 via CL 20029859
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20035025 by nick darnell in ue5-main branch]
2022-05-03 19:47:22 -04:00
paul chipchase
404eebde89 Add a utility to load a package trailer directly from a file using a string based file path rather than FPackagePath
#rb trivial
#rnx
#preflight 627145185e6ce673f443b981

- This can be used to load a trailer from a package file that is not stored in a mount point (and so would fail if FPackagePath is used)

[CL 20026913 by paul chipchase in ue5-main branch]
2022-05-03 11:54:19 -04:00
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
Matt Peters
8d0a30a7a9 Cooker: Add PKG_CookGenerated to mark packages that are generated during the cook and do not exist in the workspace domain.
#jira UE-150443
#rb Francis.Hurteau
#rnx
#preflight 6270344a91629533ec24e83e

[CL 20014384 by Matt Peters in ue5-main branch]
2022-05-02 16:01:27 -04:00
Matt Peters
cafc7ab8d9 Delete SavePackage1. It has been replaced by SavePackage2 and is no longer supported.
#preflight 626fd27dad00dced62bd9c52

[CL 20007527 by Matt Peters in ue5-main branch]
2022-05-02 09:04:05 -04:00
michael nicolella
7839536cf5 added EBlueprintExceptionType::AbortException, when raised it sets a flag on the FFrame to signal that script execution should stop and return ASAP. It is currently only checked in the interpreter loop inside ProcessLocalScriptFunction.
- FBlueprintContextTracker::GetScriptStack is deprecated
- FBlueprintContextTracker::GetCurrentScriptStack() now returns a TArrayView so that the view of the stack remains const
- FBlueprintContextTracker::GetCurrentScriptStackWritable() added for uses that explicitly need writable access to the stack
- FBlueprintCoreDelegates::ThrowScriptException now needs a non-const FFrame to be able to set the abort flag

#rb matt.breindel julien.marchand phil.pizlo phillip.kavan
#preflight 626c710d2c01a675267ebcab

#ROBOMERGE-AUTHOR: michael.nicolella
#ROBOMERGE-SOURCE: CL 19992064 via CL 19992251 via CL 19992502 via CL 19992685
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19995787 by michael nicolella in ue5-main branch]
2022-04-30 13:03:18 -04:00
Marc Audy
d9c630dcd8 Add IsInheritedInstance to exports
#rb Phillip.Kavan
Add missing generate public hash entries to ArchiveStackTrace
#fyi Francis.Hurteau
#preflight 626c692cb046e6ecc338080e
#lockdown JeanFrancois.Dube

[CL 19988606 by Marc Audy in ue5-main branch]
2022-04-29 20:15:15 -04:00
Marc Audy
a8fa02a366 Shrink FObjectExport (144 -> 120): Remove deprecated PackageGUID and Dynamic Type, and properly pack members
#rb Robert.Millar
#lockdown JeanFrancois.Dube
#preflight 626c50940b45792efb69a48c

[CL 19986766 by Marc Audy in ue5-main branch]
2022-04-29 17:38:17 -04:00
ben hoffman
dbc350c3a0 Mark FPlatformInputDeviceState properties as BP read only so that you can access them when needed in blueprints, and they show up in the details panel.
#jira none
#rb trivial
#rnx
#preflight 626c4bdb5c220f34ac10b29b

[CL 19986599 by ben hoffman in ue5-main branch]
2022-04-29 17:26:35 -04:00
ben hoffman
920dd97ce4 Blueprint support for FInputDeviceId and FPlatformUserId.
- Expose Platform User IDs and Input Device IDs to blueprints and other UPROPERTY uses allowing users to call functions from blueprints.
- Add events on the game instance that you can hook onto in blueprints
- Add accessors to the PC

#jira UE-147801
#rb marc.audy
#preflight 626ac71cb17dd9121b42650c

[CL 19965758 by ben hoffman in ue5-main branch]
2022-04-28 14:10:49 -04:00
paul chipchase
5fb1389ae8 Fix a number of bugs found when saving more complex package types with virtualization enabled.
#rb PJ.Kack
#rnx
#preflight 626a7ef2485a2fed3a2e04d7

- Note that these problems were not causing crashes, but they did cause errors to be logged about invalid formats and request the packages to be re-saved.
- Most of the problem comes from the code paths being too complicated, hopefully now things are locked down we should be able to start pruning this soon and make it easier to maintain in the future.

### Problem
- The problem comes from certain package setups that allow for the existence of duplicate payload entries where one entry is local or referenced and another version is virtualized. If a trailer is created from this data then the virtualized entry will be discarded (as the look up table is a map) and we revert to using the non virtualized payload instead. Ideally we'd want to discard the local/referenced payloads in favour of the virtualized one to save space.
-- By itself this bug would waste disk space but not cause other problems, however we were also writing out the virtualized flag so that when the bulkdata is next loaded it has the virtualized flag but then checks with the trailer and is told that it is not virtualized which triggers some asserts I added to find badly formed data.
- How the package gets duplicate entries like this is somewhat complicated involing duplicating objects from other (already virtualized) packages during load, then saving them (found in packages with Niagra assets at least)

### Fix
- When creating a trailer from a trailer build, we first find any local and/or referenced entries and check if there are duplicate entries in the virtualized payload entries. If so we remove the local/referenced version in favor of using the virtualized version.
-- Ideally we'd do this during the serialization of exports as it might let us skip the loading of some payloads for save entirely, however we don't know all the entries until after export serialization is completed so this is the only point we can search for duplicates safely.
- Added a way to get the full name of the owning asset, including package name + asset, when asking the user to re-save. This makes debugging the problems easier.
- Add a new check when loading to find payloads saved with the virtualization flag and to a trailer. If we do find one we warn the user that they should re-save the package and remove the flag so that no further problems occur.
- Demoted the old check for bad formats to a warning as we don't need to fail builds because of it.
-- Additionally we now only give the warning if we detect that we are loading from a package, as being virtualized and not in a package trailer would be valid when loading from other sources.
- Added comments to consider removing both checks asking the user to re-save the package after 5.2, as in theory we should only ever see these problems internally at Epic as it is unlikely that externals will have enabled the system.
- When saving a virtualized payload to the trailer, make sure to remove the virtualized flag, that should be picked up on load by polling the trailer for the payload status and should not be baked into the export data.
-- Hypothetically this will allow for us to re-hydrate the package without re-saving it through manipulating the trailer.

[CL 19963043 by paul chipchase in ue5-main branch]
2022-04-28 11:45:40 -04:00
David Harvey
2a8d225bba fix for bulkdata template link errors in modular builds.
#jira UE-150227
#rnx
#preflight 62681f2fdd35c0d6cab45853
#rb Matt.Peters

[CL 19936402 by David Harvey in ue5-main branch]
2022-04-27 05:18:35 -04:00
robert manuszewski
0036ccad63 Adding *Safe versions of FindObject functions that take FTopLevelAssetPath as parameter
#rb trivial
#preflight 6267f4e3b463c026bf6a57cb

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19919555 via CL 19922206 via CL 19922653
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19925617 by robert manuszewski in ue5-main branch]
2022-04-26 14:38:04 -04:00
robert manuszewski
51e57f8d10 Adding UObject related utility functions that use FTopLevelAssetPath
#preflight 6267e00e272f4a558dbee4a4
#rb Steve.Robb

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19918957 via CL 19921478 via CL 19921971
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19924413 by robert manuszewski in ue5-main branch]
2022-04-26 13:45:13 -04:00
Matt Peters
e6687c56ac BulkDataRegistry: Fix EditorBuildInputResolver to set Status to Error in the cases where a registered BulkData is found but it cannot find its payload.
Remove bValid from FMetaData and FData return structs; it is redundant with the RawHash/Buffer data already present in those structs.
#preflight 62680b42430b9997ebe0a46d
#rb Devin.Doucette
#rnx

[CL 19923039 by Matt Peters in ue5-main branch]
2022-04-26 12:47:22 -04:00
brian bekich
e323a2acda Moving custom property conditions out of the net driver
Stored per object, and can be set from any game code, not just PreReplication

#rb ryan.gerleve, peter.engstrom

#ROBOMERGE-AUTHOR: brian.bekich
#ROBOMERGE-SOURCE: CL 19909058 via CL 19911194 via CL 19911458
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19913111 by brian bekich in ue5-main branch]
2022-04-25 20:29:52 -04:00
pj kack
c500f3e469 GC: Restrict the giant FGCCSyncObject and FUObjectHashTables locks to the reachability analysis phase.
It is possible to toggle to the previous/legacy behavior with gc.GCLockBehavior=1.

Legacy behavior:
A giant FGCCSyncObject lock for the complete duration of CollectGarbageInternal.
A giant FUObjectHashTables lock for most of CollectGarbageInternal except the execution of the GetPreGarbageCollectDelegate and GetPostGarbageCollect callbacks.
Giant FGCCSyncObject and FUObjectHashTables locks for IncrementalPurgeGarbage (inluding both UnhashUnreachableObjects and IncrementalDestroyGarbage).

Unchanged behavior:
The GIsGarbageCollecting contract is fuzzy and the behavior is not changed at this point to reduce risk.
GIsGarbageCollecting is set during CollectGarbageInternal.
GIsGarbageCollecting is also set during the IncrementalDestroyGarbage phase of IncrementalPurgeGarbage, but not during UnhashUnreachableObjects. Why???
Many use cases seems to be as simple as to avoid the StaticFindObject asserts, but there are definitely use cases that are harder to reason about like UObject::GetDefaultSubobjectByName, UObject::CanModify, UChildActorComponent::DestroyChildActor, AActor::ProcessEvent, AGroupActor::PostRemove, UEditorEngine::UndoTransaction, UEditorEngine::RedoTransaction, DatasmithRuntime::FSceneImporter, ...

Changed legacy and default behavior:
Move PostReachabilityAnalysis.Broadcast after GatherUnreachableObjects, NotifyUnreachableObjects and ClearWeakReferences.
StaticAllocateObject and the StaticFindObject functions are now checking IsGarbageCollectingAndLockingUObjectHashTables instead of IsGarbageCollecting/IsGarbageCollectingOnGameThread,
but when using the legacy behavior IsGarbageCollectingAndLockingUObjectHashTables should have the same meaning as IsGarbageCollecting.

New default behavior:
Restrict the giant scope of locking FGCCSyncObject and FUObjectHashTables during CollectGarbageInternal to DissolveClusters, VerifyGCAssumptions, PerformReachabilityAnalysis, GatherUnreachableObjects, NotifyUnreachableObjects and ClearWeakReferences.
Remove the giant FGCCSyncObject lock completely during IncrementalPurgeGarbage (including UnhashUnreachableObjects and IncrementalDestroyGarbage).
Remove the giant FUObjectHashTables lock completely during IncrementalDestroyGarbage.
This means BeginDestroy, FinishDestroy, destructors and callbacks are all executed without the giant FGCCSyncObject and FUObjectHashTables locks and they are all relying on existing smaller thread safety locks for for accessing the global uboject array and global hash tables.

#jira UE-145217, UE-144461, FORT-369252
#rb francis.hurteau, danny.couture, robert.manuszewski, robert.millar
#rnx

#ROBOMERGE-OWNER: pj.kack
#ROBOMERGE-AUTHOR: pj.kack
#ROBOMERGE-SOURCE: CL 19898875 via CL 19899297 via CL 19899332 via CL 19899335
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19902015 by pj kack in ue5-main branch]
2022-04-25 10:13:44 -04:00
keith yerex
b321f0b4ee Fix for race condition in Property Access PostLoad code.
#preflight 6262023aa2579b4c772bfc75

#ROBOMERGE-AUTHOR: keith.yerex
#ROBOMERGE-SOURCE: CL 19865362 via CL 19865432 via CL 19866497 via CL 19868767 via CL 19869044
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19874250 by keith yerex in ue5-main branch]
2022-04-22 17:41:19 -04:00
robert manuszewski
9433f67575 Moving utility functions related to linker tables from FLinker to FLinkerTables to have access to these functions from the AssetRegistry code (required for ANY_PACKAGE removal)
#preflight 62624275d929bc34a314904f
#rb PJ.Kack, Francis.Hurteau, Johan.Torp

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19862123 via CL 19866075 via CL 19866162
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19871312 by robert manuszewski in ue5-main branch]
2022-04-22 16:03:25 -04:00
robert manuszewski
6eb66dac53 New StaticFind*Object(s) helper functions related to ANY_PACKAGE removal
#preflight 62622f90fa2fe71a2d1797ba
#rb Steve.Robb

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19861451 via CL 19865767 via CL 19865981
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19871301 by robert manuszewski in ue5-main branch]
2022-04-22 16:03:10 -04:00
robert manuszewski
6f607bdd0c Exposing FTopLevelAssetPath to Blueprints
#preflight 62622fd702627605e76deeaa
#rb Robert.Millar

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 19861424 via CL 19865756 via CL 19865975
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19871291 by robert manuszewski in ue5-main branch]
2022-04-22 16:02:57 -04:00