From 219cf7e6248196ee6c5313a9877f612bb58c4a20 Mon Sep 17 00:00:00 2001 From: Koray Date: Sun, 15 Feb 2026 14:31:32 +0300 Subject: [PATCH] fix speedtree crash Unhandled exception at 0x00007FF6DBFC5EB1 (Metin2_Debug.exe) in metin2client__20260215_142707.dmp: 0xC0000005: Access violation reading location 0x0000000000000000. > Metin2_Debug.exe!LoadLeafShader(IDirect3DDevice9 * pDx, IDirect3DVertexDeclaration9 * & pVertexDecl, IDirect3DVertexShader9 * & pVertexShader) Line 290 C++ Metin2_Debug.exe!CSpeedTreeForestDirectX8::InitVertexShaders() Line 70 C++ Metin2_Debug.exe!CSpeedTreeForestDirectX8::SetRenderingDevice(IDirect3DDevice9 * lpDevice) Line 85 C++ Metin2_Debug.exe!CMapOutdoor::Load(float x, float y, float z) Line 38 C++ Metin2_Debug.exe!CMapManager::LoadMap(const std::string & c_rstrMapName, float x, float y, float z) Line 124 C++ Metin2_Debug.exe!CPythonBackground::Warp(unsigned long dwX, unsigned long dwY) Line 744 C++ Metin2_Debug.exe!CPythonNetworkStream::Warp(long lGlobalX, long lGlobalY) Line 374 C++ Metin2_Debug.exe!netWarp(_object * poSelf, _object * poArgs) Line 81 C++ [External Code] Metin2_Debug.exe!CPythonLauncher::RunFile(const char * c_szFileName) Line 319 C++ Metin2_Debug.exe!RunMainScript(CPythonLauncher & pyLauncher, const char * lpCmdLine) Line 246 C++ Metin2_Debug.exe!Main(HINSTANCE__ * hInstance, char * lpCmdLine) Line 302 C++ Metin2_Debug.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 329 C++ [External Code] [Frames may be missing, no binary loaded for kernel32.dll] [External Code] + leafVertexDecl 0x000000dff7aed768 {{Stream=0 Offset=0 Type=2 '\x2' ...}, {Stream=0 Offset=12 Type=4 '\x4' ...}, {Stream=...}, ...} const _D3DVERTEXELEMENT9[5] + pCode 0x0000000000000000 ID3DXBuffer * + pDx 0x000000dfbdbc37c0 {...} IDirect3DDevice9 * + pError 0x0000000000000000 ID3DXBuffer * + pVertexDecl 0x0000000000000000 IDirect3DVertexDeclaration9 * & + pVertexShader 0x0000000000000000 IDirect3DVertexShader9 * & --- src/SpeedTreeLib/VertexShaders.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SpeedTreeLib/VertexShaders.h b/src/SpeedTreeLib/VertexShaders.h index 0f47ef5..2670803 100644 --- a/src/SpeedTreeLib/VertexShaders.h +++ b/src/SpeedTreeLib/VertexShaders.h @@ -287,7 +287,7 @@ static void LoadLeafShader(LPDIRECT3DDEVICE9 pDx, LPDIRECT3DVERTEXDECLARATION9& } } else { - TraceError("Failed to assemble leaf vertex shader. The error reported is [ %s ].", pError->GetBufferPointer()); + TraceError("Failed to assemble leaf vertex shader. The error reported is [ %s ].", pError ? pError->GetBufferPointer() : "unknown"); } if (FAILED(pDx->CreateVertexDeclaration(leafVertexDecl, &pVertexDecl))) {