.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Sandbot (http://forums.bots-united.com/forumdisplay.php?f=85)
-   -   progress (http://forums.bots-united.com/showthread.php?t=10041)

RoboCop 26-10-2017 23:59

Re: progress
 
Code:

22:47:30 L 10/26/2017 - 17:46:58: [META] WARNING: dll: Failed query plugin '<sandbot.so>'; Couldn't open file '/home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so': /home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so: undefined symbol: _ZdlPvj
22:47:30 L 10/26/2017 - 17:46:58: [META] WARNING: dll: Skipping plugin '<sandbot.so>'; couldn't query

Not from loading it using Metamod nor from Standalone for v4.0.1 no. As this gives out the same error.

tschumann 27-10-2017 12:01

Re: progress
 
Ah sorry - try v0.4 I think (https://github.com/tschumann/sandbot...9648020d59f84f was when I updated to Visual Studio 2017 and Ubuntu 17 was not long after; https://github.com/tschumann/sandbot...b53c919c8fdd15 was v0.4).

RoboCop 27-10-2017 20:45

Re: progress
 
I've loaded v0.4 on my Op4CTF server with using GDB Debug mode with Metamod 1.21-p37 and this is what I got:-

Code:

Program received signal SIGSEGV, Segmentation fault.
0xf3a60973 in WaypointRouteInit() ()
  from /home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so
(gdb) bt
#0  0xf3a60973 in WaypointRouteInit() ()
  from /home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so
#1  0xf3a61233 in WaypointLoad(edict_s*) ()
  from /home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so
#2  0xf3a37eb7 in DispatchSpawn(edict_s*) ()
  from /home/desktop/steamcmd/hlds/gearbox/dlls/sandbot.so
#3  0xf3ed798a in api_caller_int_args_p(void const*, void const*) ()
  from /home/desktop/steamcmd/hlds/./gearbox/addons/metamod/metamod.so
#4  0xf3ed6d21 in main_hook_function(class_ret_t, unsigned int, enum_api_t, unsigned int, void const*) ()
  from /home/desktop/steamcmd/hlds/./gearbox/addons/metamod/metamod.so
#5  0xf3ed9a37 in mm_DispatchSpawn(edict_s*) ()
  from /home/desktop/steamcmd/hlds/./gearbox/addons/metamod/metamod.so
#6  0xf77d9179 in ED_LoadFromFile (
    data=0xf495741b "\n{\n\"origin\" \"0 -32 248\"\n\"pitch\" \"0\"\n\"_light\" \"163 211 220 48\"\n\"angle\" \"32\"\n\"classname\" \"light_environment\"\n}\n{\n\"origin\" \"-96 -32 48\"\n\"classname\" \"info_player_start\"\n}\n{\n\"origin\" \"-96 32 48\"\n\"classname"...) at ../engine/pr_edict.c:475
#7  0xf77ef376 in SV_LoadEntities () at ../engine/sv_main.c:7603
#8  0xf77c26bd in Host_Map (mapName=0xffffc8a0 "op4ctf_hairball",
    loadGame=false, mapstring=<optimised out>, bIsDemo=<optimised out>)
    at ../engine/host_cmd.c:1288
#9  0xf77c4d39 in Host_Map (loadGame=false,
    mapName=0xffffc8a0 "op4ctf_hairball",
    mapstring=0xffffc860 "map op4ctf_hairball \n", bIsDemo=<optimised out>)
    at ../engine/host_cmd.c:1272
#10 Host_Map_f () at ../engine/host_cmd.c:1443
---Type <return> to continue, or q <return> to quit---
#11 0xf77a62bd in Cmd_ExecuteString (text=0xffffc910 "map op4ctf_hairball ",
    src=<optimised out>) at ../engine/cmd.c:1150
#12 Cbuf_Execute () at ../engine/cmd.c:242
#13 0xf77bf7a8 in Host_InitializeGameDLL () at ../engine/host_cmd.c:222
#14 0xf77df767 in Sys_InitGame (
    lpOrgCmdLine=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 8192 -debug -steam", pBaseDir=0x804ca52 ".", pwnd=0x0, bIsDedicated=1)
    at ../engine/sys_dll2.cpp:806
#15 0xf77e19da in CEngine::Load (this=0xf78786a0 <g_Engine>, dedicated=true,
    basedir=0x804ca52 ".",
    cmdline=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 8192 -debug -steam") at ../engine/sys_engine.cpp:193
