Commit Graph

6058 Commits

Author SHA1 Message Date
paul chipchase
ee70eb2ee5 Add checks before allocating buffers during bulkdata serialization.
#rb Per.Larsson
#rnx

- If archive is corrupt we could serialize an unreasonable value for the payload size from disk. This could cause very large allocations to be made which could cause the process to OOM or to allocate resources that it doesn't need.
- To avoid this we can check the archive we are serializing from and make sure that, at the very least, it will be possible to load all of the payload bytes from it. This way we will never make an allocation larger than the remaining space in the archive. It would then be up to the higher level code to validate that overall size of the provided file makes sense.
- Note that we are not able to do this is we are loading a payload from legacy bulkdata format that was marked as compressed as we only know the uncompressed payload size, not the compressed size on disk.

[CL 32755840 by paul chipchase in ue5-main branch]
2024-04-05 06:33:52 -04:00
jamie dale
60a6791d92 Updated field/class/enum meta-data localization queries to always return a localizable FText
This ensures that the 'keys' culture shows the text as localizable, even if there's no translation data available for it yet

#rb Leon.Huang
#rnx

[CL 32742101 by jamie dale in ue5-main branch]
2024-04-04 16:50:30 -04:00
steve robb
53cd760f41 Removed ImplicitConv usage from TNonNullPointer, TNonNullSubclassOf, TSubclassOf and TSubclassOfField.
[CL 32731617 by steve robb in ue5-main branch]
2024-04-04 12:09:11 -04:00
kirill zorin
1e4f3b5f32 Incr gc: turn on GC barriers for argument-mutating BlueprintCallable C++ functions
#rb Tim.Smith

[CL 32730108 by kirill zorin in ue5-main branch]
2024-04-04 11:33:44 -04:00
steve robb
dcf91f4c00 Removed ImplicitConv usage from TStridedView, TSoftObjectPtr, TStrongObjectPtr and TWeakFieldPtr.
[CL 32728703 by steve robb in ue5-main branch]
2024-04-04 11:02:13 -04:00
steve robb
0464c7c996 Replaced ImplicitConv usage in T[Script/Weak]Interface. Includes a fix to TScriptInterface::operator=(const TScriptInterface<OtherInterfaceType>&).
[CL 32724494 by steve robb in ue5-main branch]
2024-04-04 08:00:13 -04:00
tim smith
7809113a1b Migrate the class generation code into the engine environment class.
Fixed the names of the UE class properties to match BPVM.
Fixed missing dll exports on the verse value property

#rnx
#rb russell.johnston, yiliang.siew

[CL 32724202 by tim smith in ue5-main branch]
2024-04-04 07:51:39 -04:00
steve robb
d41825e38c Replaced ImplicitConv usage in TObjectPtr.
[CL 32723259 by steve robb in ue5-main branch]
2024-04-04 07:00:53 -04:00
robert manuszewski
b8582b64d3 Adding missing GC stats related to initial reference collection and pre-reachability callbacks
#rb Robert.Manuszewski

[CL 32721510 by robert manuszewski in ue5-main branch]
2024-04-04 04:16:08 -04:00
maxime mercier
4dfa6a4d46 Converted the PropertyValueIterator to use new property visitor
#rb Devin.Doucette, logan.buchy, Yoan.StAmant

[CL 32707072 by maxime mercier in ue5-main branch]
2024-04-03 15:10:11 -04:00
andrew scheidecker
c03dc1a1e9 - Make FDoubleProperty and FFloatProperty use Verse's extensional float equality semantics, and support value hashing. This should only affect comparison of NaNs: thanks to -ffast-math/fp:fast compiler flags, the previous behavior of FDoubleProperty::Identical/FDoubleProperty::Identical was for them to treat NaNs as equal to all other values. The new behavior is to treat all NaNs as equal to each other, and unequal to numbers.
- Rename the CoreVerseVM to CorePreciseFP to better reflect its purpose.
#rb fabian.giesen, Steve.Robb, Tim.Smith

[CL 32696889 by andrew scheidecker in ue5-main branch]
2024-04-03 10:01:56 -04:00
maxime mercier
dc8ac2e49b New Property Visitor
Visit this property and allows recursion into the inner properties
This allows you to visit inner properties without knowing about its container type as opposed to TPropertyIterator.
This visit property pattern facilitate the recursion into users defined properties and allows users to add specific visit logic on UStruct via traits.

#rb Devin.Doucette, logan.buchy, Yoan.StAmant

[CL 32696068 by maxime mercier in ue5-main branch]
2024-04-03 09:29:38 -04:00
nick edwards
d4ac2dbff3 UStruct::IsChildOf<T>: Support classes which provide StaticStruct, in addition to those which provide StaticClass.
#rb Steve.Robb

[CL 32695579 by nick edwards in ue5-main branch]
2024-04-03 09:12:36 -04:00
russell johnston
43ee153dd8 Implement defer in VerseVM
Defer blocks run for one of several reasons: normal block exit, exit via break or return, or (not yet implemented) task cancellation. To accommodate this, defer bytecode accepts a jump target index and switches on it after running. This index is stored in a register allocated for the defer block, which is sufficient because defers are not re-entrant. The register and switch are elided when the block runs only on the normal exit path.

