Download

GEngine not initialized! issue

Get 8 of the bellow error when I startup Ue4(in output log) and when I attempt to cook I also get this issue, It gives very little context around why it is happening or how i can fix it.
"LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with "


): UE4Editor-Cmd: [2016.05.14-12.49.55:926]  0]LogTargetPlatformManager:Display: Building Assets For WindowsNoEditor
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:795]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:795]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:795]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:795]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:796]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:796]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:796]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.57:826]  0]LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with if(!HasAnyFlags(RF_ClassDefaultObject)) or move out of constructor, material parameters will not be correct.
MainFrameActions: Cooking (Windows): UE4Editor-Cmd: [2016.05.14-12.49.58:717]  0]LogCook:Display: Max memory allowance for cook 8192mb

If anyone has run into this issue it would be lovely if you could help

You probably tried to use GEngine->AddOnScreenDebugMessage or another GEngine function in the constructor of one of your classes. This cannot be done, as GEngine has not been initialized yet when they are run.

Hello @Evaned ,
I know its been a while, but did you managed to find the error? I’m having exactly the same problem, 8 "LogPhysics:Error: FBodyInstance::GetSimplePhysicalMaterial : GEngine not initialized! Cannot call this during native CDO construction, wrap with " .

On editor works, but the problem is the packing the game.

Thanks!

You’re doing something in a Constructor or very early in initialization that you shouldn’t, such as trying to access a body instances physical material.

Hello @TheJamsh ,

Is there a way to narrow the search? The log shows only that info. I have been looking for a while but I can’t find anything.

Does it apply to BP and C++ classes?

Thanks!

Hello @**msclecram,

Did you manage to find problem?
I have the same issue and I can’t figure it out…**

Hello @Showen ,

Today I finally found my problem by binary searching over all the repository commits/changes.

I had a body->SetAllMassScale(massScale); on the constructor, I changed it to body->BodyInstance.MassScale = massScale ; and now I can package.

It seems a error easy to make, I’m surprised the small amount of info over the internet. Also the error needs to be more descriptive.

I’m not sure if another functions may cause the same problem, I guess internally they call GetSimplePhysicalMaterial .