Commit Graph

5088 Commits

Author SHA1 Message Date
devin doucette
584ea89945 Increased FProperty::IndexInOwner from uint16 to int32 to support types with many properties
#rb Francis.Hurteau

[CL 34372792 by devin doucette in ue5-main branch]
2024-06-14 11:32:26 -04:00
jamie dale
a886ad2faf Split the StaticFindObjectFast fatal log into two so that we can tell which condition is triggering it
[FYI] Francis.Hurteau
#rnx

[CL 34358739 by jamie dale in ue5-main branch]
2024-06-13 18:55:47 -04:00
jordan hoffmann
0d5bf569da [BugFix] Prefab instances aren't getting prefab values for properties that aren't overriden
#rb francis.hurteau

[CL 34356636 by jordan hoffmann in ue5-main branch]
2024-06-13 18:01:55 -04:00
devin doucette
36f5a24ddd Moved TSharedString from DDC into Core
#rb Steve.Robb

[CL 34340152 by devin doucette in ue5-main branch]
2024-06-13 10:40:59 -04:00
steve robb
206d9d76b4 Replaced EAutomationTestFlags::ApplicationContextMask with EAutomationTestFlags_ApplicationContextMask.
[CL 34335388 by steve robb in ue5-main branch]
2024-06-13 07:06:47 -04:00
danny couture
8666ec1c53 [ZenLoader]
- Fix OnAssetLoaded so it is called in -game to match the behavior of the previous loaders

#rnx
#rb kevin.macaulayvacher

[CL 34306179 by danny couture in ue5-main branch]
2024-06-12 09:41:34 -04:00
kevin macaulayvacher
357c98fb83 - UObject::Rename will always remove a mismatching linker unless explicitly told not to via a new rename flag REN_AllowPackageLinkerMismatch. This is meant to be distinct from the deprecated REN_ForceNoResetLoaders as the intent is inverted: There are few reasons to not want to reset loaders when there is a mismatch between package and linker, and when there is no mismatch, we do not want Rename to implicitly resetloaders (we no longer do as of 33136565). The only use case where mismatched linkers is desired is when objects are _temporarily_ renamed to belong to a staging package and desire to have the object continue loading when the object is moved back to the matching linker package (commonly done during blueprint reinstancing). In such a case, the new flag acknowledging the intentional mismatch is meant to be used.
- Any code causing a linker mismatch needs to explicitly clear loading flags for their object to avoid asserting. This is to make the intention clear that rename will make loading correctly impossible when moving the object to a different linker unintentionally. So either clear the loading flags of the object (i.e. finish loading via load calls such as ConditionalPostLoad) or forcibly allow mismatching via the new flag.

- When marking an export as invalid in FLinkerLoad::InvalidateExport() we now also clear loading flags since it is wasteful to load invalid objects.

- Exports marked as invalid are no longer reset to be valid when the linker is reset for the object instance. This is to prevent reloading invalid objects when re-using a linker already resident in memory if a subsequent package load is requested.

- When UStruct upgrades UFields to FFields, the UStruct objects are marked as invalid to prevent reloading the objects unnecessarily

- Fixes an issue where since Rename can clear the linker for mismatched types, any calls to FLinkerLoad::InvalidateExport needs to be moved before the rename operation to be effective.

- CollectUnreachableObjects will no longer mark unreachable objects as invalid in the linkerloader. That code would mark objects as invalid until the linker is destroyed which incorrectly assumed would happen soon. If however a load for the same package occurs before the linker is destroyed, the in-memory linker would be re-used keeping the marked exports as invalid so those exports would not be loaded (even though they should have been).

#jira UE-212466 UE-214849
#rb Francis.Hurteau, Michael.Galetzka
[RN] UObject::Rename will always remove the renamed object's linker if the rename moves the object into a different package. As a result, any renames occuring while an object is loading will now assert instead of leading to hard to diagnose crashes long after the Rename call has completed. If renaming to a different package is intentional and the linker should not be cleared, the new flag REN_AllowPackageLinkerMismatch can be used to prevent clearing linkers on the object even though the linker is for a different package than the package has been renamed to be part of.

[CL 34304935 by kevin macaulayvacher in ue5-main branch]
2024-06-12 08:47:36 -04:00
guillaume patry
d762924500 Support interfaces in FObjectPropertyBase::CheckValidObject
#rnx

