View Single Post
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-11-2010 , 22:37   Re: Upgrading to OB and MMS 1.8.3 causing Linux only crash on FireEvent
Reply With Quote #5

This is really starting to get on my nerves now... For testing purposes I'm only listening to one event in my main class due to the info in my previous comments just to be sure to be sure. Now my stack trace is cleaner but it's still throwing a big phat error in the pre hook and no log is being created so I'm not sure what's happening exactly.

This is only happening on linux and not windows o.O

PHP Code:
SH_DECL_HOOK2IGameEventManager2FireEventSH_NOATTRIB0boolIGameEvent *, bool );

/* ... */

bool Load(...)
{
    
SH_ADD_HOOK(IGameEventManager2FireEventm_GameEventManagerSH_MEMBER( &g_ZombiePlugin, &ZombiePlugin::FireEvent ), false );
}

/* ... */

bool ZombiePlugin::FireEventIGameEvent *eventbool bDontBroadcast )
{    
    if ( 
event && event->GetName() && zombie_teams.GetBool() && FStrEqevent->GetName(), "player_team" ) )
    {
        
int newTeam event->GetInt"team" );
        
bool bDisconnecting event->GetBool"disconnect" );
        
META_LOGg_PLAPI"Team: [%i] Disconnect: [%s]"newTeam, ( bDisconnecting "Yes" "No" )  );
        if ( !
bDisconnecting && ( newTeam == COUNTERTERRORISTS || newTeam == TERRORISTS ) )
        {
            
RETURN_META_VALUEMRES_SUPERCEDEtrue );
        }
    }
    
    
RETURN_META_VALUEMRES_IGNOREDtrue );
}


/* ... */


bool Unload (...)
{
    
SH_REMOVE_HOOK(IGameEventManager2FireEventm_GameEventManagerSH_MEMBER( &g_ZombiePlugin, &ZombiePlugin::FireEvent ), false );

The stack trace shows it calling my function and then entering the unknown without any reference, any help or guidance at all would be very appreciated as I'm going out of my mind at this stage!

Code:
#0  0x0889abec in ?? ()
#1  0x0338975c in ZombiePlugin::FireEvent (this=0x341b8a0, event=0xa68f550,
    bDontBroadcast=false) at ZombiePlugin.cpp:421
#2  0x033b2908 in fastdelegate::FastDelegate2<IGameEvent*, bool, bool>::operator() (this=0x868a7f4, p1=0xa68f550, p2=false)
    at /cygdrive/c/code/c/mmsource-1-8-9c2b1e877e16/core/sourcehook/FastDelegate.h:1079
#3  0x033b286f in __SourceHook_FHCls_IGameEventManager2FireEvent0::CMyDelegateImpl::Call (this=0x868a7f0, p1=0xa68f550, p2=false) at meta_hooks.h:29
#4  0x035d7e54 in __SourceHook_FHCls_IGameEventManager2FireEvent0::Func(IGameEvent*, bool) ()
   from /WazzGame/27015/orangebox/cstrike/addons/sourcemod/bin/sourcemod.2.ep2v.so
#5  0x0111ae95 in CGameClient::Connect(char const*, int, INetChannel*, bool) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#6  0x01027b50 in CBaseServer::CreateFakeClient(char const*) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#7  0x0115f9cf in CVEngineServer::CreateFakeClient(char const*) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#8  0x027552de in CCSBot* CreateBot<CCSBot>(BotProfile const*, int) ()
   from /WazzGame/27015/orangebox/cstrike/bin/server.so
#9  0x0274d569 in CCSBotManager::BotAddCommand(int, bool, char const*, CSWeaponType, BotDifficultyType) () from /WazzGame/27015/orangebox/cstrike/bin/server.so
#10 0x0275075c in CCSBotManager::MaintainBotQuota() ()
   from /WazzGame/27015/orangebox/cstrike/bin/server.so
#11 0x02750cc9 in CCSBotManager::StartFrame() ()
   from /WazzGame/27015/orangebox/cstrike/bin/server.so
#12 0x0242c00c in CCSGameRules::EndGameFrame() ()
   from /WazzGame/27015/orangebox/cstrike/bin/server.so
#13 0x0285c8e2 in CServerGameDLL::GameFrame(bool) ()
   from /WazzGame/27015/orangebox/cstrike/bin/server.so
#14 0x0357b90f in __SourceHook_FHCls_IServerGameDLLGameFramefalse::Func(bool)
    ()
   from /WazzGame/27015/orangebox/cstrike/addons/sourcemod/bin/sourcemod.2.ep2v.so
#15 0x01141c59 in CServerPlugin::GameFrame(bool) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#16 0x01131976 in SV_Think(bool) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#17 0x0113362a in SV_Frame(bool) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#18 0x0109bf8a in _Host_RunFrame_Server(bool) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#19 0x0109cc90 in _Host_RunFrame(float) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#20 0x010a588c in CHostState::State_Run(float) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#21 0x010a6337 in CHostState::FrameUpdate(float) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#22 0x010a648d in HostState_Frame(float) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#23 0x01157956 in CEngine::Frame() ()
   from /WazzGame/27015/orangebox/bin/engine.so
#24 0x0115454b in CDedicatedServerAPI::RunFrame() ()
   from /WazzGame/27015/orangebox/bin/engine.so
#25 0x00b75e20 in RunServer() () from ./bin/dedicated.so
#26 0x00b75bb9 in CDedicatedExports::RunServer() () from ./bin/dedicated.so
#27 0x01154ffb in CModAppSystemGroup::Main() ()
   from /WazzGame/27015/orangebox/bin/engine.so
#28 0x0116d9e5 in CAppSystemGroup::Run() ()
   from /WazzGame/27015/orangebox/bin/engine.so
#29 0x01155389 in CDedicatedServerAPI::ModInit(ModInfo_t&) ()
   from /WazzGame/27015/orangebox/bin/engine.so
#30 0x00b760ce in CDedicatedAppSystemGroup::Main() () from ./bin/dedicated.so
#31 0x00b79675 in CAppSystemGroup::Run() () from ./bin/dedicated.so
#32 0x00b7b0b7 in CSteamApplication::Main() () from ./bin/dedicated.so
#33 0x00b79675 in CAppSystemGroup::Run() () from ./bin/dedicated.so
#34 0x00b76449 in main () from ./bin/dedicated.so
#35 0x00b773ae in DedicatedMain () from ./bin/dedicated.so
I'm just about ready to allow the changeteam log go ahead or write a hack at this stage.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3