Help - Search - Members - Calendar
Full Version: CBotGAValues::get(int)() error
RCBot Forums > RCBot > Bug Report
Hello I've noticed a tiny problem with RCBot 1.442-beta that I've recompiled and upgraded. I am not familiar with all of the src code scripts but it appears from what I've found from GDB that RCBot crashes on DMC with this error:-

Thread 1 "hlds_linux" received signal SIGSEGV, Segmentation fault.
0xf3554e6e in CBotGAValues::get(int) ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
(gdb) bt
#0  0xf3554e6e in CBotGAValues::get(int) ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#1  0xf357c5db in CPerceptron::setWeights(CBotGAValues*, int, int) ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#2  0xf3529e77 in CBot::SpawnInit(int) ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#3  0xf3546134 in CBot::Think() ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#4  0xf357280b in CBotGlobals::StartFrame() ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#5  0xf356776f in StartFrame() ()
   from /home/desktop/steamcmd/hlds/rcbot/dlls/
#6  0xf3a1ecd8 in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) ()
   from /home/desktop/steamcmd/hlds/./dmc/addons/metamod/
#7  0xf3a218e1 in mm_StartFrame() ()
   from /home/desktop/steamcmd/hlds/./dmc/addons/metamod/
#8  0xf7745db8 in SV_Physics () at ../engine/sv_phys.c:1985
#9  0xf773dcb6 in SV_Frame () at ../engine/sv_main.c:9238
#10 0xf7705f62 in _Host_Frame (time=0.00798809901) at ../engine/host.c:1404
---Type <return> to continue, or q <return> to quit---
#11 0xf7706322 in Host_Frame (time=0.00798809901, iState=1,
    stateInfo=0xffffd6ac) at ../engine/host.c:1522
#12 0xf772a9dc in CEngine::Frame (this=0xf77c16a0 <g_Engine>)
    at ../engine/sys_engine.cpp:245
#13 0xf7727d43 in CDedicatedServerAPI::RunFrame (this=<optimized out>)
    at ../engine/sys_dll2.cpp:1235
#14 CDedicatedServerAPI::RunFrame (
    this=0xf77bcd00 <__g_CDedicatedServerAPI_singleton>)
    at ../engine/sys_dll2.cpp:1226
#15 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766
#16 0x08049472 in main (argc=20, argv=0xffffd8e4)
    at ../dedicated/sys_ded.cpp:1146

Before you ask no this isn't using the Sven CBase headers or that, just the main headers from the RCBot v1.441 src code. Also I've allowed support for the MetaAPI 5:13, where the older version was at 5:10. If anyone is curious on what bits I've tampered with, you can use Gedit or NotePad to and use "Find" command and search for "[APG]" where I've added the comments where I suspect of any possible issues or flaws.

Does this line contain the possible cause of the crash for DMC, or have I messed up the src code slightly? This script was already typed up before I edited this src code.
Try adding a range check to the method to see if the index given is valid or not, that'll help.
it could be a correupt .rb file -- try deleting the .rb files and see if the crash happens again

may need to add guarding for this in code
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2021 Invision Power Services, Inc.