[CL 34291760 by guillaume patry in ue5-main branch]
2024-06-11 17:14:33 -04:00
devin doucette
b7be3b322a Added storage of unknown enum names
#jira UE-211458

[CL 34290747 by devin doucette in ue5-main branch]
2024-06-11 16:48:27 -04:00
jordan hoffmann
0a28e28957 [BugFix] CLASS_NewerVersionExists should only impact whether new IDOs get created *not* whether IDOs get saved to disk
[CL 34219186 by jordan hoffmann in ue5-main branch]
2024-06-07 19:24:14 -04:00
jordan hoffmann
f892e8b1b6 [BugFix] Various UI bug fixes and updates for the InstanceDataObjectFixupTool
- changed the FRedirectedPropertyNode to use UE::FPropertyTypeName for it's types so that containers are distinguishable from one another
- made the fixup tool tabs have the name of the object they're fixing
- fixed the needs fixup warning to open several fixup tools if more than one object needs fixup rather than attempting multi-edit
- exluded VerseFunctionProperty from being made into loose properies since they can't realistically get fixed up
- fixed issue that caused incorrect properties to get marked as set by serialization during object copies

[CL 34210729 by jordan hoffmann in ue5-main branch]
2024-06-07 14:59:08 -04:00
andy sonnenburg
0d0508c3f5 Add location information to bytecode.
#rb russell.johnston

[CL 34174845 by andy sonnenburg in ue5-main branch]
2024-06-06 17:01:18 -04:00
ronald koppers
95d5fe7f46 Add TEDS' alert columns to the placeholder rows and components with loose properties.
The following additional changes were made:
- The fix up panel can now take an owning object. This is useful to lookup the object used by the component as in cases likes TEDS the object is used as the reference point.
- Added the central function `CreateInstanceDataObjectFixupDialog` to open up the fixup dialog with at least one tab. There are now multiple cases in code where this happens so helps keep consistency and reduce duplicated code.
- Added a new tag to identify loose properties.
- Added new TEDS queries for monitoring loose properties or placeholder tag and alerts so an alert action is added that pops up the fix-up tool.
- Expanded `RequiresFixup` to allow for recursively finding nested objects that require fixing up.
- Added `FindNestedInstanceDataObject` to allow IDOs to be retrieved for nested objects as well. An example is an entity with components that require fixing up, or all known IDOs under an object.
- Removed the memento registration for alerts. After a fix was done the memento would restore the alert again after it was cleared. A finer control over when alerts are recorded as mementos is needed.

#jira UE-215480
#rb jordan.hoffmann, Phillip.Kavan
[RN] Objects that fail to load now display an icon in the Outliner. Clicking the icon will bring up a tool that allows fixing issues.

[CL 34166340 by ronald koppers in ue5-main branch]
2024-06-06 14:06:27 -04:00
matt peters
886b0c561a SavePackage: PKG_ContainsNoAsset was accidentally set for some editor packages; it is only used in cooked packages. Prevent the possibility of setting it for editor packages: recalculate it every time rather than preserving it from the package's previously saved flags, and always set it to false for editor packages.
#rnx
#rb Francis.Hurteau

[CL 34162100 by matt peters in ue5-main branch]
2024-06-06 12:39:59 -04:00
matt peters
55c4daaff8 IncrementalCook: Add TObjPtr references made from Linker::PreLoad and UObject::PostLoad to the dependencies for the package of the object being pre or post loaded.
#rnx
#rb Zousar.Shaker

[CL 34161632 by matt peters in ue5-main branch]
2024-06-06 12:30:55 -04:00
matt peters
1a04a479f2 IncrementalCook: Add UE::Cook::IDeterminismHelper to write diagnostics for cook indeterminism and false positive iterative skips.
[RN] Minor, Cooking
#rb Zousar.Shaker

[CL 34153566 by matt peters in ue5-main branch]
2024-06-06 07:46:50 -04:00
matt peters
cf57cba0cd IncrementalCook: Add ObjectRedirectors recorded by the RedirectCollector to the RedirectionSummary per package that is maintained by CoreRedirects. SoftObjectPaths are swapped (without ever being resolved) during SavePackage to point to the redirected locations, so if package A has a softobjectpath to B and B is redirected to C, the softobjectpath text in A's cooked output needs to modified to C, and we therefore need to recook A.
#rnx
#rb Zousar.Shaker

