IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> segmentation fault
J@nek
post Aug 25 2009, 08:22 AM
Post #1


Member
**

Group: Members
Posts: 19
Joined: 18-May 09
Member No.: 1,541



Hi,

I have a strange problem with the linux version.

When I start my mod without starting any plug and load the plugin manually by typing plugin_load addons/HPB_Bot2_server_plugin in console comand it is loading plugin fine.

When I start my mod and load plugin automatically using +plugin_load command in .sh start command or using a .vdf file in addons folder, I have a "segmentation fault" error.

I don't understand where I can get the veruy last version of HPB_bot2. I will try this svn thingy once again but the last time I didn't succeed to connect to the repo. Is there a .zip containing the whole latest RCbot2 source file somewhere that I could download ?

J.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bir3yk
post Aug 25 2009, 09:57 AM
Post #2


RCBot Fan
****

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




you load the compiled HPB_bot2 me? It is my normal work. or do you need sources with corrected under linux?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
J@nek
post Aug 25 2009, 11:45 AM
Post #3


Member
**

Group: Members
Posts: 19
Joined: 18-May 09
Member No.: 1,541



QUOTE(bir3yk @ Aug 25 2009, 11:57 AM) *

you load the compiled HPB_bot2 me? It is my normal work. or do you need sources with corrected under linux?

I need sources with corrected under linux as I have to compile it myself due to the fact I added my bot for my mod.

EDIT : also I noticed by testing your version that your plugin is using #define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL006" where mine is using the default one for OB engine which is "ServerGameDLL005".

I will try to recompile my server.so file and HPB_bot2_server_plugin with DLL006 to see if it is working better.

Anyway a link to the whole source package is always a good thing.

J.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bir3yk
post Aug 25 2009, 12:09 PM
Post #4


RCBot Fan
****

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



see what changes I made in the source. where?? experimenting smile.gif


Attached File(s)
Attached File  changes.txt ( 5.51k ) Number of downloads: 89
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Aug 25 2009, 12:44 PM
Post #5


Admin
*****

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



QUOTE(J@nek @ Aug 25 2009, 11:45 AM) *

I need sources with corrected under linux as I have to compile it myself due to the fact I added my bot for my mod.

EDIT : also I noticed by testing your version that your plugin is using #define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL006" where mine is using the default one for OB engine which is "ServerGameDLL005".

I will try to recompile my server.so file and HPB_bot2_server_plugin with DLL006 to see if it is working better.

Anyway a link to the whole source package is always a good thing.

J.

It doesn't matter what INTERFACEVERSION_SERVERGAMEDLL is set to, as long as the call for the server game dll is using "ServerGameDLL006". In the latest SVN it is set to the old interface but uses the new one by explicility using "ServerGameDLL006" when loading the interface. This is because the eiface.h is not affected by SVN changes.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
J@nek
post Aug 25 2009, 12:49 PM
Post #6


Member
**

Group: Members
Posts: 19
Joined: 18-May 09
Member No.: 1,541



Thx for your answers matey.

1) I will update my version using changes.txt <--ty for that
2) My bot has to use the same INTERFACEVERSION_SERVERGAMEDLL that the one I'm using for my mod. Currently it is set to 005 in both sides, so it should work fine if I read what you wrote, but maybe there are side effects that I don't know. So I will change that to DLL006 and see if it is better. I'll test tonight or tomorrow as I'm at my office atm and will keep you informed.

J.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
bir3yk
post Aug 25 2009, 12:56 PM
Post #7


RCBot Fan
****

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



read bot_main.cpp.

CODE
bool CRCBotPlugin::Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory )

{

    extern MTRand_int32 irand;



    ConnectTier1Libraries( &interfaceFactory, 1 );

    ConnectTier2Libraries( &interfaceFactory, 1 );



    LOAD_GAME_SERVER_INTERFACE(playerinfomanager,IPlayerInfoManager,INTERFACEVERSION_PLAYERINFOMANAGER);



    gpGlobals = playerinfomanager->GetGlobalVars();    



    LOAD_INTERFACE(engine,IVEngineServer,INTERFACEVERSION_VENGINESERVER);

    LOAD_INTERFACE(filesystem,IFileSystem,FILESYSTEM_INTERFACE_VERSION);

    LOAD_INTERFACE(helpers,IServerPluginHelpers,INTERFACEVERSION_ISERVERPLUGINHELPERS);

    LOAD_INTERFACE(enginetrace,IEngineTrace,INTERFACEVERSION_ENGINETRACE_SERVER);

    LOAD_GAME_SERVER_INTERFACE(servergameents,IServerGameEnts,INTERFACEVERSION_SERVERGAMEENTS);

    LOAD_GAME_SERVER_INTERFACE(g_pEffects,IEffects,IEFFECTS_INTERFACE_VERSION);

    LOAD_GAME_SERVER_INTERFACE(g_pBotManager,IBotManager,INTERFACEVERSION_PLAYERBOTMANAGER);



#ifndef __linux__

    LOAD_INTERFACE(debugoverlay,IVDebugOverlay,VDEBUG_OVERLAY_INTERFACE_VERSION);

#endif

    LOAD_INTERFACE(gameeventmanager,IGameEventManager2,INTERFACEVERSION_GAMEEVENTSMANAGER2)

    LOAD_INTERFACE(gameeventmanager1,IGameEventManager,INTERFACEVERSION_GAMEEVENTSMANAGER)

    LOAD_GAME_SERVER_INTERFACE(servergamedll,IServerGameDLL,"ServerGameDLL006");



    LOAD_GAME_SERVER_INTERFACE(gameclients,IServerGameClients,INTERFACEVERSION_SERVERGAMECLIENTS);



    MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f );

    ConVar_Register( 0 );

    //InitCVars( interfaceFactory ); // register any cvars we have defined



    srand( (unsigned)time(NULL) );  // initialize the random seed

    irand.seed( (unsigned)time(NULL) );



    eventListener2 = new CRCBotEventListener();



    // Initialize bot variables

    CBotProfiles::setupProfiles();

    CBotGlobals::gameStart();    

    //CBotEvents::setupEvents();

    CWaypointTypes::setup();

    CWaypoints::setupVisibility();



    CRCBotPlugin::ShowLicense();    



    RandomSeed((unsigned int)time(NULL));



    return true;

}

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Aug 25 2009, 01:03 PM
Post #8


Admin
*****

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



this part is what I mean:
LOAD_GAME_SERVER_INTERFACE(servergamedll,IServerGameDLL,"ServerGameDLL006");

Changing the version in eiface.h will have no effect, because its explicilty loading version 006 here
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
J@nek
post Aug 25 2009, 02:48 PM
Post #9


Member
**

Group: Members
Posts: 19
Joined: 18-May 09
Member No.: 1,541



Yes yes I know that it was here mates. But in my version I don't have DLL006 hardcoded like it is in your version. Mine is referring to the #define and it is important as my mod and this plugin are sharing the same eiface.h

EDIT: ok tests done and it failt. Changing DLL005 to DLL006 in both server_i486.so HPB_bot2_server_plugin.so don't change anything.
I think I probably add a bug but I would like to start from a fresh and recent version. Do you think you could do a zip file including all .h and .cpp and VS 2005 vcproj ?

EDIT2 : Fixed --> I did a mistake specifying the folder of my mod.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

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: 16th September 2019 - 07:59 AM