Emit one export bundle per package for UE4.26/4.27 containers - #69
Open
Desaigy wants to merge 1 commit into
Open
Emit one export bundle per package for UE4.26/4.27 containers#69Desaigy wants to merge 1 commit into
Desaigy wants to merge 1 commit into
Conversation
`build_zen_dependency_bundles_legacy` closes the current export bundle at every public export. For container header versions after Initial that matches the per-package Package Store Optimizer, but UE4.26/4.27 packages are not cooked that way: Epic's cooker computes a single global load order across every package in the cook and only closes a bundle when that walk moves on to a different package (IoStoreUtilities.cpp, BuildBundles). A package is therefore split only when another package's nodes interleave into the middle of its run, which in practice does not happen. Splitting at public exports instead yields two or more bundles per package, a layout the engine never produces for this target. Surveying five shipped UE4.26 mod containers, every package in all of them has exactly one export bundle; to-zen produced two for 138 of 140 packages of the same content, and eight for the skeletal mesh. The visible symptom is that mods built by to-zen load and render correctly, but the game then hangs forever inside FlushAsyncLoading once anything from the container has been loaded - exiting to the title screen, or loading a save - with no crash, no dump and nothing in the log. This was observed with plugin mods that introduce new packages; the bundle layout is built per package, so replacer containers should be affected the same way, but that was not tested. Gated on container_header_version so only UE4.26/4.27 output changes. Verified on FF7 Rebirth 1.004: nine plugin mods that reproducibly hung on exit to title are clean after this change, across eight test runs covering every affected character. Three further mods built with the fix already in place behave the same, for eleven working plugin mods in total.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build_zen_dependency_bundles_legacycloses the current export bundle at every public export. For container header versions after Initial that matches the per-package Package Store Optimizer, but UE4.26/4.27 packages are not cooked that way: Epic's cooker computes a single global load order across every package in the cook and only closes a bundle when that walk moves on to a different package (IoStoreUtilities.cpp, BuildBundles). A package is therefore split only when another package's nodes interleave into the middle of its run, which in practice does not happen.Splitting at public exports instead yields two or more bundles per package, a layout the engine never produces for this target. Surveying five shipped UE4.26 mod containers, every package in all of them has exactly one export bundle; to-zen produced two for 138 of 140 packages of the same content, and eight for the skeletal mesh.
The visible symptom is that mods built by to-zen load and render correctly, but the game then hangs forever inside FlushAsyncLoading once anything from the container has been loaded - exiting to the title screen, or loading a save - with no crash, no dump and nothing in the log. This was observed with plugin mods that introduce new packages; the bundle layout is built per package, so replacer containers should be affected the same way, but that was not tested.
Gated on container_header_version so only UE4.26/4.27 output changes.
Verified on FF7 Rebirth 1.004: nine plugin mods that reproducibly hung on exit to title are clean after this change, across eight test runs covering every affected character. Three further mods built with the fix already in place behave the same, for eleven working plugin mods in total.