Commit Graph

851 Commits

Author SHA1 Message Date
Marc Audy
d9c630dcd8 Add IsInheritedInstance to exports
#rb Phillip.Kavan
Add missing generate public hash entries to ArchiveStackTrace
#fyi Francis.Hurteau
#preflight 626c692cb046e6ecc338080e
#lockdown JeanFrancois.Dube

[CL 19988606 by Marc Audy in ue5-main branch]
2022-04-29 20:15:15 -04:00
Marc Audy
a8fa02a366 Shrink FObjectExport (144 -> 120): Remove deprecated PackageGUID and Dynamic Type, and properly pack members
#rb Robert.Millar
#lockdown JeanFrancois.Dube
#preflight 626c50940b45792efb69a48c

[CL 19986766 by Marc Audy in ue5-main branch]
2022-04-29 17:38:17 -04:00
tom noonan
109c87dac2 Make sure one time init code in IsEventDrivenLoaderEnabled() is run in async loading thread construction
[REVIEW] [at]robert.manuszewski
#preflight 626bfda453253f874bd08bb8

#ROBOMERGE-AUTHOR: tom.noonan
#ROBOMERGE-SOURCE: CL 19980945 via CL 19980998 via CL 19981041 via CL 19981068
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19985862 by tom noonan in ue5-main branch]
2022-04-29 17:05:33 -04:00
Matt Peters
cac1474ec5 BulkDataRegistry: Add comment about silencing the duplicate guid warning.
#rb None, trivial
#rnx
#preflight None, trivial

[CL 19984468 by Matt Peters in ue5-main branch]
2022-04-29 16:03:04 -04:00
paul chipchase
22d32b8eca Remove part of the fix from CL 19963043 as it had unintended consequences and needs rethinking
#rb trivial
#rnx
#preflight 626b9cbb53253f874b90efd3

- Although we don't really want to write out the virtualization flag, by removing it during ::BuildFlagsForSerialization we later check UpdatedFlags to see if the payload is virtualized and if we should write it out to disk or not.
- Removing the flag means we re-hydrate virtualized payloads when saved to disk, or in the case of an editordomain, try to store it as a local payload in the editor domain trailer which is not supported (if we did have a newly generated payload in an editor domain save it should go to the legacy path for now)
- The fix for this is probably quite simple, but the testing it would require means it's better to pull out the line of code and allow packages to serialize out the virtualization flag for now until a better fix is ready.

[CL 19976045 by paul chipchase in ue5-main branch]
2022-04-29 04:15:29 -04:00
paul chipchase
5fb1389ae8 Fix a number of bugs found when saving more complex package types with virtualization enabled.
#rb PJ.Kack
#rnx
#preflight 626a7ef2485a2fed3a2e04d7

- Note that these problems were not causing crashes, but they did cause errors to be logged about invalid formats and request the packages to be re-saved.
- Most of the problem comes from the code paths being too complicated, hopefully now things are locked down we should be able to start pruning this soon and make it easier to maintain in the future.

### Problem
- The problem comes from certain package setups that allow for the existence of duplicate payload entries where one entry is local or referenced and another version is virtualized. If a trailer is created from this data then the virtualized entry will be discarded (as the look up table is a map) and we revert to using the non virtualized payload instead. Ideally we'd want to discard the local/referenced payloads in favour of the virtualized one to save space.
-- By itself this bug would waste disk space but not cause other problems, however we were also writing out the virtualized flag so that when the bulkdata is next loaded it has the virtualized flag but then checks with the trailer and is told that it is not virtualized which triggers some asserts I added to find badly formed data.
- How the package gets duplicate entries like this is somewhat complicated involing duplicating objects from other (already virtualized) packages during load, then saving them (found in packages with Niagra assets at least)

### Fix
- When creating a trailer from a trailer build, we first find any local and/or referenced entries and check if there are duplicate entries in the virtualized payload entries. If so we remove the local/referenced version in favor of using the virtualized version.
-- Ideally we'd do this during the serialization of exports as it might let us skip the loading of some payloads for save entirely, however we don't know all the entries until after export serialization is completed so this is the only point we can search for duplicates safely.
- Added a way to get the full name of the owning asset, including package name + asset, when asking the user to re-save. This makes debugging the problems easier.
- Add a new check when loading to find payloads saved with the virtualization flag and to a trailer. If we do find one we warn the user that they should re-save the package and remove the flag so that no further problems occur.
- Demoted the old check for bad formats to a warning as we don't need to fail builds because of it.
-- Additionally we now only give the warning if we detect that we are loading from a package, as being virtualized and not in a package trailer would be valid when loading from other sources.
- Added comments to consider removing both checks asking the user to re-save the package after 5.2, as in theory we should only ever see these problems internally at Epic as it is unlikely that externals will have enabled the system.
- When saving a virtualized payload to the trailer, make sure to remove the virtualized flag, that should be picked up on load by polling the trailer for the payload status and should not be baked into the export data.
-- Hypothetically this will allow for us to re-hydrate the package without re-saving it through manipulating the trailer.

[CL 19963043 by paul chipchase in ue5-main branch]
2022-04-28 11:45:40 -04:00
paul chipchase
e692df4b3e Fix a bug where virtualized payloads were writing incorrect flags to the editor domain version of the package.
#rb Matt.Peters
#rnx
#preflight 626a9f386461dd769fea25df

- If a payload was virtualized it was incorrectly being marked as requiring the legacy serialization path.
- This would technically work but was triggering a log warning about the bulkdata being stored in the wrong format (since it was in the legacy format) as we do not expect bulkdata with virtualized payloads to use the legacy path.
- We need to change the editor domain version to clear out any bad entries

[CL 19961539 by paul chipchase in ue5-main branch]
2022-04-28 10:29:48 -04:00
Matt Peters
e6687c56ac BulkDataRegistry: Fix EditorBuildInputResolver to set Status to Error in the cases where a registered BulkData is found but it cannot find its payload.
Remove bValid from FMetaData and FData return structs; it is redundant with the RawHash/Buffer data already present in those structs.
#preflight 62680b42430b9997ebe0a46d
#rb Devin.Doucette
#rnx

[CL 19923039 by Matt Peters in ue5-main branch]
2022-04-26 12:47:22 -04:00
Matt Peters
6da6eb0ffc BulkDataRegistry: Add an ini setting for projects to suppress the warning about duplicate ids.
#rb Zousar.Shaker
#rnx
#preflight 62668f947e06ec75059dd40e

[CL 19900672 by Matt Peters in ue5-main branch]
2022-04-25 08:24:25 -04:00
CarlMagnus Nordin
63b8cbc9dd AsyncLoading2: Implemented loading of optional package segments
#rnx
#preflight 62627548ac29fcf6a213fe33
#rb francis.hurteau

[CL 19900368 by CarlMagnus Nordin in ue5-main branch]
2022-04-25 07:37:07 -04:00
nathan green
7f33cf7670 - Adding safety checks to FAsynPackage2::PostLoadInstances
#jira: FORT-456060
[REVIEW] [at]Josh.May, [at]Cory.Kolek, [at]Kevin.Hamilton, [at]Kris.Pelley, [at]robert.manuszewski

#ROBOMERGE-AUTHOR: nathan.green
#ROBOMERGE-SOURCE: CL 19840451 via CL 19840554 via CL 19848692 via CL 19860911 via CL 19861002
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19869673 by nathan green in ue5-main branch]
2022-04-22 15:07:32 -04:00
Matt Peters
657ada7efa BulkDataRegistry: Fix code that can create duplicate BulkData identifiers. When loading a duplicate from an existing package, give a warning and update the BulkData during Serialize. Add resaveondemand=bulkdataduplicates argument in resave packages to resave these existing packages.
#rb Zousar.Shaker, Paul.Chipchase
#rnx
#preflight 62616e8f6119a1a496a8fe90

[CL 19850627 by Matt Peters in ue5-main branch]
2022-04-21 12:03:36 -04:00
Francis Hurteau
d0bf8ff821 Do not selectively process async package when using the old async loading EDL
Do not pop when peeking flush requests, they are removed from the GT

#rb CarlMagnus.Nordin, PJ.Kack
#jira UE-148465
#preflight 625d71b848670f31a61e9e95

[CL 19832325 by Francis Hurteau in ue5-main branch]
2022-04-20 12:24:02 -04:00
CarlMagnus Nordin
98b0e582a2 AsyncLoading2: Preparation for optional package data support
#rnx
#preflight 625e566bb21bb49791e1160a
#rb martin.ridgers

[CL 19805459 by CarlMagnus Nordin in ue5-main branch]
2022-04-19 04:48:24 -04:00
carlmagnus nordin
53f298150c AsyncLoading2: Fixed IsAsyncLoadingPackages returning false when there's still work left to do (introduced with 19718229)
#rnx
#rb pj.kack
#preflight 6256cabc6520cc71237d9555

#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 19739801 via CL 19740981 via CL 19741619 via CL 19742068
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19742939 by carlmagnus nordin in ue5-main branch]
2022-04-13 14:11:40 -04:00
carlmagnus nordin
247795771c EditorPackageLoader: Fixed issue with cooked packages not being imported correctly from uncooked packages loaded with LoadPackageAsync
#preflight 6255273669015afc279d2e67
#rnx
#rb per.larsson

#ROBOMERGE-OWNER: carlmagnus.nordin
#ROBOMERGE-AUTHOR: carlmagnus.nordin
#ROBOMERGE-SOURCE: CL 19718229 via CL 19718368 via CL 19719146 via CL 19719225
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19720233 by carlmagnus nordin in ue5-main branch]
2022-04-12 10:00:16 -04:00
steve robb
c4817fc296 Removal of SA_FIELD_NAME.
#rb graeme.thornton
#preflight 624f47086637e291d3d49b2d
[FYI] francis.hurteau

