Commit Graph

4224 Commits

Author SHA1 Message Date
francis hurteau
bd3a51f5a8 Truncation warning fixes for CoreUObject
#jira UE-166274, UE-127233
#rb Devin.Doucette, Paul.Chipchase

[CL 26553935 by francis hurteau in ue5-main branch]
2023-07-24 16:13:27 -04:00
francis hurteau
0f8ab94dfa Truncation warning fix in PropertyOptional
#rb Devin.Doucette
#jira UE-166274

[CL 26553424 by francis hurteau in ue5-main branch]
2023-07-24 16:01:59 -04:00
brandon dawson
f465cb551a Flush the log before forcing a crash in UObject::AbortInsideMemberFunction().
#rb trivial

[CL 26543967 by brandon dawson in ue5-main branch]
2023-07-24 11:36:10 -04:00
danny couture
d1f7c93c98 Share LinkerInstancingContext between requests instead of copying
- Saves a lot of memory when tons of actors remapping are used for world partition. Multiple GB in PIE is not unheard of.
   - Add LLM counter specifically for LinkerInstancingContext memory usage
   - Make sure everything is thread-safe and ready for async loading thread usage

#jira UE-185799
#rb Francis.Hurteau

[CL 26543720 by danny couture in ue5-main branch]
2023-07-24 11:31:23 -04:00
maxime mercier
f8d8ee57ce [Backout] - CL26433308
[FYI] Maxime.Mercier
Original CL Desc
-----------------------------------------------------------------
Better support of reinstantiation of subobjects in CDOs
Also reuse same pattern on instances to fix more subobject nesting issues

[CL 26523238 by maxime mercier in ue5-main branch]
2023-07-21 15:47:39 -04:00
wouter burgers
a02ec0ae88 PackageReload: Optimized ReloadPackages by doing a pre-pass using FReferencerFinder::GetAllReferencers to get all potential referencers and only inspecting those when fixing up references. The potential referencers set is expanded as new packages get (re)loaded through the FCoreUObjectDelegates::OnObjectsReplaced and FCoreUObjectDelegates::OnObjectConstructed delegates, whilst garbage collected packages end up being skipped through the use of TWeakObjectPtrs.
#rnx

[CL 26481741 by wouter burgers in ue5-main branch]
2023-07-20 07:32:00 -04:00
jason weiler
a6a1d46616 Fix for type-mismatched leading to a fatal error when compiling, cooking, and loading level data. Now resets non-nullable properties to an instandce of the CDO.
#rb robert.manuszewski, maxime.mercier

[CL 26465295 by jason weiler in ue5-main branch]
2023-07-19 13:36:40 -04:00
maxime mercier
7febc80960 Better support of reinstantiation of subobjects in CDOs
Also reuse same pattern on instances to fix more subobject nesting issues

[CL 26433410 by maxime mercier in ue5-main branch]
2023-07-18 10:14:26 -04:00
francis hurteau
a1bcc07844 Fix double redirector not properly resolving themselves in some loading order edge case
#rb Danny.Couture

[CL 26417387 by francis hurteau in ue5-main branch]
2023-07-17 16:57:54 -04:00
paul chipchase
ef7ef6393a Fix a bug where loading a bulkdata payload from a cooked package mounted in the IoStore could end up loading more data off disk than required.
#rb Per.Larsson

### Problem
- The IoStore does not support bulkdata payloads being compressed at the package level, instead compression will be applied to the .ucas file when it is created, this means that we don't really use the SizeOnDisk value for cooked bulkdata as it should always be the same as the in memory size.
- Some code paths in the editor however might support compression in the workspace domain and so use the SizeOnDisk value, such as calling ::GetCopy.
- In this cause the size being passed to the IoDispatcher would be INDEX_NONE, which the system converts to "please load the entire .ubulk section of the package"
- The buffer returned to the user would eventually be trimmed to the correct in memory size so this bug would be hard to notice, the only downside is wasting time loading more data off disk than required.

### Fix
- AsyncLoading2 now sets the SizeOnDisk to be a valid value (the size of the payload in memory) if we are not using runtime only bulkdata (USE_RUNTIME_BULKDATA) so when GetSizeOnDisk is called, it returns the correct value and we only load the payload we want.
- An assert has been added to make sure that the payload is not compressed (in which case the size would be wrong and we could end up overrunning valid memory) even though the flag is removed when cooking and it should not be possible to get to that point.

