Ok, got new information on this. The steps to the crashes are always the same. Any player gets their weapon holstered without actually performing any action that would holster the weapon. Then it may happen for other players as well to that extent that they cannot switch weapons anymore. Finally somehow the game thinks someone fired a shot, lag compensation kicks in for that shot and checks the current player command which is null in that case. That is, if anyone has any idea on why the weapon may get holstered spontaneously with real player interaction let me know. Also, C_BaseCombatWeapon::SetDormant seems to be calling the Holster(CBaseCombatWeapon) function a lot (dunno what that's good for). The function looks like it should call holster on weapons not carried by the local player (still, doesn't make sense to me), but it is client code. The crashes however are server-side but I thought any piece of information I have may help you help me.
Looking forward to hear from any of you, Jan -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Saul Rennison Gesendet: Sonntag, 5. Juni 2011 18:05 An: Discussion of Half-Life Programming Betreff: *** GMX Spamverdacht *** Re: [hlcoders] Crash during setup of lag compensation I'm not an expert with the actual networking side but does the bug still occur with cl_predict_weapons set to 0? I think that would show that it is indeed a bug with your prediction code, or not. On Sunday, 5 June 2011, Jan Hartung <[email protected]> wrote: > That might be the problem here, yes - although I have yet to see the > function being called twice. I can as well add a check to see whether > m_pCurrentCommand is valid or not and decide not to actually fire a bullet > if it's invalid. Would be a quick solution, but it only masks the real > problem here and I'm not a friend of such hacks ;) > One thing I forgot to mention is that the problem seems to occur only when > the server is quite crowded. Not being an expert in Source networking I > could imagine that roundtrip times/jitter/packet loss are the reason why the > function might get called twice. Since this is no known problem in the > Source engine itself there must be something wrong in our code, like > improperly predicted weapons. > Any other ideas on what may be the bugger here? > > Rgds, > Jan > > -----Ursprüngliche Nachricht----- > Von: [email protected] > [mailto:[email protected]] Im Auftrag von Saul > Rennison > Gesendet: Sonntag, 5. Juni 2011 15:52 > An: Discussion of Half-Life Programming > Betreff: Re: [hlcoders] Crash during setup of lag compensation > > The only thing that I can imagine is happening is the function is > getting called twice somehow. So then it's fine on the first call, > then NULL on the second. > > On Sunday, 5 June 2011, Jan Hartung <[email protected]> wrote: >> Hi list, I am facing a nasty bug which unfortunately appears randomly, so > theres no clear way to reproduce it. The crash occurs when firing a weapon > (where it doesnt matter which weapon it is) in player_lagcompensation.cpp > on line 360, which is: int targettick = cmd->tick_count - lerpTicks; The > problem here is that cmd (the current player command) is null. This is quite > strange as in the stack trace it all starts here: player_command.cpp line > 424 (call to RunPostThink which triggers the gun fire a few steps later in > the stack) To set up lag compensation player->GetCurrentCommand() is used, > which returns m_pCurrentCommand. At this point it is not a null pointer. > Later on in code execution, on line 428 in player_command.cpp there is a > call to FinishCommand( player ) which sets m_pCurrentCommand to null this > being the only server-side line of code setting m_pCurrentCommand to null > except when calling the CBasePlayer constructor. Im kinda stuck here since > I just cannot figure out why m_pCurrentCommand is null when it is accessed > during StartLagCompensation when it is only being set to null several lines > later. Any help or hint on this issue is appreciated. Regards,Jan > > -- > > Thanks, > - Saul > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- Thanks, - Saul _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

