|
AlliedModders Donor
|
08-19-2017
, 07:17
Re: New CSGO update broke my server
|
#279
|
Quote:
Originally Posted by Kailo
My Hide'n'Seek Crash with this log: 3V55-FMBC-W3WY
Comparing IDA of dll and last so with symbols i find this names
Code:
0 server.dll + 0x1b3c2e
1 server.dll + 0x1b2c2f // CBaseCombatWeapon::CreateWeaponWorldModel
2 server.dll + 0x1b35b6 // CBaseCombatWeapon::Spawn
3 server.dll + 0x4a7d1e // CWeaponCSBase::Spawn
4 server.dll + 0x38075b // DispatchSpawn
5 server.dll + 0x53220b // CServerTools::DispatchSpawn
6 sdktools.ext.2.csgo.dll!DispatchSpawn [vnatives.cpp:977 + 0xc]
7 sourcepawn.jit.x86.dll!sp::Environment::Invoke(sp::PluginRuntime *,sp::CompiledFunction *,int *) [environment.cpp:235 + 0x15]
8 sourcepawn.jit.x86.dll!sp::PluginContext::Invoke(unsigned int,int const *,unsigned int,int *) [plugin-context.cpp:476 + 0x13]
9 sourcepawn.jit.x86.dll!sp::ScriptedInvoker::Invoke(int *) [scripted-invoker.cpp:296 + 0x1c]
10 sourcepawn.jit.x86.dll!sp::ScriptedInvoker::Execute(int *) [scripted-invoker.cpp:190 + 0x13]
11 sourcemod.logic.dll!CForward::Execute(int *,SourceMod::IForwardFilter *) [ForwardSys.cpp:306 + 0xe]
12 sourcemod.2.csgo.dll!PlayerManager::OnServerActivate(edict_t *,int,int) [PlayerManager.cpp:319 + 0xc]
13 sourcemod.2.csgo.dll!__SourceHook_FHCls_IServerGameDLLServerActivate0::Func(edict_t *,int,int) [PlayerManager.cpp:83 + 0xe3]
But last 1 not point to 0. At +0x1b2c2f calling of sub_101B27B0 (CBaseWeaponWorldModel::SetOwningWeapon) but, +0x1b3c2e inside sub_101B3BF0.
Is this CS:GO fault?
Plugin code where crash happen:
PHP Code:
public void OnMapStart()
{
...
if (!g_iaGrenadeOffsets[0]) {
int end = sizeof(g_saGrenadeWeaponNames);
for (int i=0; i<end; i++) {
int entindex = CreateEntityByName(g_saGrenadeWeaponNames[i]);
DispatchSpawn(entindex); // Here
g_iaGrenadeOffsets[i] = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType");
AcceptEntityInput(entindex, "Kill");
}
}
...
}
|
I've managed to fix this crash by removing the code you quoted from OnMapStart() and adding this
PHP Code:
if(!g_iaGrenadeOffsets[0]) {
int end = sizeof(g_saGrenadeWeaponNames);
for (int i=0; i<end; i++) {
int entindex = GivePlayerItem(iClient, g_saGrenadeWeaponNames[i]);
g_iaGrenadeOffsets[i] = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType");
AcceptEntityInput(entindex, "Kill");
}
}
to line 1242 (inside OnPlayerSpawn) and it seems to be working. It's not a very nice way of doing it, but it seems creating a weapon entity after the update causes an instant crash (going ent_create weapon_flashbang for example).
Full OnPlayerSpawn
Spoiler
PHP Code:
public void OnPlayerSpawn(Event hEvent, const char[] sName, bool bDontBroadcast)
{
if(!g_bEnabled)
return;
int iId = hEvent.GetInt("userid");
int iClient = GetClientOfUserId(iId);
int iTeam = GetClientTeam(iClient);
//crash fix
if(!g_iaGrenadeOffsets[0]) {
int end = sizeof(g_saGrenadeWeaponNames);
for (int i=0; i<end; i++) {
int entindex = GivePlayerItem(iClient, g_saGrenadeWeaponNames[i]);
g_iaGrenadeOffsets[i] = GetEntProp(entindex, Prop_Send, "m_iPrimaryAmmoType");
AcceptEntityInput(entindex, "Kill");
}
}
if(g_bRespawnMode) {
if(iTeam == CS_TEAM_T)
MakeClientInvisible(iClient, g_fInvisibilityDuration);
}
if(iTeam == CS_TEAM_CT) {
// Respawn Protection
g_baRespawnProtection[iClient] = true;
}
g_baAvailableToSwap[iClient] = false;
g_baDiedBecauseRespawning[iClient] = false;
CreateTimer(0.1, OnPlayerSpawnDelay, iId);
CreateTimer(0.0, RemoveRadar, iClient);
if(g_haSpawnGenerateTimer[iClient] != null) {
KillTimer(g_haSpawnGenerateTimer[iClient]);
g_haSpawnGenerateTimer[iClient] = null;
}
if(!g_bEnoughRespawnPoints || !g_bLoadedSpawnPoints)
g_haSpawnGenerateTimer[iClient] = CreateTimer(5.0, GenerateRandomSpawns, iClient, TIMER_REPEAT);
return;
}
__________________
|
|
|
|