Skip to content

Conversation

@CrystalFerrai
Copy link

@CrystalFerrai CrystalFerrai commented Nov 2, 2025

  • FunctionExport had TODOs in its serialization code that should be completed by these changes. For reference, I looked at UFunction::Serialize in Class.cpp. The code is the same in UE 4.27 and UE 5.6. I have only tested with UE 5.6 assets.
  • While creating test assets using UE 5.6, I managed to create one that triggered a crash in AncestryInfo.SetAsParent where the parameter dad had its Value property set to null which triggered a NullReferenceException when accessing dad.Value.Value.

Existing unit tests all passed.

@CrystalFerrai
Copy link
Author

CrystalFerrai commented Nov 2, 2025

Here is the asset that triggered the crash in AncestryInfo.SetAsParent. I loaded the raw bytes (uasset and uexp) into an array and used code like this to read it.

UAsset asset = new(version);

using (MemoryStream stream = new(rawData))
using (AssetBinaryReader reader = new(stream, asset))
{
	asset.Read(reader);
}

TestActor.zip
(Engine version used to create the asset is 5.6.1)

@trumank
Copy link
Collaborator

trumank commented Nov 18, 2025

I'm struggling to reproduce the crash here. I've tried adding as a regular test via:

TestUE5_6Subsection("TestActor", EngineVersion.VER_UE5_6);

and also loading the uasset + uexp manually and reading from a memory stream, but neither raise an exception on this line. The test only fails due to binary equality and unparsed exports.

Can you add a test demonstrating the crash and the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants