Project Packaging fails with Quaternion error during cooking

After upgrading the engine source code from 4.22 to 4.23, packaging my project has consistently failed during cooking with this error message:

UATHelper: Packaging (Windows (64-bit)):   LogCore: Error: Invalid input P=-35.000000 Y=-nan R=0.000000 to FRotator::Quaternion - generated NaN output: X=nan Y=nan Z=nan W=-nan
PackagingResults: Error: Invalid input P=-35.000000 Y=-nan R=0.000000 to FRotator::Quaternion - generated NaN output: X=nan Y=nan Z=nan W=-nan`

This error has appeared during 4.22 as well, though it appeared to be random and occurred about 10% of the time. Now however, it comes up consistently during cooking, thus rendering the project unable to package.

This is only the case with my main project though, other (empty) projects can be packaged just fine. Multiple rebuilds of UE4 have not helped, and clearing the project’s Intermediate, Build & Saved folders did nothing either.

The problem is that this error message is literally all I get. No information on which package produces this, or which line of code (if it even is code related).

So my question therefore is, how could I possibly begin to figure out what produces this problem? It’s been in the project since a while (since I mentioned even with previous UE4 versions it would occur occasionally), and it doesn’t occur in other projects, so it has to be some file/asset that causes this. The only question is how to find out which one. Any help is appreciated.

Hi!
I have the same problem. After some debugging (which included building the debugGame, started up the packaging, and putting breakpoint to the line throwing this error, and then attaching to both processes - the editor and the builder ) I found out that its thrown in my Level Sequence.
Namely here: UMovieSceneCameraCutSection::GenerateTemplate - somehow the transform given back from the container is invalid.
After finding out the name which caused this error, I looked up the asset, and when I opened it, it has thrown the same error.

After some playing, found out that this was caused by “Relative Transform” track. Deleted it, and made a same one with “Additional” instead of “Relative” and it’s working the same way for me.

But it’s reliably reproducable for me. If I have a camera in my scene, attach it to a newly created Level Sequence, delete the Transform and add Relative Transform instead, keyframe the values. Close and open, and boom, it’s NaN.

1 Like

We get this as a random error as well. It looks like it is something to do with deleting the transform and adding a relative, additive or absolute transform instead. Not sure if this is intended but for now we are keeping the default transform in the sequence.

Start VS Project With “DebugGame Editor”. Not “Debug Editor”

1 Like