PostEngineInit Crash

I have a C++ module that needs access to GUnrealEd in ::StartupModule(). For that reason, its LoadingPhase is set to PostEngineInit and it worked just fine. Since 4.6, the Engine crashes on startup:

Assertion failed: GEnumAutoStartupModuleName != nullptr [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp] [Line: 1005] 
This callback should be set by the target binary.

If I change the LoadingPhase to Default, the crash is gone, but so is GUnrealEd, since it has not been loaded yet. Is this a bug or is there a different way to do this now?

Hi lucasncv!

This should be fixed in the master branch with this commit:

Also, since it’s not a small change you could just modify FModuleManager::GetAutoStartupModuleList function to look like this:

void FModuleManager::GetAutoStartupModuleList(TArray<FString>& OutModules) const
	if (GEnumAutoStartupModuleName)
		const ANSICHAR* NamePtr = nullptr;
		int32 Index = 0;
		while ((NamePtr = GEnumAutoStartupModuleName(Index++)) != nullptr)