Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] A quick shutdown will cause a crash #174

Open
zhaozigu opened this issue Aug 8, 2024 · 3 comments
Open

[bug] A quick shutdown will cause a crash #174

zhaozigu opened this issue Aug 8, 2024 · 3 comments

Comments

@zhaozigu
Copy link
Contributor

zhaozigu commented Aug 8, 2024

Steps to Reproduce:

  1. User opens the project in Unreal Editor;
  2. Immediately after entering the interface, quickly close the editor;
  3. This will ultimately trigger an error.
Assertion failed: !IsInGameThread() [File: Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlModule.h] [Line: 128]

Cause of the Crash:

	static inline FGitSourceControlModule* GetThreadSafe()
	{
		IModuleInterface* ModulePtr = FModuleManager::Get().GetModule("GitSourceControl");
		if (!ModulePtr)
		{
			// Main thread should never have this unloaded.
			check(!IsInGameThread());
			return nullptr;
		}
		return static_cast<FGitSourceControlModule*>(ModulePtr);
	}

check triggered an assertion failure.

@zhaozigu
Copy link
Contributor Author

zhaozigu commented Aug 8, 2024

However, this does not seem to be a problem that can be definitively repeated.

@mastercoms
Copy link
Member

Do you have the full call stack?

@zhaozigu
Copy link
Contributor Author

zhaozigu commented Aug 9, 2024

@mastercoms

Assertion failed: !IsInGameThread() [File:E:\work\VersionGit\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlModule.h] [Line: 128]

UnrealEditor_GitSourceControl!GitSourceControlUtils::UpdateCachedStates() [E:\work\VersionGit\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:2180]
UnrealEditor_GitSourceControl!``FGitSourceControlProvider::CheckRepositoryStatus'::`2'::<lambda_1>::operator()'::`10'::<lambda_2>::operator()() [E:\work\VersionGit\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:170]
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_WindowsMoviePlayer
UnrealEditor_WindowsMoviePlayer
UnrealEditor_WindowsMoviePlayer
UnrealEditor_WindowsMoviePlayer
UnrealEditor_Core
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

I think it's because of the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants