Commit Graph

4577 Commits

Author SHA1 Message Date
bob tellez
9ca814bcd4 #UE Delete FArchiveObjectCrc32NonEditorProperties, and use a plain old FArchiveObjectCrc32 with ArIsFilterEditorOnly set to true to test for cook non-determinism. The logic in FArchiveObjectCrc32NonEditorProperties did not properly ignore FNames serialized in editor-only properties
[FYI] Steve.Robb

[CL 23103381 by bob tellez in ue5-main branch]
2022-11-11 14:56:19 -05:00
carlmagnus nordin
18600ecd9d Fix log spam for renaming leaked package
[REVIEW] [at]pj.kack
#preflight 636e123c953c19d43531781b
#tests client

[CL 23102277 by carlmagnus nordin in ue5-main branch]
2022-11-11 14:12:47 -05:00
paul chipchase
8912b2a25c Add the option to note if the editor bulkdata is cooked or uncooked when logging about VA pull failures
#rb Sebastian.Nordgren
#jira UE-169622
#rnx
#preflight 636d118e361bbd3c0ae5e116

- Recently we have had several incidents where there has been confusion if a VA payload pull that failed was initiated by a uncooked editor bulkdata or a cooked one. Adding the option to postfix the log message with this info for selected projects will make debugging this sort of thing easier in the future.
- Enabled by changing '[EditorBulkData]LogCookedStatus=' to true in the Editor ini file.
-- As this is only useful for projects that allow cooked content in the editor, if not then it is just noise so the post fix is disabled by default.
- Note that the check in FEditorBulkData::PullData should also be removed but that has been added as its own work item in JIRA.

[CL 23101614 by paul chipchase in ue5-main branch]
2022-11-11 13:31:11 -05:00
zhikang shao
1d9c60ec99 FFieldPath now respects CoreRedirects.
#jira UE-162160 #jira UE-142887 #rb ben.zeigler #rb benjamin.fox
FFieldPathProperty applies redirects on ImportText_Internal, automatically redirecting FFieldPath saved in string format for blueprint graph pins.
FGameplayAttribute applies redirects after deserializing unredirected value and fixes up derived properties, for UObject based assets with FGameplayAttribute properties.
UAttributeSet subclass renaming and adding ClassRedirect works now. Previously, FGameplayAttribute pins would show correct value in blueprint graphs but use incorrect value at runtime.
FGameplayAttribute renaming and adding PropertyRedirect works now. Previously, FGameplayAttribute fields in blueprint assets would break (null out), in addition to blueprint graphs using undirected value at runtime.
#preflight 636e638e8f4cb2e4dcf00c05

[CL 23098214 by zhikang shao in ue5-main branch]
2022-11-11 10:55:46 -05:00
patrick enfedaque
8e9ab48d37 Fix regression from CL 21826272 where GetAssetPathRedirection was no longer redirecting based on AssetPath causing some failed redirections of SoftObjectPaths when saving new maps
#jira UE-169239
#rb rob.millar
#preflight 636d1bfd4170db7932b265fb

[CL 23084824 by patrick enfedaque in ue5-main branch]
2022-11-10 14:03:09 -05:00
paul chipchase
9002bae096 EditorBulkData with virtualized payloads will no longer attempt to pull those payloads when creating undo states.
#rb Per.Larsson
#jira UE-169760
#rnx
#preflight 636ce62bed07daaa9abef391

- This bug was introduced with the fix for UE-169114.
- A virtualized payload can always be accessed via the virtualization system so we have no reason to serialize it during a transaction.
-- To prevent this we simply don't try to load the payload into memory if it is virtualized.
- While investigating this I noticed an additional minor issue that the << overload added for FSharedBuffer was treating a 0 length valid FSharedBuffer and a null FSharedBuffer as the same thing which is not exactly the case.
-- A 0 length buffer will return false for FSharedBuffer::IsNull and will allocate an owner structure internally. A null buffer will not allocate an owner and will return true for FSharedBuffer::IsNull
-- This is a minor distinction which was unlikely to be causing problems but should be fixed for technical accuracy.
-- We now write INDEX_NONE for the buffer length if the buffer is null and when reading we simply reset the buffer if we see that the length is INDEX_NONE rather than trying to create a valid buffer.

[CL 23079600 by paul chipchase in ue5-main branch]
2022-11-10 10:49:44 -05:00
pj kack
de9fee5ade ZenLoader in editor: Improve handling of sync loads of packages with circular dependencies.
Add additional early outs from ProcessLinkerLoadPackageImports when a package has already been processed in a deeper circular dependency recursion stack.
Relax SyncLoadContextId constaints since when a package has been added to PackagesExcludedFromStateDependencyChecks due to a circular package dependency it may have been pulled into a higher sync load context id than the currently executing one.

#rb carlmagnus.nordin
#rnx
#preflight 636cb93963037c102604a566

