Commit Graph

5182 Commits

Author SHA1 Message Date
ben zeigler
eb53ce238e Remove TagAtLastTest from SoftObjectPtr (and LazyObjectPtr) as it was only used for edge cases involving stale weak pointers and caused bugs when objects are created without calling InvalidateTag
Removing this field saves significant memory and allows removing a per-thread variable to improve performance overall
Fix a redundant dereference in SynchronousLoad and use a faster IsValid function for validating a weak pointer after resolve
#jira UE-187216
#rb robert.millar

[CL 25792946 by ben zeigler in ue5-main branch]
2023-06-05 11:22:03 -04:00
danny couture
5311d0b7f6 Disable postload group in editor as it cause circular dependencies by trying to flush everything instead of only what's necessary
Only preload the current package instead of the whole hierarchy recursively

#rnx
#rb PJ.Kack, Francis.Hurteau
#preflight 64788f45947ff6973c0a1e7c

[CL 25788188 by danny couture in ue5-main branch]
2023-06-05 04:32:48 -04:00
kirill zorin
482cf2d5cd AddReferencedObjects: addressing additional review feedback
#rb johan.torp
#preflight none

[CL 25773530 by kirill zorin in ue5-main branch]
2023-06-02 16:53:45 -04:00
Matt Peters
5493f6daf0 SavePackage EditorOnly detection:
HasNonEditorOnlyReferences needs to be applied to suppress the checking of archetype and class for editoronly. It already applies to suppressing IsNeededForClient=false and IsEditorOnly=true, but checking the archetype+class also needs to be suppressed. This is necessary to support instances of UWidgetBlueprint, because the UWidgetBlueprint type and CDO are in the UMGEditor package and so are editoronly. But instances of UWidgetBlueprint, like instances of UBlueprint, should be treated as not editoronly when saving in editor.

Remove the workaround for WidgetBlueprints that was added in HarvestPackage - harvesting CDOs as toplevel objects even though they are not RF_Standalone.

Related but not vital: Deprecate bCheckMarks argument from IsEditorOnlyObject. SavePackage was the only user and no longer uses it.

#rb Francis.Hurteau
#rnx
#preflight 6477be677f02573726abebf9

[CL 25763169 by Matt Peters in ue5-main branch]
2023-06-02 11:46:36 -04:00
andrew rodham
f9dc589d23 Sequencer: Bitfield boolean properties are now able to use fast property offsets
Bitfields were previously not supported because there was no exposed way of determining how an FBoolProperty is mapped in memory. Using fast pointer offsets would have previously caused us to always stomp a full byte over the address. Since we now support meta-data on property components (which is already used by colors and vectors), we can use the FBoolProperty when resolving the property to detect the bitoffset if FBoolProperty::IsNativeBool is false. (see usage of CountTrailingZeros64 inside FBoolHandler)

For my test this pulls down the cost of assigning boolean flags for PostProcessingOverrides from 15us to 1.7us.

Other miscellaneous changes included:
  - Added a way for traits to tell the component handlers that they are not composite property types. This causes them to use direct property setters rather than requiring a composite temporary, and prevents the handler from instantiating partial property setter code.
  - Moved custom accessor functions into their own file. Added one for ULightComponent::VolumetricScatteringIntensity.

#rb Ludovic.Chabant, Max.Chen
#preflight 647907a6e319748a835fbd06

[CL 25760044 by andrew rodham in ue5-main branch]
2023-06-02 10:12:22 -04:00
kirill zorin
4dafe4fcdc Remove unused file
#rb johan.torp
#preflight none

[CL 25749587 by kirill zorin in ue5-main branch]
2023-06-01 20:28:51 -04:00
joe pribele
f2b80ba74b added GetOuter and GetPackage to FObectPtr and TObjectPtr
changed how the Object Handle index stores info to be able to get the class of the outer objects
Packages dont' store a ObjectPathId or ClassDescriptor as it is always known

https://p4-swarm.epicgames.net/reviews/25378953
#rb zousar.shaker
#preflight 64791957e25209b6cbbb45fc

[CL 25747367 by joe pribele in ue5-main branch]
2023-06-01 18:45:09 -04:00
joe pribele
6c77f6cdc5 fix for not setting up properties correctly.
this matches the uht generated code more closesly
https://p4-swarm.epicgames.net/reviews/25707323

#rb matt.peters
#preflight 64791483e25209b6cbb931ac

[CL 25746642 by joe pribele in ue5-main branch]
2023-06-01 18:22:59 -04:00
joe pribele
4a972d82fb moved to #include PrintStaleReferencesOption to its own file for better compile iterations
https://p4-swarm.epicgames.net/reviews/25725441

#rb johan.torp
#preflight 6478f447947ff6973c33b134

[CL 25745328 by joe pribele in ue5-main branch]
2023-06-01 17:57:01 -04:00
steve robb
1001fcc39a Added UE_FORCE_CONSTEVAL macro to cause a constexpr expression to be evaluated at compile time when used as a subexpression of a runtime expression.
Added some usage of the macro around FMath::ConstExprCeilLogTwo.

#rb devin.doucette
#preflight 6478c777c26e3b24490353a0
[FYI] andrew.scheidecker

[CL 25736427 by steve robb in ue5-main branch]
2023-06-01 15:19:25 -04:00
jeanfrancois dube
c650b7011a Don't consider objects part of a PIE package as assets.
Backout CLs 25587512 + CL25420856.

