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

[NetImGui] Crash when running without a renderer #58

Open
KABoissonneault opened this issue Aug 23, 2021 · 0 comments
Open

[NetImGui] Crash when running without a renderer #58

KABoissonneault opened this issue Aug 23, 2021 · 0 comments

Comments

@KABoissonneault
Copy link

KABoissonneault commented Aug 23, 2021

In changelist 0e4fa23, the LoadTextures in ImGuiModuleManager.cpp was moved from FImGuiModuleManager::AddWidgetToViewport to FImGuiModuleManager::OnContextProxyCreated. Since the proxy seems to be always created on first Tick even without a renderer, this crashes with the following callstack.

 	[Inline Frame] UnrealEditor-SlateCore.dll!FSlateBrush::CanRenderResourceObject(UObject *) Line 137	C++
>	UnrealEditor-SlateCore.dll!FSlateBrush::SetResourceObject(UObject * InResourceObject) Line 148	C++
 	UnrealEditor-ImGui.dll!FTextureManager::FTextureEntry::FTextureEntry(const FName & InName, UTexture2D * InTexture, bool bAddToRoot) Line 140	C++
 	UnrealEditor-ImGui.dll!FTextureManager::CreateTextureInternal(const FName & Name, int Width, int Height, unsigned int SrcBpp, unsigned char * SrcData, TFunction<void __cdecl(unsigned char *)> SrcDataCleanup) Line 68	C++
 	UnrealEditor-ImGui.dll!FTextureManager::CreatePlainTextureInternal(const FName & Name, int Width, int Height, const FColor & Color) Line 100	C++
 	[Inline Frame] UnrealEditor-ImGui.dll!FTextureManager::InitializeErrorTexture(const FColor &) Line 13	C++
 	[Inline Frame] UnrealEditor-ImGui.dll!FImGuiModuleManager::LoadTextures() Line 85	C++
 	UnrealEditor-ImGui.dll!FImGuiModuleManager::OnContextProxyCreated(int ContextIndex, FImGuiContextProxy & ContextProxy) Line 232	C++

On this line

if (FSlateApplicationBase::IsInitialized())
{
	return FSlateApplicationBase::Get().GetRenderer()->CanRenderResource(*InResourceObject);
}

With the error:

Exception thrown: read access violation.
FSlateApplicationBase::CurrentBaseApplication.Object->Renderer.Object was nullptr.

To reproduce, I opened the editor with -run=GenerateSoundBanks.

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

1 participant