[CL 23074568 by pj kack in ue5-main branch]
2022-11-10 05:16:25 -05:00
daniel lamb
bad5e26212 Fixed crash when loading maps using ZenLoader.
[REVIEW] [at]Carl.Magnus.Nordin

[CL 23071869 by daniel lamb in ue5-main branch]
2022-11-10 01:10:31 -05:00
pj kack
8b697706e2 AsyncLoading2: Fix infinite wait for io issue part 2 (see 23028119 for part 1)
Make sure to always leave the waiting for io state if there are no more io requests to wait for.

#rb carlmagnus.nordin
#rnx
#preflight 636bdde4dc30a4ce960a9956

[CL 23071830 by pj kack in ue5-main branch]
2022-11-10 01:09:05 -05:00
nick darnell
3845a7f3a6 Editor - Introducing a new helper utility class, FWarnIfAssetsLoadedInScope exists in CoreUObject so that it can be used in lots of places, but it will only work in Editor builds, so it is marked as such. It allows you to throw a scope around some code to detect unexpected asset loads during that scope and then emit them as errors in the editor. It wont warn anyone that doesn't have -WarnIfAssetsLoaded in their commandline. It's a great little debugging utility when you're trying to prevent unexpected hitches from being introduced into the editor from unnessesary loads.
#jira UE-165574

[CL 23071814 by nick darnell in ue5-main branch]
2022-11-10 01:08:11 -05:00
nick darnell
51a6763dca FAssetData - You can now pass in EResolveClass::Yes or EResolveClass::No, into GetClass and IsInstanceOf on FAssetData in order to ask it to load classes that it can't find.
#jira UE-165574

[CL 23071802 by nick darnell in ue5-main branch]
2022-11-10 01:07:46 -05:00
henrik karlsson
4feb09e0b3 Compile time optimizations Managed to reduce unnamed game's biggest file compiler frontend cost from 113 seconds to 60 seconds. This also impact other things such as pch size and memory footprint when compiling which is great.
Takeaways. Try to use "friend" on functions/operators that are frequently overloaded EXCEPT if they are in a templated type that is frequently instantiated. So do not put friends in TMap, TSet, TObjectPtr etc, this will slow down compile times. There is a break-even somewhere and hard to tell where it is but taking a class that is templatized on character type probably don't matter either way and then it is nicer to use a friend since that simplies error messages when compiler can't resolve functions/operators.

If it is possible to use member functions instead of friend that is the best option in terms of compile time performance. With c++20 you only have to write operator==(Foo, Bar) and the compiler will automatically provide operator==(Bar, Foo), operator!=(Foo, Bar) and operator!=(Bar, Foo).

Changes in this changelist involes
* Making operator<< friends in non-template types and not friends in template types
* Making operator==/!= members where possible and if not possible moved out if type is a frequently instantiated templated type.

#preflight 636970f5376a9cd6a80da54a
#rb steve.robb

[CL 23038965 by henrik karlsson in ue5-main branch]
2022-11-08 15:59:46 -05:00
pj kack
59b93a60d9 AsyncLoading2: Fix infinite wait for io issue caused by decreasing PendingIoRequestsCounter too late in cl 22264831.
Improve handling of ProcessPendingCDOs by relying on the SyncLoadContext instead of a combination of PendingIoRequestsCounter and ReferencerRequestId.
Only create CDOs for packages in the current sync load context when there is one.
Add and release barriers for all export bundle nodes, not only the first one.

#rb carlmagnus.nordin
#preflight 636a5903f56cab38c71d778b

[CL 23031398 by pj kack in ue5-main branch]
2022-11-08 12:28:31 -05:00
bryan sefcik
45e50a215f Updated UObject::SaveConfig to not flush all the configs but instead only flush the updated config.
Before: 837ms
After: 46ms

#rb josh.adams
#jira
#preflight 63653a331052c15f131063bf

[CL 22998041 by bryan sefcik in ue5-main branch]
2022-11-04 19:05:59 -04:00
danny couture
ac88067879 Fix missing IsRoutingPostload in some zenloader code-path leading to anim sequence to reset its guid and cause recompilation
#rnx
#rb CarlMagnus.Nordin
#preflight 63650967de2c4dbb5d9c8615

[CL 22985315 by danny couture in ue5-main branch]
2022-11-04 08:51:55 -04:00
bryan sefcik
e0779d1a3b Added FindOrLoadLocalIniFile helper function that looks in the cache before trying to load the ini file.
CreateProfile:
Before: 2387.2ms
After: 9.68ms

LoadConfig:
Before: 2595ms
After: 541ms

U******RuntimeSettings::PostInitProperties:
Before: 27ms
After: 0.47ms

InitializeSerializationOptionsFromIni:
Before: 66ms
After: 0.86ms

#rb josh.adams
#jira
#preflight 63640d965c51adc95f9953e1

[CL 22977330 by bryan sefcik in ue5-main branch]
2022-11-03 23:46:54 -04:00
henrik karlsson
e76a55a7da BulkDataStreaming.cpp missing include Package.h
#rb none
#preflight skipped
#jira none

