The Curse of "SIGSEGV"

The Curse of "SIGSEGV"

What Is "SIGSEGV" Anyway?

"SIGSEGV" means a segmentation fault, which is computer speak for "the program attempted to do an """""illegal""""" action". In other words it just means the code doesn't make sense to the computer. It's like ordering someone to repair your car tire, but you gave them a special request on some paper, on this paper is a bunch of scribbles. Chances are they will complain that your handwriting sucks. The most common causes of "SIGSEGV" are incorrectly compiled code (in which case you should write a bug report to the compiler), corrupted code, and faulty hardware (usually RAM). Ready for a plot twist? A fourth cause of "SIGSEGV" seems to be on the horizon, and I have literally no idea what causes it.

How Does One Know If They Have "SIGSEGV"?


The Curse of "SIGSEGV" image 3
The Curse of "SIGSEGV" image 4

If your game crashes with a OS error instead of Factorio's built in error handling and exits to desktop, you've just experienced an engine crash, which is the primary symptom of SIGSEGV (the other being save file corruption (though I have not experienced this myself after over 200 crashes, only heard of it happening)). After experiencing an engine crash, the first thing you should ever do is back up your saves, back up your blueprint library, back up your settings, and look at your logs (all of these things can be found in C:\Users\Your Windows User Goes Here\AppData\Roaming\Factorio (idk linux and mac paths for now, though if someone can add that it would be great)). Upon opening your logs, press control+f to search, then type "Received SIGSEGV" (case sensitive) and hit enter. If 0 results are found, you are in luck and don't have "SIGSEGV"! However if you are unlucky enough to find a result, you have "SIGSEGV".

The Dangers Of "SIGSEGV"

"SIGSEGV" may at first only appear to impact Factorio, and if that's the first place it hits you are lucky and got an early warning. There have been reports in the past that claim "SIGSEGV corrupts saves", and can and will corrupt your blueprint library if it decides to (also your settings but that's not end of the world if you lose that). Worst of all, it may go to other things if it chooses to (and it will). 4 hours of unsaved homework that you are doing on your gaming pc for some reason? Gone! Got unlucky when trying to open discord and "SIGSEGV" decided to strike? No more discord! (well unless you have the mobile discord app). Blue screen? Probably not "SIGSEGV" actually, I've never blue screened to "SIGSEGV" before (which means I doubt this is actually a true hardware problem).

(No screenshots cause discord likes deleting its crash logs for some reason and I already fixed my "SIGSEGV"s so I can't get it to happen again)

How To Solve "SIGSEGV"

At the moment, "SIGSEGV" cannot be beaten, "SIGSEGV" will arrive, spend about a month on your PC, then vanish with no trace in sight of what caused it or what fixed it (and if you are me, go into my brain and become my sleep paralysis demon's neighbor). If anyone has even anything about what causes "SIGSEGV" please let me know ASAP so I can add it here! I looked at how many "SIGSEGV" reports there were when I first had it, and hardly found any mentions of it on the internet. I blinked and now there are more reports per hour than I have fingers. The only consistent-ish pattern I've found with "SIGSEGV" is that the more ram transfer something uses per second, the more likely it is to "Received SIGSEGV". However this theory isn't very strong as discord crashing on boot (with the error being "Received SIGSEGV") can be very easily fixed by clearing discord's browser cache! Unfortunately Factorio does not have a cache to clear, and will fix itself given time. It's almost poetic I have to say, the only way to fix the curse that will stop you from playing Factorio is to drop your Factorio addiction, and pick it back up after a considerable delay is what I would say if I didn't have some strategies to make it possible to continue playing even with "SIGSEGV" attacking your system.

How To Power Through The Pain (NOT RECOMMENDED)

First, if you haven't already, MAKE A BACKUP OF YOUR BLUEPRINT LIBRARY AND SAVE FILES!!! Next, go to "C:\Users\Your User Goes Here\AppData\Roaming\Factorio\config" (this is for windows, for Linux and mac go find it yourself then tell me how please so i can add it to the guide because i don't know) and open "config.ini" with any generic text editor such as "Notepad". Here you can edit your settings without having to go in-game and risk crashing while changing settings which can really mess up your Factorio. The settings you are looking for are "autosave-interval" and "autosave-slots".

"autosave-interval" controls how often your game will autosave in minutes, I'd suggest setting it to 5 (which is the minimum the game will allow). As for "autosave-slots", you normally cant change this without super ultra secret developer cheats, but here you should set this to at least something in the hundreds, I set mine to 500. Simple math exists to tell us that this is 41.6667 hours of autosaves that you can load if you find out something broke badly and you have to load a really old autosave because a research getting corrupted by "SIGSEGV" and getting marked as unresearchable. As for why so short on the autosave interval its cause you will crash a LOT, and this is just preparing to be able to survive constant crashes (for reference when I had "SIGSEGV" I crashed on average I think about every 7m, it wasn't fun).

Next you need to know how the game handles autosaves and overwriting them more specifically. When the game attempts to make an autosave, it first looks at what the most recent autosave was according to the save file itself (if this sounds confusing that's because this is). Lets say save game "can i beat factorio while my game wont stop crashing" just autosaved in slot 188, right before that happened it marked itself to be saved in slot 189 next. If it then autosaves again it'll autosave in slot 189, and tell itself next slot is 190 for autosaving. When the end of the list is reached (list size determined by "autosave-slots"), the counter will cycle back to 1.

Normally this system works fine when the autosave list is 3 long, However when normal saves are not 100% reliable and you are forced to rely on autosaves, the cracks start to show. Do not play 2 save files at once with similar positions on the autosave list, you will easily lose one of them that way. Do not forget to make backups of your autosaves. And lastly, Do not run out of disk space from all these autosaves (this many autosaves will only take up about 15 gigabytes of space but if you run out, you will lose your save (also you can go back to 3 autosaves once you are absolutley positive "SIGSEGV" has left your system (and once you made a crap ton more backups of all your saves from after "SIGSEGV"'s wrath))).

Last, and probably least, pay attention to your UPS even if you aren't close to a 16th of the way to lagging yet. The closer you are to lagging, the higher chance of crashing (can't prove it though cause getting "SIGSEGV" to happen is pure luck). Also, play pure vanilla without Space Age for maximum UPS and multiplayer will not work at all during "SIGSEGV".

Anyways that's all I have bye good luck also if you have ANY information at all on "SIGSEGV" please let me know so I can document more on this guide.

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=3397525075					

More Factorio guilds