UEGitPlugin
UEGitPlugin copied to clipboard
Crash during start up can't LoadModule
Hello. Using latest release 3.06, and unreal 5.0.2 me and my coworker are getting crashing randomly in unreal during the initial loading of the plugin. When it happens it seems to happen a few times in a row then go away.
The crash is within ModuleManager.cpp, in LoadModuleCheck. When the plugin attempts to start handing the branch check.
UnrealEditor-Core.dll!FModuleManager::LoadModuleChecked(const FName InModuleName) Line 388 C++ UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlModule::Get() Line 118 C++ UnrealEditor-GitSourceControl-Win64-DebugGame.dll!GitSourceControlUtils::GetBranchName(const FString & InPathToGitBinary, const FString & InRepositoryRoot, FString & OutBranchName) Line 523 C++ UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlProvider::CheckRepositoryStatus::__l2::void
(void)::__l2:: () Line 114 C++ UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlProvider::CheckRepositoryStatus::__l2:: () Line 139 C++ UnrealEditor-GitSourceControl-Win64-DebugGame.dll!UE::Core::Private::Function::TFunctionRefCaller<void (void),void __cdecl(void)>::Call(void * Obj) Line 549 C++
What's the actual error? Access violation?
It throws an exception when it validates on this line.
IModuleInterface& FModuleManager::LoadModuleChecked( const FName InModuleName )
{
IModuleInterface* Module = LoadModule(InModuleName, ELoadModuleFlags::LogFailures);
checkf(Module, TEXT("%s"), *InModuleName.ToString()); <== throw.
return *Module;
}
seems like the modules not loading correctly, or its a race condition or something.
if I continue passed that, it dies with a read access violation as the provider is junk memory.
Ok, thanks, will check it out!
Any update on this, it seems to be becoming worse I have to continually hit rerun till I get in now haha.
I haven't been able to spot the race condition yet. As a workaround, you could add || true
to this line.
I'm having the exact same issue, @paulash did that workaround solved it?
@mastercoms doing some debugging, could it be related to loading the module in another thread, OR the LoadingPhase, that is currently set to "Default"?
https://docs.unrealengine.com/5.0/en-US/API/Runtime/Projects/ELoadingPhase__Type/
Also getting this pretty much every time I open the Project. Have to restart 2 or 3 times for it to finally boot and not throw this error :(
I'm having the exact same issue, @paulash did that workaround solved it?
@mastercoms doing some debugging, could it be related to loading the module in another thread, OR the LoadingPhase, that is currently set to "Default"?
https://docs.unrealengine.com/5.0/en-US/API/Runtime/Projects/ELoadingPhase__Type/
Yup, that did indeed work for me. Havent gotten a crash sense.
Yup, that did indeed work for me. Havent gotten a crash sense.
Okay great, I will go with that workaround in the meanwhile. Thanks
This is all on UE5 right?
This is all on UE5 right?
In my case, yes
Just chipping in to say that our team had the same issue, and that the workaround from https://github.com/ProjectBorealis/UEGitPlugin/issues/51#issuecomment-1200437532 fixed it. UE 5.0.3.
Same, I've had to fork in order to apply this workaround, otherwise this startup crash would bite us every other editor start 🤔 It's quite a nasty one.
Yeah, I'll have to test the plugin with UE5 more, since it works fine for UE4. So I'm wondering what changed.
I got this once on UE4 as well. So seems like it is much rarer on UE4 but still present. Adding a speculative fix that might work, after investigating.
I tested out the fix this morning and unfortunately it's not fixed in UE5. I got the same crash on around the 5th restart. The workaround is still the only thing that reliably eliminates the crash so far.
In e37691b578d91bee780158b6413fbc92e656a8d3, I have made the workaround part of the build for UE5, so that people don't have to come into this thread to find it :). Will keep trying to figure out what's going on.
I hate to be the bearer of bad news, but after updating to https://github.com/ProjectBorealis/UEGitPlugin/commit/7d6321da5ebafc732eed1c1e1f604772b0e72541 I got the old startup crash immediately :/ (UE5)
Wait, sorry, my bad - I think I got mixed up between your release branch and my fork's release branch which wasn't up to date.