[CL 22970909 by henrik karlsson in ue5-main branch]
2022-11-03 19:26:00 -04:00
bob tellez
147734235e #UE Do not cook editor only soft object paths. Fix a regression that came from serializing soft object paths before processing the properties that reference them
[FYI] Francis.Hurteau

[CL 22968383 by bob tellez in ue5-main branch]
2022-11-03 17:59:51 -04:00
henrik karlsson
f4adba584c Fixed compile error in BulkData.h caused by integration
#rb none
#jira none
#preflight skipped

[CL 22968274 by henrik karlsson in ue5-main branch]
2022-11-03 17:57:06 -04:00
henrik karlsson
b985fbd1b1 Removed lots of includes in high traffic headers in order to reduce compile times. Headers are still included if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2 is set to 1
List of highlights
* PlayerController - Removed ForceFeedback and and OnlineReplStructs
* Class - Removed Package.h
* World - Pawn, Blueprint and GameInstance
* Actor - CoreNet, HitResult and ActorDatalayer
* EngineBaseTypes - TaskGraphInterface
* AssetManager - AssetData
* Scene/Child/ActorComponent - CoreNet
* AnimInstance - AttributesRuntime, Skeleton, AnimCurveTypes, AnimMontage, BonePose
* BulkData - IoDispatcher
* AssetData - IoDispatcher, LinkerLoad
* SecureHash - AsyncWork
* CanvasTypes - UnrealEngine, StaticMeshResources
* IpAddress - AsyncWork, Stats

#preflight 6363717ece676ae8688f5d8c
#rb none

[CL 22968258 by henrik karlsson in ue5-main branch]
2022-11-03 17:56:44 -04:00
joe pribele
50cfdde358 [CoreUObject] changed to check for null in TObjectPtr.GetPathName()
#preflight 63643317de2c4dbb5d47122c

[CL 22968073 by joe pribele in ue5-main branch]
2022-11-03 17:47:24 -04:00
Zousar Shaker
7a0beed2f7 2nd submit after fixing breakages in other streams:
Disallow TObjectPtr use on complete non-UObject derived types.

#rb devin.doucette
#preflight 63633a910c2e7c8f91d2e4e9

[CL 22966926 by Zousar Shaker in ue5-main branch]
2022-11-03 17:12:08 -04:00
ben hoffman
ac0136ab29 Add The Input Device trigger enum to the IInputInterface and as a noexport blueprint type. This will allow you to specify which trigger should recieve effects like resistence, feedback, vibration, etc.
#jira UE-158873
#rb David.Harvey
#rnx
#preflight 6362a0889160784fc31a9429

[CL 22961379 by ben hoffman in ue5-main branch]
2022-11-03 15:02:03 -04:00
paul chipchase
181c7ea9ec Using undo after landscape editing should no longer cause a mismatch in heightmap data being stored, preventing the asset from being saved.
#rb Per.Larsson
#jira UE-169114, FORT-533633
#preflight 6363a60b876630122aea6b16

- I needed to remove the 5.0 optimization where we tried to avoid loading the payload into memory so that it could be serialized to the undo stack. This logic would not work if the package were saved later and we were therefor unable to access the payload on disk.
- The landscape bug was not caused by this (as saving landscape actors wipes the undo stack) but caused by the inability to unload the payload properly. If an undo restore was run from a state where the payload was in memory to a state where the payload was not in memory, then that payload would not unload properly.So the bulkdata would end up with members for one payload, but the data of a different payload.

- We now always load the payload into memory if it is not there already and decompress into shared buffer format. In theory we could support two paths here one for FSharedBuffer when the payload is in memory and one for FCompressedBuffer when it is loaded from disk but it doesn't seem worth the effort. If it comes up as a problem in a profile then we'd be better off trying to add a way to create a non-compressed FCompressedBuffer from a FIoHash/FSharedBuffer pair rather than rehashing the FSharedBuffer.
- This also helps make the code clearer as we can remove the bPayloadInArchive value that we used to save.
- Once the undo stack transaction is completed we will try to unload the payload if we can. This is done if we are saving or loading and will only unload the payload if we know we can safely load from disk. Which means that the payload has not been edited from the version on disk and that the owning package has not been re-saved. This is to conform to the editor bulkdata policy that we should evict the payload from memory when ever possible to keep over all memory use down. It will however mean that repeated editing of an asset will cause repeated disk loads. This logic could be changed if it is profiled as an issue.

[CL 22959256 by paul chipchase in ue5-main branch]
2022-11-03 14:24:45 -04:00
henrik karlsson
fa90b399a4 Added includes for future change. This changelist only contains added #include and a couple of empty placeholder files
Tested compiling fortnite, unrealeditor, lyra, qagame with non-unity/pch

#preflight 63635997876630122adeab9f
#rb none

[CL 22958990 by henrik karlsson in ue5-main branch]
2022-11-03 14:18:47 -04:00