Splines become zero length/duration in standalone- help, please

I have a custom actor with a spline component. The component length and duration is set by an editor utility widget.

When I run the game in editor, the splines express their length and duration properly.

But when I run the game in standalone, the splines all become zero length and zero duration.

I’ve gone through all my actors that ever touch these splines, and nothing is trying to set the splines in anyway at runtime.

I feel like there must be something subtle and systemic that I’m missing. I don’t understand how they become zero since that’s not even the default values for the component class. I’ve traced the only function in my blueprints that can set the spline points directly, and it is not being called by anything at runtime.

I’m pulling my hair out over this… what can I investigate to solve this?

Discovered that the spline components are being prepended with TRASH_… does this mean they are being destroyed at start?

If so, why would this happen? There is definitely no code calling for the spline components to be destroyed. And the actor itself is not being destroyed.

This turned out to be a stale parent class of some sort.

I traced this issue by checking to see if my components were actually being destroyed. They were not. I figured they must be losing their connection to the root of the actor and becoming orphaned. So I tried to make sure the components had a valid root attachment. Since inherited roots are fixed, I had to reparent the class itself to Actor for a moment to see what happened. When I did that, it lost the DefaultSceneRoot all together. I flip flopped on this a little, then decided to run some traces on the parent actor.

The parent actor’s functions were not being called. Breakpoints were completely skipping any call to parent functions.

So this lead me to believe that the parent class had broke somehow.

I reparented the parent class to some random class and then back to Actor, and all my breakpoints and parent function calls woke up.

At that point, all my components on the inherited classes stopped being sent to garbage collection and things automagically started working again.

Did a little cleanup to undo all my debugging and fixing component hierarchies and I’m back in production.

1 Like

Well, the issue returned after an unclean editor exit.

What is a real headscratcher is that the components aren’t garbage collected in PIE, but are in Standalone. I’m watching the output log, and I’m not seeing any warnings or errors.

1 Like

I had a similar issue a while back where some particular actors of the same parent class would always go to world position 0,0,0 after restarting the editor - what worked for me in that case was to set the transform location of all the components in the BP to “world”, save & compile > restart the editor > set the components back to transform relative > Save & compile > restart the editor (after that they would stay in the level as I had placed them).

If I just went ahead and set them to world > save & compile > relative then restart they would start glitching back to 0,0,0.

Maybe the editor has a better way of fixing corrupt Blueprints however?