From 7a35d1caa28a1d3f1ddbaf5f6f6c285c70ceda80 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Mon, 23 Mar 2026 01:58:58 -0500 Subject: [PATCH] fix: run `Minecraft::init` from the main thread only this was an orbis-specific hack seemingly that developed into a datarace after merging TU19 causing clang to segfault on startup --- .../Platform/Linux/Linux_Minecraft.cpp | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index c7599a4b7..f241f4a5b 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -877,27 +877,6 @@ return -1; Tile::CreateNewThreadStorage(); Minecraft::main(); - - // Minecraft::main () used to call Minecraft::Start, but this takes ~2.5 - // seconds, so now running this in another thread so we can do some basic - // renderer calls whilst it is happening. This is at attempt to stop getting - // TRC failure on SubmitDone taking > 5 seconds on boot - C4JThread* minecraftThread = new C4JThread(&StartMinecraftThreadProc, NULL, - "Running minecraft start"); - minecraftThread->Run(); - do { - RenderManager.StartFrame(); - Sleep(20); - RenderManager.Present(); - } while (minecraftThread->isRunning()); - delete minecraftThread; - - // Re-acquire the GL context in the main thread. - // StartMinecraftThreadProc calls InitialiseContext() which moves the - // context to the init thread for texture loading; we must reclaim it here - // before any further OpenGL calls in the main render loop. - RenderManager.InitialiseContext(); - Minecraft* pMinecraft = Minecraft::GetInstance(); app.InitGameSettings();