27 Commits

Author SHA1 Message Date
arciel rekman
3eddd55e4f Add facility to safety-check raw AActor pointers used by ReplicationGraph.
- Attempting to avoid a rare crash and log more info about the circumstances.

#rb Matt.Harris, Ryan.Gerleve

[CL 31594002 by arciel rekman in 5.4 branch]
2024-02-16 20:18:08 -05:00
matt harris
5fa6efb72f Adding support for RepGraph GarbageCollected Actor checking in all modes (not just Valkyrie) which will allow us to track down cases where an actor has been GCed but remains in a RepGraph node. Previously this was compiled out in other modes, but now we add the delegate in all modes so that it can be toggled at runtime if necessary.
Adding support for IsValidLowLevel validity checks to ReplicationGraphDebugging - this allows us to catch cases where IsValid checks pass, but the actor is invalid when doing the Verify step. This is much slower, so disabled by default.


[REVIEW] [at]louisphilippe.seguin
#rb julien.marchand, LouisPhilippe.Seguin
[FYI] urias.rooney, richard.smith
#tests Client + Dedicated Server Win64 Cooked Data

#localization none
#preferred_allowlister julien.marchand

[CL 29878397 by matt harris in ue5-main branch]
2023-11-21 18:37:06 -05:00
urias rooney
4d57c73ff0 ## RepGraph actor reference validation
* Added ValidateActorReferences to RepGraph and RepGraphNode types
  * Iterates over all nodes in the RepGraph and checks for potentally stale actor references

## Performance

Tested on a Win64 Test Server
* ValidateActorReferences: 10-20us

[CL 26714029 by urias rooney in ue5-main branch]
2023-07-31 14:01:45 -04:00
louisphilippe seguin
84b4cc7018 RepGraph
* Fix log spam caused by actors going outside the legal world bounds and staying OOB.
* Now we will only log a warning once when the actor goes OOB
* net.ReplicationGraph.PrintGraph now prints the list of DynamicSpatializedActors monitored by the Grid2D node.

#rb Ryan.Gerleve

[CL 25934977 by louisphilippe seguin in ue5-main branch]
2023-06-12 15:27:57 -04:00
Brian Bekich
26610f72b2 Enabling UnsafeTypeCastWarningLevel for rep graph
#jira none
#preflight 641882a042618c85c48c0385
#rb louisphilippe.seguin, jon.fairchild, ryan.gerleve

[CL 24732881 by Brian Bekich in ue5-main branch]
2023-03-21 11:42:33 -04:00
brian bekich
1de597a7bb Add optional driver name filter to rep graph debug commands
#rb ryan.gerleve

[CL 24138163 by brian bekich in ue5-main branch]
2023-02-11 13:03:07 -05:00
henrik karlsson
2f78497e67 [Engine/Plugins]
* Updated private files with IWYU for all plugins which had 3 or less changes made in ue5 main since last integration to fn

#preflight 63bf8d8b577437afe607dc72
#rb none

[CL 23659643 by henrik karlsson in ue5-main branch]
2023-01-12 01:48:34 -05:00
louisphilippe seguin
8ead96f9c2 ReplicationGraph
* Refactored Dependent actor lists so the child actors are stored by streaming levels
* Now dependent actors are not replicated if the connection does not have the streaming level loaded
* Added FLevelBasedActorList struct to RepGraph plugin. Holds actors based on their level (permanent or streaming)

#jira UE-159638
#rb Ryan.Gerleve, Brian.Bekich

[CL 23480107 by louisphilippe seguin in ue5-main branch]
2022-12-12 13:39:19 -05:00
Andrew Davidson
8d844cd4a6 Improve support for an extended WORLD_MAX
#rb various, trivial
#preflight 62a1cb46f73a01bd981b9978

[CL 20573655 by Andrew Davidson in ue5-main branch]
2022-06-09 07:03:13 -04:00
robert manuszewski
d1443992e1 Deprecating ANY_PACKAGE.
This change consists of multiple changes:

Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used  in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values

AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes

Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names

#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32

#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20448496 by robert manuszewski in ue5-main branch]
2022-06-01 03:46:59 -04:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
jason adcock
1ff20f1a6e GitHub 7723 : Use DO_ENABLE_REPGRAPH_DEBUG_ACTOR where applicable
#jira UE-107437
#7723
#rb brian.bekich

#ROBOMERGE-AUTHOR: jason.adcock
#ROBOMERGE-SOURCE: CL 18023724 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)

[CL 18023764 by jason adcock in ue5-release-engine-test branch]
2021-11-02 15:32:04 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
Marc Audy
50a3d7d368 Merge Release-Engine-Staging to Main @ CL# 14467590
This represents UE4/Main @ 14432125 + some cherrypick fixes

[CL 14468207 by Marc Audy in ue5-main branch]
2020-10-09 22:42:26 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
360d078ca3 Second batch of remaining Engine copyright updates.
#rnx
#rb none

[CL 10871248 by Marc Audy in Main branch]
2019-12-27 09:26:59 -05:00
zzgyy123
442d0effac ReplicationGraph
* Upgrade ReplicationPeriodFrame to uint16 to fix overflow error when the NetUpdateFrequency is very low

PR #6330: Fix bug about implict cast of ReplicationPeriodFrame from uint32 to uin8. (Contributed by zzgyy123)
#jira UE-83117
#rb Jake.Leonard


#ROBOMERGE-SOURCE: CL 10451981 via CL 10451994
#ROBOMERGE-BOT: (v595-10452236)

[CL 10452496 by louisphilippe seguin in Main branch]
2019-11-26 10:14:18 -05:00
louisphilippe seguin
262acf7a6a - Net.RepGraph.PrintCullDistances will now work without a RepGraphDebugActor
- Added Net.RepGraph.PrintCullDistancesForConnection which outputs also the connection specific cull distance (uses the  RepGraphDebugActor)
- Added DO_ENABLE_REPGRAPH_DEBUG_ACTOR instead of hardcoded build defines to easily add the RepGraphDebugActor

#rb [at]ryan.gerleve
[FYI] Tim.Tillotson


#ROBOMERGE-SOURCE: CL 8296006 via CL 8354853
#ROBOMERGE-BOT: (v401-8057353)

[CL 8355002 by louisphilippe seguin in Main branch]
2019-08-27 17:30:29 -04:00
jake leonard
739f5ea3fd Replication graph changes to allow for subconnection calculations as well, matching functionality of the netdriver system.
#rb: LouisPhilippe.Seguin, Jon.Nabozny


#ROBOMERGE-SOURCE: CL 5922969 via CL 5931747

[CL 5931993 by jake leonard in Main branch]
2019-04-16 19:16:18 -04:00
louisphilippe seguin
f8e9623b7a -Now caching CullDistance and CullDistanceSquared in ConnectionReplicationActorInfo
-Removes sqrt call in critical path when RepGraph does actor culling.

#rb Ryan.Gerleve


#ROBOMERGE-SOURCE: CL 5764309 via CL 5764873

[CL 5764954 by louisphilippe seguin in Main branch]
2019-04-05 11:18:24 -04:00
jon nabozny
a3c2777e4c Change channel logging to be more information in RepGraph.
[at]Ryan.Gerleve [at]Brian.Bekich [at]Bart.Hawthorne
#rb Bart.Hawthorne

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 4792115 via CL 4792118 via CL 4792120 via CL 4797597 via CL 4797805
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4804144 by jon nabozny in Dev-Networking branch]
2019-01-24 16:00:45 -05:00
cajoebestrotheray
07eafd2337 The ReplicationGraph DebugActor can now be overriden
PR #5439: Repgraph Debug Actor Suggestion (Contributed by cajoebestrotheray)


#jira UE-68269
#rb dave.ratti, ryan.gerleve

[CL 4743659 by LouisPhilippe Seguin in Dev-Networking branch]
2019-01-17 11:42:07 -05:00
ben marsh
2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00
ryan gerleve
289a4fa159 Copying //UE4/Fortnite-Staging to Dev-Main (//UE4/Dev-Main)
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4567513 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4573136 by ryan gerleve in Dev-Networking branch]
2018-11-16 14:01:06 -05:00
Ryan Gerleve
9af1fb3463 Merging //UE4/Dev-Main to Dev-Networking (//UE4/Dev-Networking)
#rb none
#rnx

[CL 4516466 by Ryan Gerleve in Dev-Networking branch]
2018-10-29 10:01:28 -04:00