IPB

Welcome Guest ( Log In | Register )

> Properly compiling RCBot2
Lambda
post Sep 28 2009, 11:36 AM
Post #1


Member
**

Group: Members
Posts: 11
Joined: 28-September 09
Member No.: 1,700



I've been trying to recompile RCBot2 from the SVN since my servers crashes after 10 minutes with bots, I've checked the minidump and it crash at a random location of the RCBot dll so recompiling it should give me a new dll and a pdb so it will be easy to fix.

The problem is, i've recompiled the project under VS2008 (only in release, i cant get around the linker errors in the debug version), but when i load the DLL in the srcds (i'm using dedicated server) the server just hangs and crashes in about 20 seconds after the total hang and i have no idea why is this happening.

Im using the same OBSDK as i use for my metamod plugins which works fine (The one reverse engineered from allied modders), so it shouldnt be a SDK problem.

Is this a problem related with VC2008? have anyone managed to properly compile RCBot2 under VS2008 or should i use 2005 instead?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
bir3yk
post Sep 28 2009, 11:55 AM
Post #2


RCBot Fan
****

Group: Members
Posts: 107
Joined: 4-June 09
Member No.: 1,566



Read this, changes must be done in the SDK, well, and should compile release.

http://rcbot.bots-united.com/forums/index.php?showtopic=1291
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lambda
post Sep 28 2009, 05:56 PM
Post #3


Member
**

Group: Members
Posts: 11
Joined: 28-September 09
Member No.: 1,700



QUOTE(bir3yk @ Sep 28 2009, 11:55 AM) *

Read this, changes must be done in the SDK, well, and should compile release.

http://rcbot.bots-united.com/forums/index.php?showtopic=1291


Yeah, im aware about those changes, that's not the problem, the problem seems to be the VS2008, i've compiled it with 2005 and works like a charm.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Sep 29 2009, 12:20 AM
Post #4


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Lambda @ Sep 28 2009, 06:56 PM) *

Yeah, im aware about those changes, that's not the problem, the problem seems to be the VS2008, i've compiled it with 2005 and works like a charm.

there must be a linker problem in the release, in terms of version, are u using the latest steam source as the base SDK for rcbot2 ? (With the above addition of course). I'd try to sort out the linker problems in debug, if it doesn't work in debug, it won't work in release.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lambda
post Sep 29 2009, 01:58 AM
Post #5


Member
**

Group: Members
Posts: 11
Joined: 28-September 09
Member No.: 1,700



QUOTE(Cheeseh @ Sep 29 2009, 12:20 AM) *

there must be a linker problem in the release, in terms of version, are u using the latest steam source as the base SDK for rcbot2 ? (With the above addition of course). I'd try to sort out the linker problems in debug, if it doesn't work in debug, it won't work in release.


No, im using the Allied Modders reverse engineered SDK (which haves the fixes of the SendProp class) and works fine under VS2005 but not in VS2008

Also, im intensively using RCBot2 in one of my servers and it have crashed sometimes, it crash at CClassInterface :: getTF2Class in the pointer dereferencing, so i've made a safer version of it, you can add it to the SVN if you want.

CODE
int CClassInterface :: getTF2Class ( edict_t *edict )
{
    IPlayerInfo* pPlayerInfo = playerinfomanager->GetPlayerInfo( edict );

    if( pPlayerInfo )
        return pPlayerInfo->GetTeamIndex();

    return 0;
}


EDIT: Another crash happened, this time is a integer division by 0

it happens here.

CODE
bool CBot::wantToFollowEnemy ()
{
    return ((m_pPlayerInfo->GetHealth()/m_pPlayerInfo->GetMaxHealth())>0.5);
}


Im not sure to how to fix this one since i dont know what are the repercussions of this function if i make a "hard fix"

Call Stack.

QUOTE
HPB_bot2.dll!CBot::wantToFollowEnemy() Line 1693 + 0x1d bytes C++
HPB_bot2.dll!CBotTF2::getTasks(unsigned int iIgnore=0) Line 1701 + 0x9 bytes C++
HPB_bot2.dll!CBot::think() Line 536 C++
HPB_bot2.dll!CBots::botThink() Line 2042 + 0x5 bytes C++
HPB_bot2.dll!CRCBotPlugin::GameFrame(bool simulating=) Line 393 C++


QUOTE
Unhandled exception at 0x0ec83dc0 (HPB_bot2.dll) in Steam__273447__2009_9_29T2_38_57C1380796.mdmp: 0xC0000094: Integer division by zero.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st July 2025 - 11:02 PM