The switch instruction has a variadic label operand. To simplify label fixup, all variadic operands are moved from `TArray` fields in the instructions to a shared trailing array in `VProcedure`. (Variadic operands to suspension captures remain `TArray`s.)

Early exit may cross several defer blocks on the way to its eventual jump target. Each defer block wraps these jump targets in a thunk, which passes the index for the wrapped target to the defer block. Exit control flow thus executes a chain of these thunks, ending with the actual exit jump when it reaches the appropriate scope.

#rb Markus.Breyer, Tim.Smith

[CL 32670628 by russell johnston in ue5-main branch]
2024-04-02 12:33:04 -04:00
steve robb
c1d4c1a99f Moved not-power-of-two ContainerMask out of the enum so that the flags can be viewed in the MSVC debugger.
[CL 32670474 by steve robb in ue5-main branch]
2024-04-02 12:27:46 -04:00
ben marsh
20e652675f Always write absolute paths for [AssetLog] entries. Relative paths are fine for rendering, but we need absolute paths to be able to use them for any VCS lookup / build health purposes in Horde.
#rb Devin.Doucette

[CL 32670403 by ben marsh in ue5-main branch]
2024-04-02 12:25:50 -04:00
steve robb
fdb0b82bc4 Fixed subtree parsing in FJsonArchiveInputFormatter.
#rb robert.manuszewski

[CL 32664317 by steve robb in ue5-main branch]
2024-04-02 08:45:26 -04:00
robert manuszewski
7734ee7aac Adding UObject count and UObject array capacity stats when dumping detailed UObject hash table overhead to log
#rb Robert.Manuszewski

[CL 32660384 by robert manuszewski in ue5-main branch]
2024-04-02 05:36:28 -04:00
mikko mononen
c16e4d7e4a Added FinishDestroy() handling for properties.
- Added struct trait, WithClearOnFinishDestroy which cause the struct to be cleared during owning UObject's FinishDestroy()
- Added FProperty::ContainsFinishDestroy(), which redursively checks if the property or its children requires FinishDestroy() to be called
- Added FProperty::FinishDestroy() which recursively calls FinishDestroy(), struct propertys FinishDestroy() clears the struct if specified in the traits
- UStruct::Link() adds properties requiring finish destrou to the DestructLink
- Changed UObject::DestroyNonNativeProperties() to call FinishDestroy() on native properties in DestructorLink
- Added WithClearOnFinishDestroy to FInstancedStruct so that the contained value is destroyed safely in the case that the owning UObject and UScriptStruct are GC'd at the same time.

#rb Steve.Robb

[CL 32659438 by mikko mononen in ue5-main branch]
2024-04-02 03:19:52 -04:00
jordan hoffmann
0fc05bb8bf **This change was backed out because of cook errors. Removing a superfluous metadata check fixes the issue so this is a resubmission with the metadata check removed
[Backout] - CL32570115
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL32554750
[FYI] jordan.hoffmann
Original CL Desc
-----------------------------------------------------------------
[BugFix] changes made to IDOs in the details panel correctly mark the package dirty and save now.
[Refactor] IDOs and their Instances now share the same override set
[Feature] added FPropertyBagRepository::FindOwnerForInstanceDataObject method for reverse lookup
[Refactor] chanced some uses of UObjectBase* to UObject* in PropertyBagRespository to simplify code
#rb Phillip.Kavan, Francis.Hurteau, Andrew.Davidson
#jira UE-210574

[CL 32653950 by jordan hoffmann in ue5-main branch]
2024-04-01 18:11:06 -04:00
phillip kavan
bab7892466 Create a placeholder type object on failure to resolve a type import through an existing redirector asset at load time.
This allows a package export to still load its data to a property bag in this scenario.

#jira UE-209835
#rb Francis.Hurteau

[CL 32653262 by phillip kavan in ue5-main branch]
2024-04-01 17:38:29 -04:00
tim smith
4820c9468b No longer place libpas in the NotForLicensees subdirectory when VerseVM is enabled.
#rnx
#rb russell.johnston

[CL 32641899 by tim smith in ue5-main branch]
2024-04-01 12:04:31 -04:00
tim smith
45c4ce21b7 Removed unused UVerseVMClass casting flag
#rnx
#rb tim.smith

[CL 32640893 by tim smith in ue5-main branch]
2024-04-01 11:30:15 -04:00
daniele pieroni
50ab97d38c Manual integration of 32610366 by Per.Larsson
Potential fix when issuing empty texture streaming requests with batch API.

[CL 32638117 by daniele pieroni in ue5-main branch]
2024-04-01 09:50:50 -04:00
devin doucette
07f2404535 Added fatal logs to FPropertyTypeName when StoreByIndex fails
#rb Francis.Hurteau
#rnx

[CL 32591955 by devin doucette in ue5-main branch]
2024-03-28 16:26:16 -04:00