View Issue Details

IDProjectCategoryLast Update
0026108AI War 2Crash/ExceptionJan 13, 2022 6:42 pm
Reporterabjohnsonzz Assigned Tox4000Bughunter  
Status resolvedResolutionfixed 
Product VersionBeta 3.783 The Return Of Multiplayer! 
Fixed in VersionBeta 3.784 Tractor Recursion 
Summary0026108: String of hundred of errors related to faction reported in dialog. Fatal errors occurred. While engaging with fleet on AI planet
DescriptionNot sure what to add. Seemed. to be a normal enough attack. Battlestation and overloaded support a planet or two away. This happened twice, the second was a reload of the last save. Followed a similar battle plan. This involved chasing a dire plasma guardian over two planets, then approaching a hunter fleet a couple of planets away.
TagsNo tags attached.



Jan 12, 2022 9:16 pm


Player.log (2,100,731 bytes)
Player-prev.log (3,544,697 bytes)


Jan 13, 2022 6:42 pm

administrator   ~0063773

Thank you!

* Fixed a very confusing and semi-rare (but extremely consistent when it does happen) crash bug that seemed to be new in the last build. This was a very subtle code bug from myself that I didn't even recognize after putting in an initial fix until Democracy made a further comment.
** This took an incredibly long time to track down because it left no actual errors and just crashed to the desktop, or left only errors unrelated to itself on linux apparently. It took 80 minutes to find this with a savegame in which I could reproduce the error in 3 seconds, and without that save (thank you BobDobbs!) I couldn't have debugged it at all.
** The issue here was "what happens if two tractor beam units both grab one another and try to pull at the same time?" Unlike the peasant railgun, this is isn't an absurd speed that is reached, but rather a stack overflow that is so harsh it causes a segfault (writing to protected memory).
** The general situation was like this: "tractor A grabs B, which is also a tractor, which grabs A. A moves, dragging B with it. B has moved, so it pushes A with it, which causes B to be pulled, which moves A, etc." Actually it probably does work like a railgun, except it essentially accelerates them both to infinity speed within a nanosecond, so the world collapses in a singularity.
** I'm pretty sure that Zeus and I had talked about this a long time ago as a possibility with some DLC2 stuff, but the units in question at the time were set up so that we never had to test this corner case. I take it that the balance has changed such that this corner case became relevant.
** Anyhow, originally I was just going to just make tractors not grab tractors, but then Democracy noted that this case was safely working before (Ensnarer Battlestations would do it). So that reminded me of the code change I did last build, and reviewed earlier today without seeing the issue. Based on that, I managed to let tractors drag tractors again, but keep them from infinite looping.
** Thanks to Bummeri, william montag, and BobDobbs for reporting, to BobDobbs for the super helpful save, and to Democracy for the added notes about tractor dragging. Also thanks to abjohnsonzz for an error log. I could have fixed this in under 5 minutes if I'd seen his report first, because it did not crash to desktop silently, but instead had a useful log.

Issue History

Date Modified Username Field Change
Jan 12, 2022 9:16 pm abjohnsonzz New Issue
Jan 12, 2022 9:16 pm abjohnsonzz File Added: Player.log
Jan 12, 2022 9:16 pm abjohnsonzz File Added: Player-prev.log
Jan 13, 2022 6:42 pm x4000Bughunter Assigned To => x4000Bughunter
Jan 13, 2022 6:42 pm x4000Bughunter Status new => resolved
Jan 13, 2022 6:42 pm x4000Bughunter Resolution open => fixed
Jan 13, 2022 6:42 pm x4000Bughunter Fixed in Version => Beta 3.784 Tractor Recursion
Jan 13, 2022 6:42 pm x4000Bughunter Note Added: 0063773