#ROBOMERGE-AUTHOR: steve.robb
#ROBOMERGE-SOURCE: CL 19680202 via CL 19681535 via CL 19681539 via CL 19681542
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19682750 by steve robb in ue5-main branch]
2022-04-07 21:06:54 -04:00
paul chipchase
b036ae4862 Add some insight scope/counters that would've been useful to hunt down a problem
#rb trivial
#rnx
#preflight 624d76f24e0a8b95d08a4494

- Someone was complaining about seing a large number of long calls to FEditorBulkData::DetachFromDisk that were taking a long time. Although from context he was able to determine that the problem was caused by renaming a package this was not obvious from the provided trace.
-- Added some trace scopes to  UObject::Rename, FLinkerManager::ResetLoaders and around the decompresison of payloads when detaching an editorbulkdata. This would've m,ade it very obvious as to where the time was going.
-- Added two new counters to FEditorBulkData to track the amount of data (in bytes) either loaded from disk or pulled from a virtualized backend. This would've allowed us to see how much data was being loaded during the rename (in this case near 32gb...)

[CL 19645373 by paul chipchase in ue5-main branch]
2022-04-06 07:44:49 -04:00
Francis Hurteau
3da268ce6d Modified FlushTree to FlushRequest and being a simple wrapper around a package loading request
Automatically propagate explicit package load request association to a package dependencies which allow flush request to process only related packages while skipping others
This should also allow FlushAsyncLoading to be re-entrant down the line
Suppress the transaction system while ticking async loading in the main thread
Added an editor config to enabled the async loading thread. Currently non functional

#rb CarlMagnus.Nordin
#preflight 623e0081a67e4e1ab70598d7

[CL 19626072 by Francis Hurteau in ue5-main branch]
2022-04-05 11:29:57 -04:00
jamie dale
1fe23a7057 Fix-up FSoftObjectPath/FSoftObjectPtr during load of an instanced package
#jira UE-144884
#preflight 624b2c10dc6183e3f546ed00
#rb Francis.Hurteau, CarlMagnus.Nordin
#rnx

#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 19613732 via CL 19614798 via CL 19614837 via CL 19614865
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19616233 by jamie dale in ue5-main branch]
2022-04-04 18:21:24 -04:00
Dan Thompson
cd73707429 Update package writers to gather package hashes internally, then have CookByTheBookFinished copy them to asset package datas.
Add iostore chunk hashes to the asset registry during cook.
Remove old hashing code, which was extensive. This moves the async writes in to UE::Task from the old AsyncWorkSequence().
#rb Matt.Peters
#rb Jeff.Roberts
#preflight 624b24a5f73c316f68303946

[CL 19611812 by Dan Thompson in ue5-main branch]
2022-04-04 13:26:27 -04:00
johan torp
5c2624134d Optimize AssetTools AdvancedCopyPackages and add batch versions of ForceReplaceReferences and ConsolidateObjects
331s -> 0.28s to consolidate objects when cloning a small shooting range map

#rb Robert.Manuszewski,Chris.Gagnon,Francis.Hurteau,Jamie.Dale,JeanLuc.Corenthin,Phillip.Kavan

#ROBOMERGE-AUTHOR: johan.torp
#ROBOMERGE-SOURCE: CL 19507095 via CL 19507103 via CL 19507108 via CL 19507110
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19514683 by johan torp in ue5-main branch]
2022-03-25 12:41:16 -04:00
Matt Peters
99f564f1cf UnversionedPropertySerialization: declare an FSerializedPropertyScope when load-serializing in the editor, so that EditorDomain loads will correctly notice SoftObjectPath properties that are marked untracked.
#rb Johan.Torp
#rnx
#preflight 6238782810251d53d55e1d2e

[CL 19451055 by Matt Peters in ue5-main branch]
2022-03-21 09:11:37 -04:00
matt peters
56ea8044e7 UnversionedPropertySerialization: Declare an FSerializedPropertyScope when save-serializing, to match the VersionedProperty case. This scope is needed when loading and saving in the editor so that FSoftObjectPath::PostLoad or FPackageHarvester::operator<<(FSoftObjectPath) can detect whether an untracked Property is on the serialize stack and mark the property as editor-only if so.
#preflight 623385fff101b8d0afa76c71
#jira UE-146434
#rb Francis.Hurteau, Johan.Torp
#rnx
#lockdown Simon.Tourangeau

#ROBOMERGE-AUTHOR: matt.peters
#ROBOMERGE-SOURCE: CL 19437812 in //UE5/Release-5.0/... via CL 19439211
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19442453 by matt peters in ue5-main branch]
2022-03-18 18:52:18 -04:00
Devin Doucette
ddff894d31 DerivedData: Added the framework for serializing derived data references to cooked packages
#preflight 6234fe538a298a014fc20227
#rb Matt.Peters
#rnx

[CL 19442331 by Devin Doucette in ue5-main branch]
2022-03-18 18:39:18 -04:00