Skip to content

Unhandled exception at 0x67ACAF7C after #4076 #4078

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

Closed
1 task done
Nico8340 opened this issue Mar 6, 2025 · 3 comments · Fixed by #4089
Closed
1 task done

Unhandled exception at 0x67ACAF7C after #4076 #4078

Nico8340 opened this issue Mar 6, 2025 · 3 comments · Fixed by #4089
Labels
bug Something isn't working

Comments

@Nico8340
Copy link
Contributor

Nico8340 commented Mar 6, 2025

Describe the bug

Unhandled exception at 0x67ACAF7C after #4076

Steps to reproduce

  1. start runcode
  2. crun getWeaponProperty("ak-47", "pro", "anim_loop_start")

Version

Not released yet

Additional context

No response

Relevant log output

>	client_d.dll!__report_gsfailure(...) Line 220	C
 	client_d.dll!CLuaWeaponDefs::GetWeaponProperty(lua_State * luaVM) Line 861	C++
 	lua5.1c_d.dll!luaD_precall(lua_State * L, lua_TValue * func, int nresults) Line 340	C
 	lua5.1c_d.dll!luaV_execute(lua_State * L, int nexeccalls) Line 612	C
 	lua5.1c_d.dll!luaD_call(lua_State * L, lua_TValue * func, int nResults) Line 402	C
 	lua5.1c_d.dll!f_call(lua_State * L, void * ud) Line 825	C
 	lua5.1c_d.dll!luaD_rawrunprotected(lua_State * L, void(*)(lua_State *, void *) f, void * ud) Line 127	C
 	lua5.1c_d.dll!luaD_pcall(lua_State * L, void(*)(lua_State *, void *) func, void * u, int old_top, int ef) Line 488	C
 	lua5.1c_d.dll!lua_pcall(lua_State * L, int nargs, int nresults, int errfunc) Line 846	C
 	lua5.1c_d.dll!luaB_pcall(lua_State * L) Line 377	C
 	lua5.1c_d.dll!luaD_precall(lua_State * L, lua_TValue * func, int nresults) Line 340	C
 	lua5.1c_d.dll!luaV_execute(lua_State * L, int nexeccalls) Line 591	C
 	lua5.1c_d.dll!luaD_call(lua_State * L, lua_TValue * func, int nResults) Line 402	C
 	lua5.1c_d.dll!f_call(lua_State * L, void * ud) Line 825	C
 	lua5.1c_d.dll!luaD_rawrunprotected(lua_State * L, void(*)(lua_State *, void *) f, void * ud) Line 127	C
 	lua5.1c_d.dll!luaD_pcall(lua_State * L, void(*)(lua_State *, void *) func, void * u, int old_top, int ef) Line 488	C
 	lua5.1c_d.dll!lua_pcall(lua_State * L, int nargs, int nresults, int errfunc) Line 846	C
 	client_d.dll!CLuaMain::PCall(lua_State * L, int nargs, int nresults, int errfunc) Line 525	C++
 	client_d.dll!CLuaArguments::Call(CLuaMain * pLuaMain, const CLuaFunctionRef & iLuaFunction, CLuaArguments * returnValues) Line 218	C++
 	client_d.dll!CMapEvent::Call(const CLuaArguments & Arguments) Line 40	C++
 	client_d.dll!CMapEventManager::Call(const char * szName, const CLuaArguments & Arguments, CClientEntity * pSource, CClientEntity * pThis) Line 241	C++
 	client_d.dll!CClientEntity::CallParentEvent(const char * szName, const CLuaArguments & Arguments, CClientEntity * pSource) Line 814	C++
 	client_d.dll!CClientEntity::CallEvent(const char * szName, const CLuaArguments & Arguments, bool bCallOnChildren) Line 758	C++
 	client_d.dll!CPacketHandler::Packet_LuaEvent(NetBitStreamInterface & bitStream) Line 5034	C++
 	client_d.dll!CPacketHandler::ProcessPacket(unsigned char ucPacketID, NetBitStreamInterface & bitStream) Line 179	C++
 	client_d.dll!CClientGame::StaticProcessPacket(unsigned char ucPacketID, NetBitStreamInterface & bitStream) Line 5256	C++
 	netc_d.dll!71f7d1ef()	Unknown
 	[Frames below may be incorrect and/or missing, no symbols loaded for netc_d.dll]	
 	netc_d.dll!71f7c061()	Unknown
 	client_d.dll!CClientGame::DoPulses2(bool bCalledFromIdle) Line 1529	C++
 	client_d.dll!CClientGame::DoPulses() Line 1209	C++
 	client_d.dll!CClientGame::DoPulsePostFrame() Line 1109	C++
 	client_d.dll!CClient::PostFrameExecutionHandler() Line 219	C++
 	core_d.dll!CModManager::DoPulsePostFrame() Line 277	C++
 	core_d.dll!CCore::DoPostFramePulse() Line 1314	C++
 	core_d.dll!CDirect3DEvents9::OnPresent(IDirect3DDevice9 * pDevice) Line 136	C++
 	core_d.dll!CProxyDirect3DDevice9::Present(const tagRECT * pSourceRect, const tagRECT * pDestRect, HWND__ * hDestWindowOverride, const _RGNDATA * pDirtyRegion) Line 343	C++
 	gta_sa.exe!007f9b12()	Unknown
 	gta_sa.exe!007fb1c3()	Unknown
 	gta_sa.exe!007ee388()	Unknown
 	gta_sa.exe!0074526a()	Unknown
 	gta_sa.exe!0053ec06()	Unknown
 	multiplayer_sa_d.dll!HOOK_CallIdle() Line 61	C++
 	kernel32.dll!75af5d49()	Unknown
 	ntdll.dll!77c2cdeb()	Unknown
 	ntdll.dll!77c2cd71()	Unknown

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@Nico8340 Nico8340 added the bug Something isn't working label Mar 6, 2025
@Nico8340
Copy link
Contributor Author

Nico8340 commented Mar 6, 2025

@FileEX

@FileEX
Copy link
Contributor

FileEX commented Mar 6, 2025

For me crash is at 0x5A8C8DC2

The crash shouldn't be related to #4076 because no function from CWeaponSA is being called, and moreover, weapon properties are handled by the CWeaponStat class, which I haven't modified.
Image

The crash occurs after the CLuaWeaponDefs::GetWeaponProperty function is called and the result is returned to Lua
Image

So the crash indicates a stack buffer overflow

Edit: The crash also occurs with getOriginalWeaponProperty, regardless of the property being read

@FileEX
Copy link
Contributor

FileEX commented Mar 9, 2025

The crash probably is caused by the incorrect behavior of EnumToString/StringToEnum (see #4085)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants