Is there a known bug with packaging, references and objects not working? (more info in description)

We have encountered an extremely hard problem to solve, which I highly suspect is a bug in the engine itself.

We have a character superclass, which contains all the basic stuff all our AI characters should have. This object works fine when we run the game in the editor, but when we package it and run it as a stand-alone application, the characters stop responding. We tried spawning them high in the air, and they do not even fall (which they do in the editor). I spent half a week tracking the problem, and I have concluded that it is specific references in the object which breaks it. Among others, variables containing references to our player controller.
The really weird thing is, though, that it is enough to have a reference to an object of that class to break it. I can remove all these refs and it works fine, but as soon as I add a ref to an object of that class, even though it is null and never called, the characters stop working.
I have solved some of the problems by creating references to the built in super classes and then casting in every instance where the object is called (which is really terrible, but I need to get around this), but there are more complicated problems still there.

This is a problem which is EXTREMELY hard to track down, since I don’t have access to debug tools once packaged. I have looked through the packaging log, and I can’t find anything seemingly relevant.

Does anyone have any input on this? We are closing in on a deadline, and I can’t seem to solve the problem.

Hi xNoxerx ,

Please provide the following information:

  1. What device are you packaging to?
  2. Is the Player Character not responding, AI, or neither?
  3. Did you upgrade from a previous version of the editor?

Also try the following troubleshooting steps:

  1. Delete the Config, Intermediate, and Saved folders from your project (You will need to re-enter information in your Project Settings.)
  2. Run a map check on your Main level and all sublevels
  3. Select the “Content” folder in the Content Browser and select “Fix up Redirectors in Folder.”

Finally, if you’re still experiencing issues after following the troubleshooting steps, please post:

  1. Output Log
  2. Debug Logs from your package directory

Thanks,

.

Hello, thanks you for your response.

First of all I wish to reference this thread: https://.unrealengine.com/showthread.php?114603-Characters-break-when-packaging

What device are you packaging to?
PC. It is a PC desktop application.

Is the Player Character not responding, AI, or neither?
It is only the AI characters which are children from a class of ours called “SuperAICharacter” which don’t respond. Our characters who do not use this class works. We don’t have a player character, as we are building a RTS.

Did you upgrade from a previous version of the editor?
Yes, we upgraded from 4.10 to 4.12. It worked to build in 4.10 about a month ago, but we have had trouble packaging earlier git commits due to packaging errors which take a lot of time to resolve.

Also try the following troubleshooting steps:
Delete the Config, Intermediate, and Saved folders from your project (You will need to re-enter information in your Project Settings.)
Run a map check on your Main level and all sublevels
Select the “Content” folder in the Content Browser and select “Fix up Redirectors in Folder.”

We already tried making a clean project and migrating everything, as well as all above. No improvement.

Finally, if you’re still experiencing issues after following the troubleshooting steps, please post:
Output Log
Debug Logs from your package directory

You mean output log from the packaging? I will post it as soon as I get a new one.

How do we reach the debug logs from the package directory? Do we have to package as debug? We can’t seem to get it to work when we do that, sadly. Only got it to work when packaging for development build.
Edit: Managed to pack with debug tools. Logs attached below.

Debug Log

Packaging Log

Alright, so with very good timing with your reply we had a major breakthrough. Apparently it broke when we converted from 4.10 to 4.12. We tested the commit before and after the conversion, and that is what broke it.

This doesn’t really help us though, other than pinpointing the issue.

We are also experiencing a very similar issue and it is blocking our release. It appeared when we updated from 4.11.2 to 4.12.2.

In our instance, some BP function calls receiving class references receive a NULL instead, but only in shipping builds - it works when run from the Editor.

PC (Windows, Mac, and Linux), using 4.12.3.

Hi xNoxerx,

Generally we do not recommend upgrading to a newer version of the Engine, especially later in development because changes to the engine may result in massive adjustments having to be made in your custom code or blueprints and other unforeseen conflicts. However, we also realize it is necessary at times for fixes or new features crucial to a specific project.

Next, if it is necessary, I recommend upgrading to UE4.11, test packaging and working out all the problems there, otherwise these problems could be compounded by skipping and upgrading straight to UE4.12 from UE4.10.

Also, if you look in your log and search “Warning/Error Summary,” you will see a number of warnings that, while not necessarily “show stoppers” should be corrected. For example:

  LogLinker:Warning: Can't find file '/Game/OLD3DModels/Props/Vegetation/Grass/Grass_Text_TGA_Mat'

This is one of a number of warnings that could cause packaging to fail, although in this case I do not think it is the culprit. Nevertheless, cleaning these warnings up makes it easier to identify the ultimate problem through process of elimination.

In short:

  • If you do not need to update, don’t.
  • If you do need to, then “stair-step” up from UE4.11, packaging and checking the logs to make sure issues are resolved there before updating to UE4.12
  • Use your packaging logs and use search word, “errors” to identify problems in the latest build. Errors cause the build to fail, Warnings you should fix, but aren’t necessarily show stoppers.
  • Lastly, with each new upgrade, navigate to the project uproject, right-click and Generate Visual Studio project files. -This may generate errors but will ultimately help in the debugging process.

Hope this helps,

.

Thank you a lot for your thorough reply.

We have several hundred hours invested in our 4.12 version of the application. Is there a way to get the project back down to 4.11 or 4.10 without a git rollback, or do we need to copy everything to a 4.10 project manually?

Since you already have so many hours invested in UE4.12, if you’re using Github, you could rollback to UE4.12.0 before the packaging issue started. Also, I do not believe this is a bug with the Engine, but something that needs to be updated or corrected that will be a lot less work and less messy than rolling back to an earlier version of the Engine.

I would start with this major issue from your packaging logs and go from there:

MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:/Users/guest/Documents/Unreal Projects/Mixed-Reality-Game/Source/MixedRealityGame/MyGameMode.h(26) : Expected an include at the top of the header: '#include "MyGameMode.generated.h"' [2016.06.21-14.38.11:012][ 84]MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Error: Failed to generate code for MixedRealityGame - error code: OtherCompilationError (5)

To fix this, '#include “MyGameMode.generated.h” needs to be the last item in the include list MyGameMode.h.

The error in question was due to a unmanaged git merge conflict in the code. Usually when building we did not have it. I removed it, but no progress there.

We decided to manually downgrade to 4.10. Pulled our 1 month old 4.10 version from git and are in the tedious but fairly quick task (at least compared to the week we spent on this issue so far) of reproducing everything. This issue must have something to do with the built in conversion from 4.10 to 4.12, as it stopped working right after the conversion. If you want to call it an engine bug or not is a bit subjective I guess. Either way, we will respect conversions a lot more in the future, and make a thorough testing process if we are to do it again.

I am very impressed by your commitment to the support of your users. Thank you a lot for your help!

You may or may not be experiencing the same bug. There is a known bug with saving .uassets introduced with UE4.12 for instance, but there is no indication that it has to do with this post. If you are experiencing a bug, please use the following link as a guide and start a new post: How do I report a bug?
-thanks!

We are having to roll back to 4.11 because of the same bug, which is painful because we need the Gaze Input VR fixes in 12, but the packing issue stops our guns from shooting - so going to roll back and step forward one at a time, not optimal, tbh.