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 <j...@maennertechnik.net> wrote: > Hi list, I am facing a nasty bug which unfortunately appears randomly, so > there’s no clear way to reproduce it. The crash occurs when firing a weapon > (where it doesn’t 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. I’m 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