I am trying to cook a project, but it fails with the errors below. Build for editors works fine, but I cannot do a package for windows.
NOTE: GameGameModeBase.cpp:17 is a part of cunstructor, I tried to comment everything there, but I still have the same error. Another weird thing, I do not have this path at all on my PC [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp]
I am still trying to debug this and noticed that I cannot load any bliueprint that has a Subclass field of a Common UI Widget. I still do not have a way around. It fails on the next run after I set UI class in editor insread of code.
Same problem here. I’m trying to find the cause of the issue, but it’s very hard, because it has something to do with CommonActionCommited_PythonCallable, which is something of the PythonScript plugin and has nothing to do with my code.
EDIT:
After some furious debugging (I wasted a lot of time like you) I found the issue . Because of the loading phases of the two plugins, the variable GIsDuplicatingClassForReinstancing was true and the Python plugin was creating a default object while that variable was true. This is what I did: I edited PythonScriptPlugin.uplugin and changed LoadingPhase of PythonScriptPlugin from PreDefault to Default. I don’t know if this breaks something inside the PythonScriptPlugin though, but I don’t use it so I don’t care (and I couldn’t disable it because it’s used by Niagara). I think this is an acceptable fix until Epic fixes the problem. Another fix that you can do is disabling the ensure condition in UObjectGlobals.cpp, but maybe it’s more destructive than changing the loading phase of the Python plugin.
Thank you! I was running into the same problem, and this fixed it. I don’t love the idea of making this change to a plugin in an installed engine version, but this was a relatively simple fix. I’d love for Epic to fix this issue in the engine.
incredible. this fixed the issue for me as well (specifically, a uuserwidget blueprint that used commonui erroring out in packaging for windows). thank you!
my project is on 5.2. the exact location of that file on 5.2 is UE_5.2/Engine/Plugins/Experimental/PythonScriptPlugin/PythonScriptPlugin.uplugin and the change is made on line 26.