#jira UE-186433
#rb matt.peters
[FYI] patrick.enfedaque
#preflight 6478b6658417d79259021cef

[CL 25730791 by jeanfrancois dube in ue5-main branch]
2023-06-01 13:00:56 -04:00
tom waterson
b2a34a684b Add torque units and extend force units
#rb justin.hare
#preflight 647862b85d23eca37d782f2c

[CL 25723425 by tom waterson in ue5-main branch]
2023-06-01 07:44:12 -04:00
Matt Peters
9337daf49c EditorBulkData: Remove accidentally-submitted debug code.
#fyi Paul.Chipchase
#rb None, trivial
#rnx
#preflight None, trivial

[CL 25716020 by Matt Peters in ue5-main branch]
2023-05-31 17:54:34 -04:00
matt peters
8257f5ed73 AssetRegistry and ExternalActors: Ignore ExternalActors that have a packagename that does not match their objectpath. These actors were created by an editor bug during saveas, and they can hide the true actors that have that objectpath.
#rnx
#rb JeanFrancois.Dube
#preflight 647754a18804572bdef40fc4

[CL 25703597 by matt peters in ue5-main branch]
2023-05-31 11:57:32 -04:00
johan torp
099571e69d Added extra checks to help pinpoint potential GC schema memory stomp or use-after-free found once in CI tests
#rnx
[FYI] andrew.scheidecker
#preflight 6477488e03438130a465f509
#rb none

[CL 25702673 by johan torp in ue5-main branch]
2023-05-31 11:05:33 -04:00
Wojciech Krywult
d1baf24722 AsyncIO: Fixed incorrect handling of the STAT_AsyncFileMemory stat.
I've reviewed all code using async requests and we had multiple places incorrectly handling the stat: some placed failed to decrease the counter, while others would decrease it when they shouldn't. The main cause was the fact that when we create an async request and pass nullptr as the target memory, the request allocates the memory itself and increases the STAT_AsyncFileMemory. However, when we call GetReadResults() on such requests, the responsibility is on the caller to balance the calls and decrease the stat, which is not very obvious and leads to the mentioned bugs. On top of that, when we call GetReadResults() we may not have the knowledge as to whether the returned memory was allocated by the request or not (which may affect whether we should touch the stat at all).

Resolved by adding IAsyncReadRequest::ReleaseMemoryOwnershipImpl member, which may be used by request implementations to do the proper clean up (balance the stat). This way requests take the full responsibility for their changes and users of the requests don't need to know their implementation details.

#preflight none
#rb Patrick.Laflamme
#jira UE-185064

[CL 25664733 by Wojciech Krywult in ue5-main branch]
2023-05-29 12:11:37 -04:00
johan torp
2a7e437f2c Add FReferenceCollector::AddPropertyReferencesWithStructARO class overload
#rb mikko.mononen
#rnx
#preflight 6470a6dd7e35fee9abb2289e

[CL 25662210 by johan torp in ue5-main branch]
2023-05-29 03:28:57 -04:00
Johan Torp
02f885ff7b Add FReferenceCollector::AddPropertyReferencesWithStructARO class overload
#rb mikko.mononen
#jira none
#rnx
#preflight 6470a6dd7e35fee9abb2289e

[CL 25662181 by Johan Torp in ue5-main branch]
2023-05-29 03:25:33 -04:00
kirill zorin
b6ee3a6c64 Fix UE_LOG callsites that have format string-related UB
#rb trivial
#preflight 647107780a6634dbb236a0a6

[CL 25651638 by kirill zorin in ue5-main branch]
2023-05-26 15:52:39 -04:00
phillip kavan
18ebe38feb Fix for an editor crash when editing sparse class data fields in Blueprint class defaults.
#rb Jamie.Dale, Mikko.Mononen
#preflight trivial

[CL 25645513 by phillip kavan in ue5-main branch]
2023-05-26 12:21:59 -04:00
maxime mercier
ed8c619e4b [Backout] - CL25608085
[FYI] Maxime.Mercier
Original CL Desc
-----------------------------------------------------------------
Fix reference replacement of set not being rehash when key are replaced

#rb [at]Steve.Robb
#preflight 646e2d4d1134ffac70a5d655

[CL 25644174 by maxime mercier in ue5-main branch]
2023-05-26 12:01:15 -04:00
danny couture
6d4c3e6e1c Add missing PlayInEditorID scope in zenloader
#rnx
#rb Francis.Hurteau
#preflight trivial

[CL 25644091 by danny couture in ue5-main branch]
2023-05-26 11:59:40 -04:00
andrew phillips
3e141f371d Added serial number to archetype cache to prevent returniong stale pointers.
#jira UE-180605
#preflight 646f1b3d6c2a2532b12e1187

[CL 25635303 by andrew phillips in ue5-main branch]
2023-05-25 19:34:37 -04:00
michael nicolella
ff703397ff [autortfm] add initial support for UE_USE_VIRTUAL_STACK_ALLOCATOR_FOR_SCRIPT_VM - when transactional we bypass the stack allocator and fall back to FMemory. To be replaced later by returning to stack allocator behavior after we have runtime support for it
#preflight 646ed010f85111e06cd96407

[CL 25634546 by michael nicolella in ue5-main branch]
2023-05-25 19:20:23 -04:00
robert millar
417f22a47f Add additional checks for object hash errors to be clearer about possible memory corruption.
#rb none

[CL 25632274 by robert millar in ue5-main branch]
2023-05-25 18:22:11 -04:00