PDA

View Full Version : 4.0 template crash at cs 1.6


koraX
25-01-2005, 16:16
Well I downloaded HPB_bot template 4.0, compiled and it worked in cs 1.5. This same dll crashes in cs 1.6

CS crash when I try to "addbot" new bot.

Further investigation revealed that :
newest racc works both in cs 1.5 and 1.6
HPB_bot 4.0 works both in cs 1.5 and 1.6
however these 2 bots are under metamod.

So anyb knows where is the bug in HPB_bot template 4.0 which causes cs 1.6 to crash when trying to add a bot ?

Pierre-Marie Baty
25-01-2005, 18:01
I know I will sound like an ass, but I have little time here (and other priorities)... would you mind debugging this one yourself ? :D

koraX
25-01-2005, 20:58
I know I will sound like an ass, but I have little time here (and other priorities)... would you mind debugging this one yourself ? :D
It's OK :) I had this problem for month and I debugged it. However crash was not caused by bots code. It created bot and returned succesfully, and then HL crashed. So it was probably some wrong return value/setting that caused hl engine to crash. I'll debug it again, but my hopes are low

EDIT : So I set breakpoint in dll.cpp in ClientCommand function on "BotCreate( pEntity, arg1, arg2, arg3, arg4 );" calling. after I invoked addbot command in game, program paused and I debugged ClientCommand function without any error and after It exited ClientCommand function it went back to disassembly, 'cause execution was back in Half-life engine. and right after I resumed execution, oh-so-helpful Unhandled exception on address 0xC0...5. Acces violation reading memory ...
I hope there are some advanced debugging stuff I do not know and there is way to debug this error...

Question is, what was changed from cs 1.5 to cs 1.6 ? Maybe that way I can find what is missing in the bot...

dub
25-01-2005, 21:43
korax i just downloaded the hpb template 4 & tested it, and i dont seem to have the crash. Maybe you changed something & forgot about it.

edit.
.NET might be compiling something wrong ???:(

koraX
25-01-2005, 22:48
korax i just downloaded the hpb template 4 & tested it, and i dont seem to have the crash. Maybe you changed something & forgot about it.

edit.
.NET might be compiling something wrong ???:(

I haven't changed anything. I downloaded source code, unpacked, compiled and tested it :)

And I started all this because my own bot does the same. Maybe it is time to switch to metamod :)

Pierre-Marie Baty
26-01-2005, 00:49
hmmm... thinking about something here

Try adding FREE_PRIVATE() in BotCreate() ?
check the RACC source code to know where and how...

koraX
26-01-2005, 09:05
well I fixed it. Problem was not in bot, but in cs. Thank you for your concern and have some LED fun (http://crcw.mb.ca/php3/ledsign/ledsign.php)

Pierre-Marie Baty
26-01-2005, 22:33
What was it ?