Posted by: RoboCop Jul 7 2018, 06:02 PM
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) ()
#0 0xf3554e6e in CBotGAValues::get(int) ()
#1 0xf357c5db in CPerceptron::setWeights(CBotGAValues*, int, int) ()
#2 0xf3529e77 in CBot::SpawnInit(int) ()
#3 0xf3546134 in CBot::Think() ()
#4 0xf357280b in CBotGlobals::StartFrame() ()
#5 0xf356776f in StartFrame() ()
#6 0xf3a1ecd8 in main_hook_function_void(unsigned int, enum_api_t, unsigned int, void const*) ()
#7 0xf3a218e1 in mm_StartFrame() ()
#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>)
#13 0xf7727d43 in CDedicatedServerAPI::RunFrame (this=<optimized out>)
#14 CDedicatedServerAPI::RunFrame (
#15 0x08049c65 in RunServer () at ../dedicated/sys_ded.cpp:766
#16 0x08049472 in main (argc=20, argv=0xffffd8e4)
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.
Posted by: Solokiller Jul 11 2018, 08:25 AM
Try adding a range check to the method to see if the index given is valid or not, that'll help.
Posted by: Cheeseh Jul 18 2018, 08:54 AM
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