Corrupted Blueprint nodes related to a plugin

I’m the developer of a plugin. In the past few days I’ve been in contact with an user that is experiencing weird problems, but I’m not able to help him.

The problems do not seem to be related to the plugin content itself, although he is having problems, in his project, only with the nodes from my plugin (not all of them though).

Basically, my plugin deals with animations, for example moving an object from point A to B. The user has been using it for at least 2 months without a problem, but a few days ago (without any particular change in the involved nodes), about 90% of the nodes from my plugin have been “corrupted”. By this he means that they do work, but it’s like the input values are set “randomly”. For example, if he has to move an object by 10000 on the X axis, it would move by 14000. The input values, in his examples, are hardcoded on the plugin, so there is no chance that the input values are just not what expected.

The weird thing though, is that if he removes the plugin node from the Blueprint (changing the input values is not enough), and then recreate it as is (changing, then the node starts working again!

I thought that maybe the nodes were somehow serialized in the wrong way by the Unreal Editor (maybe due to a crash or something), so they are feeded different values with respect to what they show. But I’m not even sure that’s possible.

I’m really at a loss with this, I hope you can help me understand what might be going on.

This is a video he made for me to display the problem. First he shows that during gameplay an animation does not run as expected. Then, he shows in the Blueprint the “corrupted” node that is fired. Then, he tries to change the input values and shows that at runtime nothing has changed. Then, he removes the node and recreate it as is. At runtime, he shows that at this point the animation works as he intended.

What might be going on?

I’m assuming its only this one person? Then it must be something to do with the project.

If that’s so, maybe he can send you a cut down version of the project, then you could find out much more easily what’s going on.

It’s only a little help, but…

Yeah, it’s only him. But taking a look on the project it’s not possible at the moment, so I have to work with “guesswork”

I’ve found a workaround, but I think there is a race condition somewhere in Unreal that is causing this. I was running into issues where the MergeMeshes node / structs from the SkeletalMerging builtin plugin were corrupted on project load, and just like OP recreating the nodes fixed it, but they would be corrupted again after a restart. Nothing was abnormal with my uproject file:

{
    "FileVersion": 3,
    "EngineAssociation": "5.3",
    "Category": "",
    "Description": "",
    "Modules": [
        {
            "Name": "SabotageGame",
            "Type": "Runtime",
            "LoadingPhase": "Default",
            "AdditionalDependencies": [
                "AIModule",
                "Engine"
            ]
        }
    ],
    "Plugins": [
        {
            "Name": "ModelingToolsEditorMode",
            "Enabled": true,
            "TargetAllowList": [
                "Editor"
            ]
        },
        {
            "Name": "StaticMeshEditorModeling",
            "Enabled": true
        },
        {
            "Name": "GeometryScripting",
            "Enabled": true
        },
        {
            "Name": "AnimationBudgetAllocator",
            "Enabled": true
        },
        {
            "Name": "SkeletalMerging",
            "Enabled": true
        }
    ]
}

and this code was working for well over a month before it randomly started breaking with no changes to it, the plugins I have enabled for my project, or the version of Unreal I’m using. I did add some more build dependencies to my Build.cs file recently, but this issue didn’t start happening until a week or so after that.

When I changed my uproject file to load my game module in the PostDefault LoadingPhase instead of Default, the corruption stopped happening. But I don’t think this is a proper fix because it doesn’t address why the plugin load order randomly changed without any reason. The most recent change that happened pre-corruption was my user-level class that I started to see corruption in started to be used in Behavior Tree tasks. Maybe the AIModule’s involvement could have affected the load order somehow? But any usage was in custom, user-level AI classes. I might take some time to bisect the changes I made at some point, but changing the game module’s load order to PostDefault at least mitigates the issue for now.