borzh / botrix

Source code for Half-Life 2: Deathmatch bots.
37 stars 14 forks source link

Assert failed: (0 <= iIndex && iIndex < m_iSize); in operator[](), file /home/romi/botrix/botrix/good/include/good/vector.h, line 321 #7

Open ghost opened 2 years ago

ghost commented 2 years ago

Assert failed: (0 <= iIndex && iIndex < m_iSize); in operator[](), file /home/romi/botrix/botrix/good/include/good/vector.h, line 321

This error only shows up on the latest version. Version 1.0.0 works fine however.

Not sure what this means.

borzh commented 2 years ago

It means array out of bounds exception. When does this happen? Can you provide more details? Does it always happen?

ghost commented 2 years ago

It shows up as soon as I start my server, and crashes the server, restarting it.

borzh commented 2 years ago

What map? Any map? Linux right?

ghost commented 2 years ago

It crashes on any map, just after a level is loaded. I also get Assert failed: (cEntityClass.sClassName.size() > 0); in GetEntityType(), file /home/romi/botrix/botrix/item.cpp, line 439 sometimes. Version 1.0.1 seems to be working also, which was the version I was originally using.

boris-nocapinc commented 2 years ago

Can you post here the botrix commands you use in server.cfg? Or maybe the whole file?

ghost commented 2 years ago

botrix waypoint autocreate on botrix path autocreate on botrix config bot quota 9 botrix config bot intelligence fool botrix config waypoint analyze amount 1 botrix config waypoint analyze map-change 1 botrix config waypoint unreachable 2 botrix config waypoint analyze distance 72 botrix config bot weapon allow off weapon_smg1 botrix config bot weapon allow off weapon_slam botrix config bot weapon allow off weapon_frag botrix config bot weapon default weapon_pistol botrix config bot team unassigned botrix config bot suicide 0 botrix item draw all botrix item drawtype all

ghost commented 2 years ago

Strangely, it seems every version of Botrix crashes with this error unless I restart the computer. It only works once and then you need to restart it again.

ghost commented 2 years ago

It does this immediately after the waypoint visibility table is loaded.