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
Lambda
post Oct 1 2009, 01:05 PM
Post #2


Member
**

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



getTF2Class happened, information.

Line:

CODE
return *(int *)((char *)pEntity + offset);


Call Stack:

CODE
HPB_bot2.dll!CClassInterface::getTF2Class(edict_t * edict=0x100f5290)  Line 977 + 0x9 bytes    C++
    HPB_bot2.dll!CBotFortress::wantToFollowEnemy()  Line 1490 + 0xf bytes    C++
    HPB_bot2.dll!CBotTF2::getTasks(unsigned int iIgnore=0)  Line 1705 + 0xf bytes    C++
    HPB_bot2.dll!CBot::think()  Line 533 + 0x14 bytes    C++
    HPB_bot2.dll!CBots::botThink()  Line 2046    C++
    HPB_bot2.dll!CRCBotPlugin::GameFrame(bool simulating=true)  Line 393    C++
    engine.dll!0badd91e()     


Local Variables:

CODE
    offset    0    unsigned int
        pEntity    0x1e35e008    CBaseEntity *
+        pUnknown    0x1e35e008    IServerUnknown *


I have 2 servers running, one on dustbowl and the other on badwater, the badwater one has been running for 10+ hours without a crash, the dustbowl crash every 4-5 hours, both servers with 12 bots.

The last time i've checked the dustbowl server was 2 humans playing on it.

Here you have the DLL + PDB + Crash dump so you can check it for yourself.

http://rapidshare.com/files/287341724/bin.rar.html
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 1 2009, 09:09 PM
Post #3


Admin
*****

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



okay, make the following change,

CODE

bool CBotFortress :: wantToFollowEnemy ()
{
    IPlayerInfo *p;

    if ( !m_pLastEnemy )
        return false;
    if ( hasFlag() )
        return false;
    if ( getClass() == TF_CLASS_SCOUT )
        return false;
    if ( (m_iClass == TF_CLASS_SPY) && isDisguised() ) // sneak around the enemy
        return true;

    // incase enemy was a sentry gun, do a check here, make sure it is a player
    p = playerinfomanager->GetPlayerInfo(m_pLastEnemy);
    
    if ( p && p->IsPlayer() && (CClassInterface::getTF2Class(m_pLastEnemy) == TF_CLASS_SPY) && (thinkSpyIsEnemy(m_pLastEnemy)) )
        return true; // always find spies!
    
    return CBot::wantToFollowEnemy();
}


might explain why there are more crashes when there are engies playing, (I've also updated the SVN)
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 - 10:41 PM