View Single Post
Domino_
AlliedModders Donor
Join Date: Jul 2016
Old 08-19-2017 , 07:17   Re: New CSGO update broke my server
Reply With Quote #279

Quote:
Originally Posted by Kailo View Post
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=0i<endi++) {
            
int entindex CreateEntityByName(g_saGrenadeWeaponNames[i]);
            
DispatchSpawn(entindex); // Here
            
g_iaGrenadeOffsets[i] = GetEntProp(entindexProp_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=0i<endi++) {
        
int entindex GivePlayerItem(iClientg_saGrenadeWeaponNames[i]);
        
g_iaGrenadeOffsets[i] = GetEntProp(entindexProp_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
__________________
Domino_ is offline