#16 0xf77df265 in CDedicatedServerAPI::Init (
    this=0xf7873d00 <__g_CDedicatedServerAPI_singleton>, basedir=0x804ca52 ".",
    cmdline=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 8192 -debug -steam", launcherFactory=
    0x8049dd0 <CreateInterfaceLocal(char const*, int*)>, filesystemFactory=
    0xf7726ad0 <CreateInterface(char const*, int*)>)
    at ../engine/sys_dll2.cpp:1189
#17 0x08049bcf in RunServer () at ../dedicated/sys_ded.cpp:646
#18 0x08049472 in main (argc=20, argv=0xffffd0d4)
    at ../dedicated/sys_ded.cpp:1146

Sadly the Standalone crashes as well:-

Code:

(gdb) bt
#0  0xf3ebf973 in WaypointRouteInit() ()
  from /home/desktop/steamcmd/hlds/./gearbox/dlls/sandbot.so
#1  0xf3ec0233 in WaypointLoad(edict_s*) ()
  from /home/desktop/steamcmd/hlds/./gearbox/dlls/sandbot.so
#2  0xf3e96eb7 in DispatchSpawn(edict_s*) ()
  from /home/desktop/steamcmd/hlds/./gearbox/dlls/sandbot.so
#3  0xf77d9179 in ED_LoadFromFile (
    data=0xf495741b "\n{\n\"origin\" \"0 -32 248\"\n\"pitch\" \"0\"\n\"_light\" \"163 211 220 48\"\n\"angle\" \"32\"\n\"classname\" \"light_environment\"\n}\n{\n\"origin\" \"-96 -32 48\"\n\"classname\" \"info_player_start\"\n}\n{\n\"origin\" \"-96 32 48\"\n\"classname"...) at ../engine/pr_edict.c:475
#4  0xf77ef376 in SV_LoadEntities () at ../engine/sv_main.c:7603
#5  0xf77c26bd in Host_Map (mapName=0xffffc8a0 "op4ctf_hairball",
    loadGame=false, mapstring=<optimised out>, bIsDemo=<optimised out>)
    at ../engine/host_cmd.c:1288
#6  0xf77c4d39 in Host_Map (loadGame=false,
    mapName=0xffffc8a0 "op4ctf_hairball",
    mapstring=0xffffc860 "map op4ctf_hairball \n", bIsDemo=<optimised out>)
    at ../engine/host_cmd.c:1272
#7  Host_Map_f () at ../engine/host_cmd.c:1443
#8  0xf77a62bd in Cmd_ExecuteString (text=0xffffc910 "map op4ctf_hairball ",
    src=<optimised out>) at ../engine/cmd.c:1150
#9  Cbuf_Execute () at ../engine/cmd.c:242
#10 0xf77bf7a8 in Host_InitializeGameDLL () at ../engine/host_cmd.c:222
#11 0xf77df767 in Sys_InitGame (
    lpOrgCmdLine=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 819---Type <return> to continue, or q <return> to quit---
2 -debug -steam", pBaseDir=0x804ca52 ".", pwnd=0x0, bIsDedicated=1)
    at ../engine/sys_dll2.cpp:806
#12 0xf77e19da in CEngine::Load (this=0xf78786a0 <g_Engine>, dedicated=true,
    basedir=0x804ca52 ".",
    cmdline=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 8192 -debug -steam") at ../engine/sys_engine.cpp:193
#13 0xf77df265 in CDedicatedServerAPI::Init (
    this=0xf7873d00 <__g_CDedicatedServerAPI_singleton>, basedir=0x804ca52 ".",
    cmdline=0x80570a0 "-game gearbox -ip 198.245.61.68 +sys_ticrate 128 +maxplayers 17 +port 27115 +exec server.cfg -pingboost 3 +map op4ctf_hairball -zone 8192 -debug -steam",
    launcherFactory=0x8049dd0 <CreateInterfaceLocal(char const*, int*)>,
    filesystemFactory=0xf7726ad0 <CreateInterface(char const*, int*)>)
    at ../engine/sys_dll2.cpp:1189
#14 0x08049bcf in RunServer () at ../dedicated/sys_ded.cpp:646
#15 0x08049472 in main (argc=20, argv=0xffffd0d4)
    at ../dedicated/sys_ded.cpp:1146


tschumann 28-10-2017 09:20

Re: progress
 
Hm, I'll see what I can figure out - nothing obvious looking at the code but I don't think I regression tested the waypoint stuff on Linux so it looks like there probably is a bug.
I might not get to it this weekend but I'll see what I can do.

tschumann 04-11-2017 08:33

Re: progress
 
