![]() |
pfnRunPlayerMove - why it may crash?
I found few custom CS maps podbot mm and epodbot are crashing on them. The crash happens at respawn and only if few bots are spawned in the same (or some short time). I was trying with different spawn points (using CSDM) and I'm getting the same crash. My M$ VC++2005 Express debugger shows me the line in bot.cpp which contains the call for the function g_engfuncs.pfnRunPlayerMove. Because I don't have any cpp with the code of this function in HLSDK (I have only headers .h) I don't know what might causing the crash - and - what I need to check in bot.cpp before calling that function.
Anyone can help with this? |
Re: pfnRunPlayerMove - why it may crash?
First g_engfuncs.pfnRunPlayerMove is a engine function, not SDK... I don't think the crash is in this function, it's not crash even the passed edict pointer is NULL (tested myself).
Can you give one link to one of this maps ? |
Re: pfnRunPlayerMove - why it may crash?
http://www.scoutzknivezworld.com/mod...op=getit&lid=1
http://www.scoutzknivezworld.com/mod...op=getit&lid=5 My M$ Visual C++ 2005 Express showed that line with exactly that function as the cause of the crash. I've got the info from T(+)rget (AMX) - he told me he experienced a lot of crashes without any reason when he was working on his WeaponMod and he was spawning the weapon above the player (still no idea why it was crashing, but he changed the place of spawning weapons). These maps I gave the link have their-own weapons (You can't buy anything there). Maybe it's the same problem, but why these maps don't crash with human-players (>because they don't call pfnRunPlayerMove< :P ) ? |
Re: pfnRunPlayerMove - why it may crash?
1 Attachment(s)
Well, error is not in your code, and 100% not in RunPlayerMove (), problem is in mp.dll. Here the Call Stack Screenshot from the Steam minidump (screenshot from SafeMode since my OS crashes, when i'm openining dumps in normal mode). I've tested this maps with PODBot mm, Nicebot and my bot, and everytime game crashes...
P.S. CS1.3/1.5 working Ok!, Probably error occurs, with partially disabled Official CSBot.... |
Re: pfnRunPlayerMove - why it may crash?
Well - this map crashes with CS1.6 when the bot is loaded as mm plugin. If it's loaded as standalone dll - it doesn't crash with CS1.6. Tested with e[pod]bot once loaded as mm plugin, second time loaded as standalone dll (so - I mean - the same bot code).
Another thing is this - the game crashes perfectly everytime when the bots are spawned together (at round start) and on listenserver (when loaded as mm plugin) - tested with 8-16 bots and it crashes on LS everytime (100%). But the same map, the same bot dll still loaded as mm plugin - on dedicated server it crashes only ocasionally (doesn't happen 100% every round start). Who may say something which might be arbitrary to answer - where the problem really is? I got confused by it...:unsure: |
Re: pfnRunPlayerMove - why it may crash?
I've tested epod too, and it's crashes everytime, doesn't matter loaded as standalone dll or as a metamod plugin.
As i say before, it seems that problem not with bot code. Just as experiment, start server, set developer level 2, and add 16 epods. Game crashed, but last message i saw, was something abouit player_weaponstrip, then i've download BSPEdit, and edit .bsp, and remove this Quote:
|
Re: pfnRunPlayerMove - why it may crash?
Well - How are You finding that player_weapon_strip which is causing the problem? I mean - what do You need to run on Your PC to get such info in Your logs? And how did You find it's exactly that entity You removed - it's that one causing the problem? I mean - if there was more such called entities how did You find it's exactly that one needs to be removed?
I also believe there might be no need to remove that entity at all, but only move it somewhere else (for example a bit down or so). If that weapon is responsible to remove the player's start weapon (glock18 or usp), I don't want to have some player still having such weapon, but everyone else on that map without it. I'm asking, because I don't want to bother You too much with other maps I also have with the same problem (scoutzknivez_winter, aaaaiiiimmmm) and I want to fix these maps to get them working correctly. |
Re: pfnRunPlayerMove - why it may crash?
I'm simply before start listenserver, open console, and set developer 2, than start map. While map loading i switched to VS8 IDE, and attach to cstrike.exe process... (Attach at map load, since cs, crashes, if attaching on process start). Now all contents of consoile are displayed in Output Debugger Window. So when the game crashed, last message that was shown is Found: player_weaponstrip, firing (strip), so i decided that problem is with this entity, also map has only one entity of this class, so there was no problem with selecting right entity to remove :). Also changing this entity origin, does not give any results, game crashes as always. Also there is no different beetwen map with this entity or without this entity, secondary weapons is stripped anyway.
And here's a last lines of output window of debugger i saw: Quote:
|
Re: pfnRunPlayerMove - why it may crash?
Thanks for the info. Did You try if that map still works the same way with CS1.5? I mean about that stripping - maybe old HL needs that entity?
Another thing is this - actually I have 4 maps using that entity. 3 of them are crashing. The map not crashing is he_glass. I have no idea why that one is working (even with 31 bots and me), but the rest (3 of 4) are crashing. What might be wrong with that entity? |
Re: pfnRunPlayerMove - why it may crash?
Clearly a null pointer somewhere.
First-chance exception at 0x00000000 in cstrike.exe: 0xC0000005: Access violation reading location 0x00000000. |
Re: pfnRunPlayerMove - why it may crash?
CS1.5 Working without problems with or without this entity. I have no idea why this sh*t crashing, maybe because pod's trying pickup the entity, but entity already removed from the map, that cause bot to pickup weapon that already has null ptr.
Tested this maps with Official CSBot on CZ, there is not any problems... |
Re: pfnRunPlayerMove - why it may crash?
That pfnRunPlayerMove function crashes also in such situations - If You let Your bot to shoot at some breakable with entity having some v.impulse value > 0, as soon it is shooting at it, the CS crashes in pfnRunPlayerMove. All speeds arguments of bot were as 0, nothing special there, but the game crashes exactly in that function (at least the debugger of MS VC++ 2005 Express shows it). mingw shows the crash in mp.dll (the memory can't be read).
|
Re: pfnRunPlayerMove - why it may crash?
Quote:
Code:
try |
Re: pfnRunPlayerMove - why it may crash?
Ok! Maybe it might help. Found workaround for this bug, add to dll.cpp in DispatchSpawn function.
Code:
else if (strcmp (STRING (pent->v.classname), "player_weaponstrip") == 0) |
Re: pfnRunPlayerMove - why it may crash?
Thanks fo the hint, but is there also some workaround for this what I was elaborating about crash with breakables they have v.impulse > 0? It crashes also in mp dll, but last bot function called before crash is pfnRunPlayerMove.
|
Re: pfnRunPlayerMove - why it may crash?
Ok, please tell me one map with such entities...
Quote:
|
Re: pfnRunPlayerMove - why it may crash?
cs_arabstreets. In the building where terrorists spawn, there are some barrels. They have v.impulse about 60.
|
Re: pfnRunPlayerMove - why it may crash?
Not sure if will help but use pEdict->v.impulse in runplayermove()
I see in to the PODbot_mm sources that you call runplayermove() in this way Code:
g_engfuncs.pfnRunPlayerMove (pEdict, vecMoveAngles, pBot->f_move_speed, pBot->f_sidemove_speed, 0, pEdict->v.button, 0, gpGlobals->frametime * 1000); Code:
g_engfuncs.pfnRunPlayerMove (pEdict, vecMoveAngles, pBot->f_move_speed, pBot->f_sidemove_speed, 0, pEdict->v.button, pEdict->v.impulse, gpGlobals->frametime * 1000); |
Re: pfnRunPlayerMove - why it may crash?
Nothing changed, crash as always :(
|
Re: pfnRunPlayerMove - why it may crash?
Then no very good fix but at last it will work. Check if the edict have impulse > 0 and if yes then ignore it.
From EPB Code:
bool IsShootableBreakable(edict_t * pent) |
Re: pfnRunPlayerMove - why it may crash?
Yeah - I know the check for (v.impulse == 0) - it's original one from podbot code, but I was messing around it and I was trying to understand why it is disabled. I just don't understand the reason of the crash.
|
Re: pfnRunPlayerMove - why it may crash?
You can ask Valve. :P
|
All times are GMT +2. The time now is 04:01. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.