Error when packaging

Hello there,

when i try to package my game i get a strange error, i’ve never seen and i dont know how to fix:


Error: Ensure condition failed: !FPackageName::IsShortPackageName(Path 
 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/SoftObjectPath.cpp] [Line: 46]

Error: Cannot create SoftObjectPath with short package name '('! You must pass in fully qualified package names

I dont see anyone else on the internet getting this error. Can anyone help me?

Thank you,

Marc

How do i find the file causing the error? Thanks in advance

New update, i found the file in question. For my weapon system i wrote an attachment system, where before i had defined an attachment as a struct with appropriate data and then decide in weapon class what to do.
To streamline this and make Attachments able to be picked up by the player, i have changed the Attachment system to a struct of class references, where every new Attachment is a new class deriving from Attachment_Base class.
This does not work for some reason. Why can’t i store classes in a struct?

Can someone help me on this?
Thanks

Ok, after endless hours of searching i have found out that the file was corrupted. Case closed

how can you figure out which file was corrupted, my project also meet this trouble in 4.26,but it just a blueprint project, but i have used too much file…

Running 4.26, here as well and have gotten the same error all of a sudden. WTF.

yip, same here 4.26.
No hint as to what the solution is anywhere. Validate assets doesnt show the problem and you are left with no idea as to what the issue is or where. A total farce when the only way to fix the issue is start again. Migrating code wont work into a new build either. If the editor says all assets are ok what are you meant to do?

I would love to know how you found the file in question, do you know what is specifically wrong with it?

4.26, run to get the same problem

What you can do is go through every single asset and open it, compile it and then save it. If you get a crash doing that then its likely the issue.

However, it gets more fun. Ive descoverd ghost files which wont show up in the editor but do exist in the main game folders, these will be causing issues as well. In effect you have a good old search for a needle in a haystack ahead.

I had the same error. In my case it was missing calling “super” methods in overrided members of component.

void USomeComponent::TickComponent(float DeltaTime, ELevelTick TickType,
    FActorComponentTickFunction* ThisTickFunction)
{
    Super::TickComponent(DeltaTime, TickType, ThisTickFunction); // should be present
}

void USomeComponent::BeginPlay()
{
    Super::BeginPlay(); // should be present
}

void USomeComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
    Super::EndPlay(EndPlayReason); // should be present
}

Adding these lines solved my problem.

what i did to find the error was: make a copy of the game, then slowly delete folders/files, also remove references to deleted files then cook the game again. Repeat until error is gone, if you closed in on a folder/file you can double check by deleting it first then cooking. This is a tedious process that takes ages. This would also only work if you wanted to find corrupt files (and you don’t want to roll back to an earlier version via source control), but to my knowledge multiple things can make this error occur, not just corrupt files, i don’t know any solutions then

This is a new bug introduced in 4.26, I highly doubt it has anything to do with file corruption, however the solutions for usual file corruption seem to fix this bug.
I have this error myself as of yesterday, and googling around, so does almost every single person on 4.26.

Hi, im having this bug, I was wondering what you meant by the usual solutions for file corruption. Is there any chance you could tell me what you did to fix it?

This cropped up for me in 4.26 for sure, I had a directory with a space in the name… you know something like the default… “new folder”, that was my issue.
So i changed that to something without a space in the name, and it fixed this. Not saying this is the sole solution or anything FYI

Oh sorry I wasn’t very clear. I keep reading that people are fixing this by treating it as file corruption. So solutions that seem to be working for some people is completely re-creating their projects one asset at a time.
I still have this bug and can’t seem to fix it yet :frowning:

I worked hard for 2 days, trawling through every folder and blueprint code of the project, and finally found a variable. There was no problem with deleting this variable and recreating it. Duplicating this variable could not solve the problem, it was probably a bug of the engine.

Ok so after spending 2 full days on this bug, I was able to find my own source for the problem, but I don’t understand why. Wish I had better news for people to save the day, but this is a nasty bug, and the only way to fix it seems to go through every piece of little code you have.

I have a widget called “PlayerWaitingHostStart”
I have a PlayerController called “LobbyPlayerController”
In my “LobbyPlayerController” I made a widget variable called “PlayerWaitingHostStartWB”.
That variable simply existing is what was causing the issue for me.
I deleted the variable. Problem is gone. I re-created the variable. Problem is still gone. I guess I somehow got a corrupted variable?

My only advice to people is to copy your current project, and delete assets 1 by 1 that you worked on last. This will at least help you narrow it down to which blueprint (and you don’t have to worry about ruining or re-creating your project), and hopefully you will remember what you last worked on that could be causing it.

In blueprints I had a similar error message with the soft object path, but mine was saying:

Error: Ensure condition failed: !FPackageName::IsShortPackageName(Path)
[File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/SoftObjectPath.cpp] [Line: 79]
Error: Cannot create SoftObjectPath with short package name 'NoneNone'! You must pass in fully qualified package names

Then I made a backup of my project and deleted every blueprint one by one to find out which one was causing the problem. Once I found out which one it was, I started deleting parts of the code until I pinpointed my problem.

The issue got caused when I duplicated an actor reference variable and then changed it to another actor. So, I deleted that variable and created it from scratch and the problem was solved.

I’m not sure why that would happen because no error was given and it runs fine in the editor. Anyways, I thought I would share that just incase someone has a similar issue.

Hi! I encountered this issue today, and fixed it about 5 minutes ago, so my solution is fresh and will probably work for everyone. Although for those who do not have coding knowledge, I feel sorry, because I don’t see any other way to properly track it down without debugger attached. So:

  1. Run editor with debugger attached.
  2. Enter the game - above error occurs, it will point you to the SoftObjectPath.cpp, but there is no info, so go to the callstack, and search for call in the file BlueprintEditorUtils.cpp. This function there will have FProperty as input, if you hover over it with debugger attached, it will show you EXACTLY which variable is causing the issue. Write its name down.
  3. Go even deeper into the callstack down to the KismetCompiler.cpp. It must have gone through the function PropagateValuesToCDO. This method has UObject* InNewCDO as parameter, hover over it and write down the name of that variable.
  4. Restart UE editor, find that asset, and that specific variable. Renaming won’t work. I found that removing that variable completely, and adding brand new one WITH DIFFERENT NAME and manually replacing references missing after old one is removed fixes that error! Voila :slight_smile:

It’s possible to fix that without compiler, but UE callstack doesn’t give you any info about what asset and variable this is all about. So tracking down which asset causes that might take much longer.

3 Likes