Bugzilla – Bug 3785
Ham_Killed crashes on windows TFC but fine on linux
Last modified: 2013-05-25 17:37:23 PDT
Hi, I'm running TFC with AMXX 1.8.1.3746 on Windows Vista Using Ham_Killed and ExecuteHam or RegisterHam causes the server to die. It works fine on linux so I'm guessing this is a bug? #include <amxmodx> #include <hamsandwich> #include <fakemeta> public plugin_init() { register_plugin("Ham_KilledTest", "watch", "1.0") RegisterHam(Ham_Killed, "player", "PlayerKilled") register_clcmd("lolkill", "Kill") } public PlayerKilled(id, iAttacker, iShouldGib) log_amx("Ham_Killed: %d, %d, %d", id, iAttacker, iShouldGib) public Kill(id) ExecuteHam(Ham_Killed, id, 1, get_pdata_int(id, 1, -1)) // The shouldgib value seems to be the players pdada value at offset 1. when using ExecuteHam(Ham_Killed...) it has to be correct Windows log output: [Ham_KilledTest.amxx] Ham_Killed: 1, -1, 163707508 // Suicide *CRASH* [Ham_KilledTest.amxx] Ham_Killed: 2, 1, 164821620 // Killing another player *CRASH* [Ham_KilledTest.amxx] Ham_Killed: 2, 1, 161872500 // and again *CRASH* Linux log output: [Ham_KilledTest.amxx] Ham_Killed: 1, -1, 1084127716 // Suicide [Ham_KilledTest.amxx] Ham_Killed: 1, -1, 1084127716 // Suicide [Ham_KilledTest.amxx] Ham_Killed: 1, 296, 1084127716 // Killing self with grenade When running on windows listenserver if I comment the RegisterHam(Ham_Killed...) out and run the ExecuteHam(Ham_Killed...) TFC closes with a windows error popup shown below. But if the RegisterHam(Ham_Killed...) forward is active, TFC just hangs. Not sure if this is any good to you: Fault Module Name: hamsandwich_amxx.dll Fault Module Version: 0.0.0.0 Fault Module Timestamp: 48a77980 Exception Offset: 00001d6c Exception Code: c0000409 Exception Data: 00000000 OS Version: 6.0.6001.2.1.0.256.1
I am having the same problem, with the same thing, unfortunately, I dont know how to get the log outputs and its kind of late.. I am using the same function.. that and ham_spawn this works fine on my linux server, but crashes on my windows server I remember when I had amx mod x on my dedicated server at home, it said something about ham sandwich not loading right, but it still loaded but crashed on using the functions. sorry I didnt leave too much info, but I am confirming that this is a bug, right?
So approaching 2013, and ham_killed still crashes TFC(whenever a "player" is killed). Tried hooking CBasePlayer->Killed with orpheu, same problem.
(In reply to comment #2) Had a minor error in orpheu. I can now hook CBasePlayer->Killed fine with orpheu with the function listed in the virtual table index at 14. It is also defined at index 14 in hamdata.ini, so not sure what is wrong.
*** This bug has been marked as a duplicate of bug 5611 ***