Commit Graph

5269 Commits

Author SHA1 Message Date
jamie dale
c0f392f605 Fixed FObjectPropertyBase::GetExportPath with PPF_Delimited quoting only the object part of the path
#jira
#rb Francis.Hurteau

[CL 26738868 by jamie dale in ue5-main branch]
2023-08-01 10:47:04 -04:00
jason hoerner
2d489df7bb Another compile error -- are Linux C++ file names case sensitive? Never ran into that before...
#rnx

[CL 26715374 by jason hoerner in ue5-main branch]
2023-07-31 14:30:42 -04:00
jason hoerner
0c9bf6bb52 Non-unity compile error fix (need PlatformProcess.h include).
#rnx

[CL 26714540 by jason hoerner in ue5-main branch]
2023-07-31 14:10:23 -04:00
jason hoerner
adb70d585b Cooker: Object handle tracking related RW lock and critical sections modified to use C++ atomics to avoid calls into ntdll for the system library implementations of that functionality. Calls into ntdll are extremely slow on cook farm VMs, running 50x slower than they do on physical machines, becoming a major bottleneck for cook times. For a shader invalidation cook of a large project, getting rid of the system library RW lock saves 22% of total cook time, while removing the critical section saves another 5%, for 27% overall cook time savings on a VM. Saves 0.5% of cook time on a physical machine.
#rnx
#rb jason.nadro dan.elksnitis

[CL 26714134 by jason hoerner in ue5-main branch]
2023-07-31 14:03:33 -04:00
andrew scheidecker
6d87d814fb Fix for unversioned serialization of arrays of optionals (or other cases where an optional property might be nested in a container).
Also fix a memory leak when doing unversioned serialization of properties with destructors and default values: "loading as zero" doesn't call the destructor on the value being overwritten, and so isn't safe to use for properties that require destruction.
#rb Devin.Doucette, Robert.Manuszewski

[CL 26706988 by andrew scheidecker in ue5-main branch]
2023-07-31 11:22:52 -04:00
andrew scheidecker
37b316b300 Fix serialization of FP specials with the UE structured archive JSON formatter:
Like JS, JSON does not directly support FP specials in its numeric literal syntax. However, JS has Infinity and NaN global variables, and JSON does not have anything like that.
To work around the omission, this change makes the JSON formatter encode FP specials as a tagged string in the form:
    "Number:+inf"
    "Number:-inf"
    "Number:-nan:0x123"
    "Number:+nan:0xabc"
This change also gets rid of the special case that tried to print floats as integers as it invoked UB to cast an out-of-range float to an int.
#rb Francis.Hurteau

[CL 26704226 by andrew scheidecker in ue5-main branch]
2023-07-31 09:14:11 -04:00
dan oconnor
6ab44bad0d Revert behavior introduced in 12669682, but avoid discarding InstancedSubobjects that have been loaded by FLinkerLoad, this ensures that objects with deferred intitializers have their instanced references fixed up by FObjectInitializer::InstanceSubobjects
#rb Phillip.Kavan
#jira UE-189361

[CL 26648003 by dan oconnor in ue5-main branch]
2023-07-27 14:12:04 -04:00
matt peters
62ff823ba9 SavePackage: Ignore and warn about private subobjects on imported class default objects.
#rnx
#rb Francis.Hurteau

[CL 26589375 by matt peters in ue5-main branch]
2023-07-25 17:20:16 -04:00
neil henning
43a5d99013 Backout CL 26567699 because its causing an Android clang ICE.
[CL 26572214 by neil henning in ue5-main branch]
2023-07-25 10:05:36 -04:00
danny couture
8d027a4e3c Implement more granular progress tracking of async package loading in zenloader
- Allows callees of LoadPackageAsync to be notified when serialization is done so they can schedule the next load right from the async loading thread without having to pay for a round-trip to the game-thread
  - Add UnattendedAsyncLoading test as a sample of how this feature can be used
  - Add thread-safety tests for LoadPackageAsync
  - Can be exercised using a cooked client build with the following command-line
        -ExecCmds="Automation RunTest System.Engine.Loading.UnattendedAsyncLoadingTest+System.Engine.Loading.ThreadSafeAsyncLoadingTest;Quit"

#jira UE-188744
#rb Francis.Hurteau

[CL 26569151 by danny couture in ue5-main branch]
2023-07-25 07:36:40 -04:00
neil henning
55d6b8bfbb Add back the gnu::alloc_align change to explain to clang the alignment of allocated pointers.
#rb Devin.Doucette

[CL 26567709 by neil henning in ue5-main branch]
2023-07-25 03:45:51 -04:00
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
dan oconnor
b26035fc57 Publish soft path literals to reference collectors that run over bytecode
#jira UE-190820
#rb Matt.Peters

[CL 26519638 by dan oconnor in ue5-main branch]
2023-07-21 14:14:25 -04:00
nick edwards
83c9bbf57e Added an additional FAssetRegistryTag constructor that leverages move semantics to efficiently transfer the value string into the member variable, potentially eliminating an extra copy operation
#rb matt.peters

[CL 26513056 by nick edwards in ue5-main branch]
2023-07-21 11:19:07 -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
will brown
4d4c5a1d6a PluginReferenceViewer - Added a context menu item that launches the asset reference viewer showing the asset references across plugins. Extended the OpenReferenceViewerUI to allow setting of the plugin filters on launch.
#rb Sebastian.Arleryd

[CL 26474329 by will brown in ue5-main branch]
2023-07-19 18:52:57 -04:00
Matt Peters
f8d5c01789 ObjectPropertyTest fixes:
1) Fix for test package names not starting with proper prefix
2) Fix incompatible value that is passed into CheckValidObject to NOT be the outer of the fallback objecte. The incompatible value now gets renamed by CheckValidObject, and renaming the outer of the fallback object would break the test.
#rnx
#rb Joe.Pribele

[CL 26474125 by Matt Peters in ue5-main branch]
2023-07-19 18:36:21 -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