Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ Source _ Bizzare Event Error

Posted by: JRob Sep 13 2015, 05:33 AM

I moved rcbot to a real server after I was done developing on it. However a new crash started to appear on the real server. Both are Linux so I don't know what's wrong.

It seems that a bad event object is being sent to FireGameEvent.

Here is the stack trace.

pure virtual method called
terminate called without an active exception
#5 0xf766dcb8 in std::terminate () at /valve/build/targets/src/gcc-4.6.1/libstdc++-v3/libsupc++/eh_terminate.cc:50
#6 0xf766e6f3 in __cxxabiv1::__cxa_pure_virtual () at /valve/build/targets/src/gcc-4.6.1/libstdc++-v3/libsupc++/pure.cc:50
#7 0xe7f194c6 in CGameEventInterface2::getName (this=0xe54ae870) at bot_event.h:753
#8 0xe7f180d5 in CBotEvents::executeEvent (pEvent=0xd2ee1760, iType=TYPE_IGAMEEVENT) at bot_events.cpp:1314
#9 0xe7f5e442 in RCBotPluginMeta::FireGameEvent (this=0xe802aaec <g_RCBotPluginMeta>, pevent=0xd2ee1760, bDontBroadcast=false) at bot_plugin_meta.cpp:983
#10 0xe7f64c12 in fastdelegate::FastDelegate2<IGameEvent*, bool, bool>::operator() (this=0xead3b6a4, p1=0xd2ee1760, p2=false) at ../sdk/mmsource/core/sourcehook/FastDelegate.h:1079
#11 0xe7f62ae9 in __SourceHook_FHCls_IGameEventManager2FireEvent0::CMyDelegateImpl::Call (this=0xead3b6a0, p1=0xd2ee1760, p2=false) at bot_plugin_meta.cpp:73

I logged the address of the event and the GetName address. As you can see here the GetName address remains the same up until the crash.

CBotGlobals::botMessage(NULL, 0, "Event %x %x %i", pevent, *((*(int**)pevent) + 4), bDontBroadcast);

[RCBot] Event d2ee1780 f5866fa0 1
[RCBot] Event d2ee1760 f5866fa0 1
[RCBot] Event d2d4a7d0 f5866fa0 1
[RCBot] Event d2d4a7d0 f5866fa0 1
[RCBot] Event d2d4a8d0 f5866fa0 0
[RCBot] Event ead38040 f5866fa0 0
[RCBot] Event d2d4a8d0 f5866fa0 0
[RCBot] Event d2ee1760 f766e6cc 0
crash here

Anyone know what the cause might be? I've resorted to saving the first GetName address seen, and ignoring any events that don't have the same address and so far it is working.