.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
what todo about game dlls who are build in debug mode
Old
  (#1)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default what todo about game dlls who are build in debug mode - 26-01-2004

I'm not sure if anyone here has ever tried to run his bot when the server dll was build in debug mode...but when you do you get tons of errors all the time like 'can't find address <hex>' and 'no export <a server dll function here, mostly entities> printed out in the console. Also the game seems to crash because of this problem. When you build your bot dll in debug mode the game is pretty stable, mostly for about 30 mins. But when you build your bot dll in release mode it will crash after a few secs after you made a bot. When it crashes, its never in my bot code.
Does anyone encouterd this and have a solution ???
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

I know at least why it says "can't find proc XXXXXXX". It's because the game DLL doesn't implement the single player features (save/load) and single player specific classes. It should not disrupt multiplayer gaming though, and if you hook FunctionFromName and NameForFunction and build your own exports array like botman does in his HPB_bot (or like I do with the RACC template - see the LoadSymbols() function) this error should vanish away.

I'm not sure this has something to do with your crashes, though...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#3)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

If your code runs fine with a debug build but crashes with a non-debug build this is almost certainly caused by using some variable or memory that has not been initialized.

The debug builds zeros out ALL variables, the release builds do not do this.

It doesn't have to crash in your code either. You can be sending in some initialized struct, variable or memory into a Hl/ game function causing IT to crash.

Last edited by Austin; 27-01-2004 at 07:27..
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

Quote:
Originally Posted by Austin
The debug builds zeros out ALL variables, the release builds do not do this.
Hey, I learn something new everyday



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#5)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

Quote:
Originally Posted by Austin
If your code runs fine with a debug build but crashes with a non-debug build this is almost certainly caused by using some variable or memory that has not been initialized.

The debug builds zeros out ALL variables, the release builds do not do this.

It doesn't have to crash in your code either. You can be sending in some initialized struct, variable or memory into a Hl/ game function causing IT to crash.
hey I didn't knew that, thanx
Gonna check this out. And its prolly my code....when I disbled some stuff it didn't crash 9_9. Anyways thanx for the replies.
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#6)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

weee fixed the crash bug in release mode
I had a simple mistake like this:
Code:
char *ARandomStringTable =
{
   "hello", "how","are","you","doing",
   // terminator
   ""
};

//...
while(ARandomStringTable)
//....
As Austin said this will work in debug mode because everything gets initialized, so the loop will eventually stop. But it won't stop in release mode ofcourse, so I added an FStrEq to check if its an empty string
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

You could do that:
Code:
char *ARandomStringTable = 
{ 
"hello", "how","are","you","doing", 
// terminator 
"\0" 
};
I think it would work

*edit* well, provided you don't forget to do "while (*ARandomStringTable)" instead too.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 27-01-2004 at 19:51..
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#8)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

hmm..nope you need 0 instead of "\0"
  
Reply With Quote
Re: what todo about game dlls who are build in debug mode
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: what todo about game dlls who are build in debug mode - 27-01-2004

lol, saw that, I edited my post but you replied in the meanwhile



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com