[CL 26404304 by paul chipchase in ue5-main branch]
2023-07-17 07:52:56 -04:00
steve robb
1db0b9735a Fixed assert firing in the destructor of FArchiveFromStructuredArchiveImpl caused by FMulticastSparseDelegateProperty::SerializeItem() not closing an archive adapter.
#rb none

[CL 26395576 by steve robb in ue5-main branch]
2023-07-13 18:40:53 -04:00
andrew scheidecker
83eb06bc89 Fix FOptionalProperty text-based serialization.
#rb Steve.Robb

[CL 26346550 by andrew scheidecker in ue5-main branch]
2023-06-30 12:13:29 -04:00
matt peters
d0e927d0f0 Cooker: DiffWriterArchive: Fix a bug after refactor with FArchiveStackTraceIgnoreScope no longer being respected. Change DiffWriterArchive to report all messages to a message callback rather than logging them directly. Future users of DiffWriterArchive will store the messages rather than logging them.
#rb Zousar.Shaker
#rnx

[CL 26324673 by matt peters in ue5-main branch]
2023-06-29 15:40:21 -04:00
paul chipchase
80b3310281 Minor optimization - Early out when trying to load an empty bulkdata payload rather than allocating then freeing a zero byte buffer.
#rb Per.Larsson
#rnx

- Note that this should not change the outcome as ::TryLoadDataIntoMemory will return false if the length of the payload is zero s the previous behaviour was to allocate, fail to load, then delete. The new code path and the old code path both end up with the bulkdata containing no allocation.

[CL 26281649 by paul chipchase in ue5-main branch]
2023-06-28 07:36:01 -04:00
steve robb
4fd0692893 Fixed typo.
#rb trivial

[CL 26281211 by steve robb in ue5-main branch]
2023-06-28 06:56:45 -04:00
johan torp
b5c3964903 Add optional support to Unversioned Property Serialization
Previously small optionals worked, by accident rather than design, but large optionals didn't

#rb andew.scheidrecker,steve.robb

[CL 26281089 by johan torp in ue5-main branch]
2023-06-28 06:47:21 -04:00
jeanfrancois dube
ff606c42b5 Make sure to clear the RF_HasExternalPackage flag before removing from the external package hash table to avoid a race condition.
#rb francis.hurteau, matt.peters

[CL 26269084 by jeanfrancois dube in ue5-main branch]
2023-06-27 16:15:31 -04:00
matt peters
3c2682f374 FArchiveStackTrace: Deprecate the public interface and move it into a private helper class of DiffPackageWriter.
#rb Zousar.Shaker
#rnx

[CL 26269033 by matt peters in ue5-main branch]
2023-06-27 16:13:59 -04:00
kirill zorin
3fa621efb7 Adding missing GC barriers to runtime
#rb robert.manuszewski

[CL 26266759 by kirill zorin in ue5-main branch]
2023-06-27 14:54:53 -04:00
robert millar
fe54bdfac5 Disable PIE soft object path fixup tests outside of editor.
#rb none

[CL 26262088 by robert millar in ue5-main branch]
2023-06-27 13:00:49 -04:00
andrew phillips
70643e746e Adding CVar to control the Archetype cache usage
[CL 26254454 by andrew phillips in ue5-main branch]
2023-06-27 07:36:56 -04:00
robert manuszewski
b5e73242e3 Experimental support for Incremental Reachability Analysis (second attempt)
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyNoUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26252569 by robert manuszewski in ue5-main branch]
2023-06-27 01:44:30 -04:00
robert manuszewski
d5c2c7bc97 Undo changelist 26229717
#rb none

[CL 26237963 by robert manuszewski in ue5-main branch]
2023-06-26 13:26:02 -04:00
robert manuszewski
2e93ac7309 Fixing CIS error (global var name conflict)
#rb trivial

[CL 26231056 by robert manuszewski in ue5-main branch]
2023-06-26 07:17:47 -04:00
robert manuszewski
5800b6b608 Experimental support for Incremental Reachability Analysis
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26229728 by robert manuszewski in ue5-main branch]
2023-06-26 04:38:56 -04:00