Redirector of GameInstance Blueprint causes crash, build problems
The Game Instance Class we have set in the Project Settings / Maps & Modes is a Blueprint inheriting from a C++ class which in turn inherits from UGameInstance (which might not be important here).
The Blueprint was moved at some point and a Redirector was created.
When trying to build or package the game and run, we would assert and crash on startup, with this message: "NewObject called with a nullptr class object". The Game Instance Class was correctly set, the build was successful.
In the logs we saw that it had problems cooking that Redirector. We fixed the Redirector (right-click and "Fix up") but got the same error again.
This time, it was because the Game Instance Class in the Project Settings / Maps & Modes was actually using the Redirector without our knowledge. And even thought the Redirector was fixed up and deleted, the Game Instance Class was not fixed and was reset to None. We had to set manually. Only then was the assert removed.
It feels like the build should fail if it fails to correctly process Redirectors. Or there is a check missing in the Redirector fix up process to also fix references to Redirectors in INI files.
The issue here actually isn't related to the packaging at all. There is currently a bug in our system for this under the number UE-6040. Whenever you move or rename the Blueprint class that the Game Instance Class is set to, it immediately defaults the Game Instance Class to None, which causes the package to fail. Also, the packaging process fixes up redirectors itself. You can usually see if it fixed any by looking at this line in the logs:
"[2016.01.13-20.49.27:883][ 6]LogCollectionManager: Fixed up redirectors for 0 collections in 0.000060 seconds (updated 0 objects)"
In this case, if the blueprint was only being referred to by the Game Instance Class, there will not be any redirectors to fix up as nothing is referring to it.
For now, you'll need to keep on top of that variable but the issue is in the queue to be fixed.
Have a nice day!
answered Jan 13 '16 at 08:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here