Okay, it looks like you're running from HLDS rather than Steam itself? I've been looking into debugging with Steam and it looks like a mess. Looks like it worked at one point (http://steamcommunity.com/app/221410...3757387624740/) but GAME_DEBUGGER is no longer in steam.sh, so that's no good. On the plus side Steam seems to generate minidumps regardless of OS settings but of course gdb can't load minidumps. There's a tool called minidump-2-core that's part of google-breakpad but it's not in any mirror that I can find, so my only option is to clone and build (which I'd like to avoid).
How easy is it to set up HLDS, get it running and generate a crash dump?

Also, I got a similar crash to you with v0.4.1 (couldn't find Bot::GetSkill) which I fixed with https://github.com/tschumann/sandbot...e2d34c45245bf2 - I don't know a whole lot about C++ constructors etc but it seems to work fine on Windows. Possibly a gcc flag?

tschumann 04-11-2017 09:40

Re: progress
 
Also, does v0.4.1 work for Half-Life on Ubuntu 14.04?

RoboCop 04-11-2017 20:48

Re: progress
 
For HLDM without Metamod yes - With Metamod no. I don't know why it crashes and the GDB gave me a huge list of errors linked to metamod.so - even without the other Addons like AMXX and Spawn & Chat Protection.

Code:

Program received signal SIGBUS, Bus error.
0xf3ed6682 in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) () from /home/desktop/steamcmd/hlds/./valve/addons/metamod/metamod.so
(gdb) bt
#0  0xf3ed6682 in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) ()
  from /home/desktop/steamcmd/hlds/./valve/addons/metamod/metamod.so
#1  0xf3eda100 in mm_OnFreeEntPrivateData(edict_s*) ()
  from /home/desktop/steamcmd/hlds/./valve/addons/metamod/metamod.so
#2  0xf3ed794a in api_caller_void_args_p(void const*, void const*) ()
  from /home/desktop/steamcmd/hlds/./valve/addons/metamod/metamod.so
#3  0xf3ed678f in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) ()


I don't know much on how you code for Sandbot, but is it possible that those bots only work if the builds were split to do only load as a Standalone and as a Metamod build? E.g sandbot.dll and sandbot.so for Standalone and sandbot_mm.dll and sandbot_mm.so for Metamod?

The Storm 04-11-2017 22:23

Re: progress
 
@RoboCop The list is are watching is just a backtrace, not a "huge list of errors". There is no really a reason to split the builds for Metamod and Non-Metamod. The code is isolated in checks and calls Metamod functions when loaded as plugin and the normal game/engine functions when is working standalone.

tschumann 04-11-2017 23:14

Re: progress
 
Quote:

Originally Posted by RoboCop (Post 66909)
For HLDM without Metamod yes - With Metamod no. I don't know why it crashes and the GDB gave me a huge list of errors linked to metamod.so - even without the other Addons like AMXX and Spawn & Chat Protection.

How about v0.4?

Quote:

Originally Posted by RoboCop (Post 66909)
I don't know much on how you code for Sandbot, but is it possible that those bots only work if the builds were split to do only load as a Standalone and as a Metamod build? E.g sandbot.dll and sandbot.so for Standalone and sandbot_mm.dll and sandbot_mm.so for Metamod?

As The Storm said there's no reason for there to be separate builds.

I suspect the issue is to do with sub-classing or how it is built on Linux as it works on Windows (though it's possible I'm invoking undefined behaviour and Visual Studio generates better code for the situation).
Looks like there could be a problem with the waypoint code on Linux too though I haven't really touched that, so not sure what it could be. I'll try and sort out the Opposing Force crash first anyway.

If anyone knows how to get Half-Life to generate gdb core dumps that would help too.

RoboCop 05-11-2017 00:01

Re: progress
 
Quote:

If anyone knows how to get Half-Life to generate gdb core dumps that would help too.
Well yes thanks to a bit of hint from Arkshine, he told me to test and engage GDB Debug mode is simply using this in the Terminal "$ LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" gdb ./hlds_linux"

Then type this in Terminal but don't use "./hlds_run", use "run -game gearbox -ip xx.xx.xx.xx +port 27015 +map op4_bootcamp +exec server.cfg -debug"

You can backtrace or get a full error crash log by typing "bt" as well rerunning the server using "run" (Nothing further as GDB stored the Startup Variables once after GDB is exited by typing "quit")

And "How about v0.4?" you say? Well I just did the tests and they don't seem to instantly crash as much as v0.4.1 did...


All times are GMT +2. The time now is 10:36.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.