[CL 34152869 by matt peters in ue5-main branch]
2024-06-06 07:05:15 -04:00
maxime mercier
5bc0dbbd7f Take 2 at disabling the overridable manager in non editor builds
#rb Yoan.StAmant
#tests Tested on 30_20 branch, Ran overidable serialization Unittests, Ran overidable serialization Utests,.20 branch.20..20 on a working UEFN builds, Ran Overridable Serialization Unittests

[CL 34129223 by maxime mercier in ue5-main branch]
2024-06-05 12:38:21 -04:00
tim smith
d0c49e4189 Remove improper ensures in Verse GC integration.
Allow UE GC to also be triggered by Verse needing a GC.

#rb Robert.Manuszewski

[CL 34121610 by tim smith in ue5-main branch]
2024-06-05 08:56:22 -04:00
russell johnston
cd4116b974 Fix FCoreRedirects for AutoRTFM
#rb yiliang.siew

[CL 34111690 by russell johnston in ue5-main branch]
2024-06-04 19:32:31 -04:00
matt breindel
76ade144ad Making FCoreRedirects thread safe and removing some of the changes in CL 33988617 that were meant to account for FCoreRedirects not being thread safe. Performance appears to be no worse than prior to CL 33988617. Total time for the locks appears to be <100ms over the entire editor startup.
#jira UE-216174
[REVIEW] [at]*matt.peters [at]francis.hurteau [at]devin.doucette
#rb Matt.Peters

[CL 34102810 by matt breindel in ue5-main branch]
2024-06-04 14:59:45 -04:00
russell johnston
3211ef21ec Native callable functions in VerseVM
In both BPVM and VerseVM, methods are no longer stored in object instances, but only in their UClass. (It appears that they were originally added to object instances to support overrides in archetypes.)

This enables the BPVM to switch back to running the VNI pass early, as adding method coercions no longer changes object layout.

Both VObjects and UObjects now attach Self only to VProcedures/VNativeFunctions obtained from their VShape.

#rb Tim.Smith

[CL 34101363 by russell johnston in ue5-main branch]
2024-06-04 14:24:48 -04:00
jamie dale
2335b81d94 Pass the save overrides through to FExportsValidationContext
#rb Francis.Hurteau
#rnx

[CL 34096553 by jamie dale in ue5-main branch]
2024-06-04 12:19:10 -04:00
paul chipchase
7d2aece474 Fix bulkdata streaming requests with zero length from asserting if IoStore is disabled.
#rb Per.Larsson
[FYI] Charles.deRousiers
#jira UE-216308

- Currently, if we make a request via the bulkdata streaming api for zero bytes, the IoStore (FFileIoStore) path will return a successful read but if the IoStore is disabled we will go through FPackageResourceIoBackend which will use the IAsyncReadFileHandle api which tends to assert or fail on zero byte reads.
- There is work pending for unifying how all our different file apis behave under these sorts of conditions but for now it's easier to fix FPackageResourceIoBackend to handle 0 byte reads than fix all IAsyncReadFileHandle implementations.
- If we detect a zero byte read in FPackageResourceIoBackend we can immediately pass it back to the IoDispatcher to handle the completed result.
- Note that if no user supplied memory can be found we will make a 0 byte allocation via FIoBuffer. This mirrors the behavour found in FFileIoStore.
- Even though we don't use the file handle, we still attempt to open one before counting the 0 byte read a success. This will cause attempts to make a 0 byte read of a missing file a failure etc. The file handle is then immediately closed.
- Since the zero byte reads will have no handles, there is no need for it to have an entry in FPendingRequests, so FPendingRequests::Remove needs to handle the case where the entry will not be found.

[CL 34087134 by paul chipchase in ue5-main branch]
2024-06-04 02:37:04 -04:00
russell johnston
1c7c896578 Separate verse::FExecutionContext from FContentScope and align it with Verse::FContext (take 2)
The game thread now creates one long-lived execution context, rather than using narrower scope guards. Other threads (e.g. outside of a running game) must create their own context in the same way. This will make it possible to use an execution context to invoke the VerseVM from C++, the same way this is done with the BPVM.

The rest of this change consists mostly of renaming things and passing around contexts. The interesting changes are some simplifications to runtime errors (see VerseRuntimeError.cpp and VerseNativeModule.cpp), and that `TVerseFunction` and `FVerseCall::Return` no longer install a redundant execution context.

#rb Tim.Smith
#okforversepublic

[CL 34083101 by russell johnston in ue5-main branch]
2024-06-03 20:49:55 -04:00