Junior Member
|
02-20-2012
, 11:36
Re: [L4D,L4D2,TF2] BuiltinVotes 0.5.1 (2012-01-19)
|
#120
|
Quote:
Originally Posted by Powerlord
I have no idea how the pointer could be valid there but the object isn't. InternalReset() kills the pointer whenever the vote is ended. The *only* reason I can think of that this might happen is that the plugin is disposing of the vote handle without it ending.
Now that AlliedModders is back up, I can finally post the builds I created before it went down.
Here's 0.5.5, with a few minor changes. Basically, instead of calling Cancel directly, it now calls the CancelVoting function that already exists, which *may* fix the problem if the vote was actually canceled before the map change. Also, I rolled back the DecrementPlayerCount change from 0.5.4 until I can study the problem in more detail.
I normally don't create Debug builds unless people ask because of how large the Linux Debug builds are.
|
Changing map during vote no longer seems to crash but I found another valid pointer, invalid object instance - happens after starting and stopping a vote repeately, every few seconds.
Code:
Program received signal SIGSEGV, Segmentation fault.
0xebeb48c7 in CBuiltinVoteHandler::DoAction (this=0xeb25f90, vote=0xcb2fda8, action=BuiltinVoteAction_Cancel, param1=0, param2=0, def_res=0) at natives.cpp:139
139 m_pBasic->PushCell(vote->GetHandle());
(gdb) bt
#0 0xebeb48c7 in CBuiltinVoteHandler::DoAction (this=0xeb25f90, vote=0xcb2fda8, action=BuiltinVoteAction_Cancel, param1=0, param2=0, def_res=0) at natives.cpp:139
#1 0xebeb48a5 in CBuiltinVoteHandler::OnVoteCancel (this=0xeb25f90, vote=0xcb2fda8, reason=SourceMod::BuiltinVoteFail_Generic) at natives.cpp:133
#2 0xebeb1b87 in BuiltinVoteHandler::EndVoting (this=0xebed1240) at BuiltinVoteHandler.cpp:457
#3 0xebeb277e in BuiltinVoteHandler::OnTimer (this=0xebed1240, pTimer=0x92779a0, pData=0x0) at BuiltinVoteHandler.cpp:746
#4 0xee7eb7eb in TimerSystem::RunFrame() () from /data/home/nowak/tf2mesh/orangebox/tf/addons/sourcemod/bin/sourcemod.2.ep2v.so
#5 0xee7eba63 in TimerSystem::GameFrame(bool) () from /data/home/nowak/tf2mesh/orangebox/tf/addons/sourcemod/bin/sourcemod.2.ep2v.so
#6 0xee7d2179 in __SourceHook_FHCls_IServerGameDLLGameFramefalse::Func(bool) () from /data/home/nowak/tf2mesh/orangebox/tf/addons/sourcemod/bin/sourcemod.2.ep2v.so
#7 0xf6c84bac in CServerPlugin::GameFrame(bool) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#8 0xf6c7f890 in SV_Think(bool) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#9 0xf6c80aa0 in SV_Frame(bool) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#10 0xf6bd7dac in _Host_RunFrame_Server(bool) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#11 0xf6bd8b2a in _Host_RunFrame(float) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#12 0xf6bd946f in Host_RunFrame(float) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#13 0xf6be4c32 in CHostState::FrameUpdate(float) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#14 0xf6be4f78 in HostState_Frame(float) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#15 0xf6c9c580 in CEngine::Frame() () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#16 0xf6c9853a in CDedicatedServerAPI::RunFrame() () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#17 0xf705419e in ?? ()
#18 0xf7053ea8 in ?? ()
#19 0xf6c98e36 in CModAppSystemGroup::Main() () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#20 0xf6cb4128 in CAppSystemGroup::Run() () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#21 0xf6c99c3a in CDedicatedServerAPI::ModInit(ModInfo_t&) () from /data/home/nowak/tf2mesh/orangebox/bin/engine.so
#22 0xf7054376 in ?? ()
#23 0xf7057ea8 in ?? ()
#24 0xf7059b8c in ?? ()
#25 0xf7057ea8 in ?? ()
#26 0xf70547dd in ?? ()
#27 0xf7055cc5 in ?? ()
#28 0x080488ad in main ()
(gdb) print vote->GetHandle()
Cannot access memory at address 0x22d1054
(gdb) print vote
$1 = (class SourceMod::IBaseBuiltinVote *) 0xcb2fda8
(gdb) print *vote
$2 = {_vptr.IBaseBuiltinVote = 0x22d1008}
(gdb) x 0x22d1008
0x22d1008: Cannot access memory at address 0x22d1008
(gdb) print *this
$3 = {<SourceMod::IBuiltinVoteHandler> = {_vptr.IBuiltinVoteHandler = 0xebecc788}, m_pBasic = 0xcb487c8, m_Flags = 10, m_pVoteResults = 0xcb4b008, m_fnVoteResult = 5}
(gdb) f 2
#2 0xebeb1b87 in BuiltinVoteHandler::EndVoting (this=0xebed1240) at BuiltinVoteHandler.cpp:457
457 handler->OnVoteCancel(vote, BuiltinVoteFail_Generic);
(gdb) print *this
$6 = {<SourceMod::IBuiltinVoteHandler> = {_vptr.IBuiltinVoteHandler = 0xebecba68}, <SourceMod::IClientListener> = {_vptr.IClientListener = 0xebecba9c}, <SourceMod::ITimedEvent> = {
_vptr.ITimedEvent = 0xebecbad4}, m_pHandler = 0x0, m_Clients = 0, m_TotalClients = 0, m_Items = 0, m_Votes = {m_Data = 0xeb270e8, m_Size = 5, m_CurrentUsedSize = 5}, m_pCurVote = 0x0,
m_bStarted = false, m_bCancelled = false, m_NumVotes = 0, m_VoteTime = 20, m_VoteFlags = 0, m_fStartTime = 20.6549988, m_nVoteTime = 20, m_TimeLeft = 0, m_ClientVotes = {0, -1 <repeats 23 times>, -2, -2,
-2, -2, -2, -2, -2, -2, -2, 0 <repeats 224 times>}, m_Revoting = {false <repeats 257 times>}, m_leaderList = '\000' <repeats 1023 times>, m_displayTimer = 0x0}
Last edited by nowakpl; 02-20-2012 at 11:40.
|
|