the3dfxdude/7kaa

Game crashes when a massive number of units are on the field at the same time

kencinas95 opened this issue · 7 comments

OS: Windows 10
Game Version: 1.15.5

Game crashes when a huge number of units are on the field at the same time, no matter what.
I couldn't find a dump file or a log file to lookup the issue, and the only thing that the game displays it's a segfault (when run from the command line).

ex1
ex2
ex3

Also, searching for a way to enable the debug mode or at least try to log anything, I found out that there is no wiki about how to achieve this but the Error Class page which tells in a vague way to set an env var (SKDEBUG) to start debugging using channels but no further documentation can be found about what channels are defined in the wiki neither in the code itself.

If you have a save file, and explain how to trigger the issue, send the save file and I can check the crash.

It's a long shot, but I recently saw a crash that is related to action code. That is a lot of units, so the trigger situation can increase in probability.

sebaro commented

Gentoo Linux, 2.15.5

Thread 1 "7kaa" received signal SIGSEGV, Segmentation fault.
0x0000555555629c3f in can_move_to(int, int) ()
(gdb) bt
#0  0x0000555555629c3f in can_move_to(int, int) ()
#1  0x000055555562bed0 in Node::generate_successors(short, short, short) ()
#2  0x000055555562c286 in SeekPath::continue_seek(int, char) [clone .part.0] ()
#3  0x000055555562e223 in SeekPath::seek(int, int, int, int, unsigned int, char, short, short, short, int, int, int, int, int) ()
#4  0x000055555567b4a5 in Unit::searching(int, int, int, short, short, short, short, short) ()
#5  0x000055555567ba26 in Unit::search(int, int, int, short, short, short, short, short) ()
#6  0x000055555567bd0b in Unit::move_to(int, int, int, short, short, short, short, short) ()
#7  0x0000555555668def in Unit::think_general_flee() ()
#8  0x0000555555669bab in Unit::process_ai() ()
#9  0x000055555565f8ce in UnitArray::process() ()
#10 0x000055555563d70c in Sys::process() ()
#11 0x000055555563bf57 in Sys::main_loop(int) ()
#12 0x000055555563c381 in Sys::run(int) ()
#13 0x00005555555caab2 in Game::single_player_menu() ()
#14 0x00005555555cb245 in Game::run_main_menu_option(int) ()
#15 0x00005555555cb4bc in Game::main_menu() ()
#16 0x000055555556cb8f in main ()

DEIO_001.zip

Hello sebaro. This crash you have is caused from a bug earlier in time in your game, leaving a corruption on the map. Unfortunately the save file was created after the corruption occurred. So I cannot find the root cause. However, I have fixed bugs that have caused these kinds of situations, so hopefully the next version will have fixed this.

sebaro commented

Hello sebaro. This crash you have is caused from a bug earlier in time in your game, leaving a corruption on the map. Unfortunately the save file was created after the corruption occurred. So I cannot find the root cause. However, I have fixed bugs that have caused these kinds of situations, so hopefully the next version will have fixed this.

Thanks.

The issue here is not likely due to the number of units. There have been bugs fixed that are related to this sort of problem. Please go here and get a recent dev build and check the stability:
https://7kfans.com/forums/viewtopic.php?f=20&t=1290

Please use the game forum for reporting any further issue or the main repository page at sourceforge.net. Also please keep up to date with releases at our website or sourceforge.net.