th3-z / kf2-magicked-admin

:spider: Mutator-free management, statistics, and in-game bot for ranked Killing Floor 2 servers
https://kf2-ma.th3-z.xyz
MIT License
32 stars 7 forks source link

[BUG] IndexError: list index out of range #184

Closed maddubz closed 3 years ago

maddubz commented 3 years ago

Describe the bug Whenever a server runs for a couple hours KF2-MA stops from starting up, so i have to shutdown the servers which it errors on in order to fix it,

this is the error line 437, in get_payload_map_settings map_results = map_tree.xpath(map_pattern)[0] IndexError: list index out of range

To Reproduce Steps to reproduce the behavior: 1.Have the server running a while 2.Restart KF2-MA

Desktop (please complete the following information):

Server (please complete the following information):

maddubz commented 3 years ago

Also i've read #183 but i'm not running KillunixFloor, everything is stock here.

th3-z commented 3 years ago

Hi,

It looks like the map you are loading into has a misconfigured KFMapSummary section in \KFGame\Config\PCServer-KFGame.ini. N.b. the name of the configuration file might be different on Linux. Please try launching kf2-server and kf2-ma with a default map.

Check that the name of the custom map causing the issue exactly matches the entry in that file (case sensitive).

maddubz commented 3 years ago

I haven't added custom maps, but im running 200ish servers and it randomly happens to some of the servers.

th3-z commented 3 years ago

If you can send me an affected server's KFGame/Config/LinuxServer-KFGame.ini and let me know which map was active at the time I can take a look. It might be crashing right after the map change, if that's the case let me know which map was loaded after the crash. I'm fairly certain it is related to this configuration file.

th3-z commented 3 years ago

See how you do with that commit I just pushed.

maddubz commented 3 years ago

I had it fixed by reinstalling 1 of the servers, but its strange since all of the servers i have run on exact same configs + stock settings, but i applied the commit you just pushed and i'll update if the problem occurs again in some days hopefully not!

Thanks 👍

th3-z commented 3 years ago

It's an issue that I've seen before. I had added a fix previously, to avoid the crash it would fallback on KF-BioticsLab and issue a warning. When I investigated your issue I noticed that the code to fix it has an issue causing it to effectively do nothing. The commit there should fix the issue so you should see a warning in the output now rather than a crash. I think the consequence of ignoring the issue is that it'll switch to Biotics if you change the game mode, difficulty, or length via a command.

I'll close the issue for now but do follow up if you have further issues and I'll see what we can do.