we’ve noticed that quite randomly and unpredictably, our automation build machine tasks fail with an error saying “Error: FAssetBundleEntry::ImportTextItem - unterminated or ill formed AssetPaths list while importing asset bundle entry: ’ (Director BP)_C,/Game…<followed by a super-long-list of asset paths>”. We’ve had these errors logged both when triggering a BuildCookRun UAT command and also when executing a UDataValidationCommandlet, right after the engine starts up, even before the actual operation begins.
We have a few PrimaryAssetLabels in the projectthat are set to label content in their (sub)directories and that’s what the assets in the super-long-list are - basically every asset that a single such PAL labels. I’ve noticed that under “regular” circumstances, when resaving the PAL, the “problematic” asset path shows “Path/To/LevelSequenceAsset.Default__LevelSequenceAsset_DirectorBP_C” instead of “Path/To/LevelSequenceAsset.Default__LevelSequenceAsset (Director BP)_C”, so it seems that under some circumstances, the asset path just gets an unexpected (and invalid) format there.
So far, we haven’t found a cause as the repro is quite elusive - a re-run of the same command right afterwards always “fixes” it. We suspect something related to local asset cache going wrong, especially because a simple relaunch of the editor makes the issues go away, but we haven’t figured out why they randomly come back sometimes. We also thought whether redirectors could perhaps somehow interfere here, because we have our PALs set to include these, but it’s all just guesswork at this point.
I wonder whether there’s something that rings a bell to you or whether you could point us in a direction to better investigate these - any help is greatly appreciated.
In the meantime, I did some more research so I can add more context.
It seems to be caused by an ObjectRedirectorsubobject, that has somehow been created inside the LevelSequence asset in the past - we have quite a few of such LevelSequences and I can’t exactly imagine what kind of operation would even create a subobject redirector of a sequence director blueprint. As far as my editor knowledge goes, such sub-assets are impossible to directly see or fix using Content Browser. Perhaps because they’re a subobject, they don’t show even with Show Redirectors filter, but I’ve noticed that if I select Update Redirector References action on the parent folder of such LevelSequence asset, they do show up in the popup window, with a green checkmark next to them, saying they’re not being referenced by anything and are thus ready to be deleted, but pressing the Delete Unreferenced Redirectors doesn’t really do anything, because the ObjectTools::DeleteObjects fails to delete the inner redirectors (FAssetDeleteModel::DoDelete fails because it both has bIsAnythingReferencedInMemoryByNonUndo and OnDiskReferences > 0).
We could do some simple engine modifications to force the removal to be able to get rid of these inner redirectors, but we’re not even sure how they got created in the first place and what an ideal workflow here would be with tackling them.
However, I’m still puzzled about how the entire asset cache and PAL interacts with this - I’ve realized that if I remove Intermediate/CachedAssetRegistry_0.bin I can always reproduce getting this “FAssetBundleEntry::ImportTextItem - unterminated or ill formed AssetPaths…” error the first time I start up the editor, perhaps as if this code was only hit during the cache reconstruction, but I’m not sure why it doesn’t happen in the other scenario, when the cache asset registry is already present.
Apologies for the delay in response. We did make a change to the director suffix in CL:23353177 in 2022. This removed some invalid characters from the name of the director bp to work better with some tools.
Were these assets created using Unreal 5.1?
Alternatively, do you have any code that would be trying to reference the Director BP subobject or have modified the Director BP class to be created as RF_Public?
That sounds great. I’ll mark this as pending, and if you run into any more issues, feel free to reply again. It will automatically try to move to close in 14 days.
Yep, we’ve migrated the project from 5.0 to 5.4 about a year ago and from a quick check, all of the problematic LevelSequence assets were made back in 5.0.
For the second question, that would probably be a no, we haven’t really done any modifications to any Director-handling code.
Since my last post, I’ve created a quick utility to detect and force-remove such redirectors, which seems not to have caused any unexpected redirector-related issues and we haven’t seen the original errors come back since I ran the util on the problematic assets, so we might already be all good. With you confirming that it’s older-engine-version related, I’m now happy to consider the issue solved with no fears of it reoccurring under some mysterious circumstances.