Page 1 of 1

[2.0.60][Linux] Crash intermittently on restart after saving

Posted: Mon Aug 25, 2025 6:55 pm
by ant-kul
tl;dr: Since Factorio 2.0.0 the game randomly crashes on restart (~25% of the time on 2.0.60, ~10% on earlier 2.0.x), even with all mods disabled.

Factorio version: 2.0.x (currently 2.0.60, Steam, space-age)

---
Description
Since the initial 2.0 release and up to today, the game intermittently crashes on startup or after a restart - even without any mod configuration changes.
Reinstalling Factorio helps only temporarily; the issue reappears later.

Note: Changing a mod configuration (e.g., toggling a mod on/off) and then restarting is just the easiest way to reproduce the crash on my side, but the crash also occurs after a regular restart with no mod changes.
---
Steps to reproduce
A. Minimal
1. Start or restart Factorio.
2. Observe that sometimes the game starts normally; other times it crashes on startup or during/after loading.

B. Example that often triggers (for convenience of repro)
1. enable/disable Quality mod.
2. Restart Factorio.
3. The crash occurs intermittently (not every time).
---

Logs and files
  • ~/.factorio/factorio-current.log (from 2.0.60) -> attached
    • Relevant excerpts observed repeatedly on my system (even when no crash happens in that session):

      Code: Select all

      Parallel sprite loading failed, falling back to normal sprite loading.
      IDAT: incorrect data check: __base__/graphics/entity/legacy-curved-rail/legacy-curved-rail-vertical-right-top-stone-path-background-remnants.png; mods: ?
      Prototypes using the sprite: data.raw["rail-remnants"]["legacy-curved-rail-remnants"]
      
      In this particular log the session continues to initialization and ends with "Quitting: user-quit.", but these PNG decode errors appear consistently across sessions where crashes also occur.
  • Crash report(s) from ~/.factorio/factorio-current.log -> attached
  • ~/.factorio/mods/mod-list.json -> attached
  • A save that has seen the crash on restart -> attached
Version history / scope
  • First affected: 2.0.0 (initial 2.x release)
  • Still affected: 2.0.60 (2025-08-25)
System environment
  • OS: KDE neon User Edition 24.04 (based on Ubuntu Noble 24.04)
  • Kernel: 6.14.0-28-generic
  • Desktop: KDE Plasma (X11 session)
  • CPU: Intel Core i7-10750H (12 cores)
  • RAM: 32 GB
  • GPU (primary for Factorio): NVIDIA GeForce GTX 1660 Ti Mobile
    - Driver: NVIDIA 570.169
    - OpenGL version: 4.6 (Compatibility Profile) Mesa 25.0.7-0ubuntu0.24.04.1
  • GPU (integrated): Intel UHD Graphics (CML GT2), driver i915
  • Audio: PulseAudio (on PipeWire 1.2.6)

Code: Select all

   0.000 2025-08-25 21:00:17; Factorio 2.0.60 (build 83512, linux64, steam, space-age)
   0.000 Operating system: Linux
   0.000 Initializing Steam API.
   0.000 Program arguments: "/home/anton/.local/share/Steam/steamapps/common/Factorio/bin/x64/factorio" 
   0.000 Config path: /home/anton/.factorio/config/config.ini
   0.000 Read data path: /home/anton/.local/share/Steam/steamapps/common/Factorio/data
   0.000 Write data path: /home/anton/.factorio [426089/479326MB]
   0.000 Binaries path: /home/anton/.local/share/Steam/steamapps/common/Factorio/bin
   0.006 System info: [CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 12 cores, RAM: 31910 MB]
   0.006 Environment: DISPLAY=:1 WAYLAND_DISPLAY=wayland-0 DESKTOP_SESSION=plasma XDG_SESSION_DESKTOP=KDE XDG_CURRENT_DESKTOP=KDE SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.031 Display options: [FullScreen: true] [VSync: false] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.040 Video driver: x11
   0.040 Available displays: 1
   0.040  [0]: HDMI-A-1 27" - {[0,0], 2560x1440, SDL_PIXELFORMAT_RGB888, 60Hz}
   0.240 Initialised OpenGL:[0] NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2; driver: 3.3.0 NVIDIA 570.169
   0.240   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   0.240   [Version] 3.3
   0.268 Graphics settings preset: very-high
   0.268   Dedicated video memory size 6390 MB (detected from NVIDIA GeForce GTX 1660 Ti; VendorID: 0x10de; DeviceID: 0x2191)
   0.273 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   0.273                   [Max threads (load/render): 32/12] [Max texture size: 8192] [Tex.Stream.: false] [Rotation quality: low] [Other: STDCWtl] [B:0,C:0,S:100]
   0.297 [Audio] Driver:pulseaudio, Device:Default device, Depth:16, Frequency:44100, Channels:2, Interpolation:linear
   0.425 Info ModManager.cpp:444: FeatureFlag expansion-shaders = false
   0.425 Info ModManager.cpp:444: FeatureFlag freezing = false
   0.425 Info ModManager.cpp:444: FeatureFlag quality = false
   0.425 Info ModManager.cpp:444: FeatureFlag rail-bridges = false
   0.425 Info ModManager.cpp:444: FeatureFlag segmented-units = false
   0.425 Info ModManager.cpp:444: FeatureFlag space-travel = false
   0.425 Info ModManager.cpp:444: FeatureFlag spoiling = false
   0.437 Loading mod core 0.0.0 (data.lua)
   0.450 Loading mod base 2.0.60 (data.lua)
   0.564 Loading mod base 2.0.60 (data-updates.lua)
   0.605 Checksum for core: 4171658704
   0.605 Checksum of base: 1534080171
   0.744 Prototype list checksum: 159860831
   0.771 Loading sounds...
   0.857 Info PlayerData.cpp:66: Local player-data.json unavailable
   0.857 Info PlayerData.cpp:69: Cloud player-data.json available, timestamp 1756144815
   0.858 Post-data load graphics options: [Light occlusion: no]
   1.071 Initial atlas bitmap size is 8192
   1.076 Created an atlas bitmap (size 8192x8176) [none]
   1.080 Created an atlas bitmap (size 8192x8192) [none]
   1.088 Created an atlas bitmap (size 8192x8188) [none]
   1.090 Created an atlas bitmap (size 8192x8184) [none]
   1.092 Created an atlas bitmap (size 8192x8192) [linear-magnification]
   1.093 Created an atlas bitmap (size 8192x8192) [none]
   1.093 Created an atlas bitmap (size 8192x3104) [none]
   1.095 Created an atlas bitmap (size 8192x8192) [low-object]
   1.095 Created an atlas bitmap (size 8192x6784) [low-object]
   1.096 Created an atlas bitmap (size 8192x8136) [corpse-decay]
   1.096 Created an atlas bitmap (size 8192x8188) [corpse-decay]
   1.096 Created an atlas bitmap (size 8192x8076) [corpse-decay]
   1.096 Created an atlas bitmap (size 8192x4352) [decal]
   1.096 Created an atlas bitmap (size 8192x5632) [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.096 Created an atlas bitmap (size 4096x1632) [smoke, mipmap, linear-minification, linear-magnification]
   1.098 Created an atlas bitmap (size 8192x8096) [terrain, mipmap, linear-minification, linear-mip-level]
   1.098 Created an atlas bitmap (size 8192x4880) [terrain, mipmap, linear-minification, linear-mip-level]
   1.098 Created an atlas bitmap (size 4096x2960) [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   1.098 Created an atlas bitmap (size 4096x3104) [mipmap]
   1.098 Created an atlas bitmap (size 8192x2560) [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.098 Created an atlas bitmap (size 8192x5168) [alpha-mask]
   1.104 Created an atlas bitmap (size 8192x8184) [shadow, linear-magnification, alpha-mask]
   1.108 Created an atlas bitmap (size 8192x8192) [shadow, linear-magnification, alpha-mask]
   1.109 Created an atlas bitmap (size 8192x8188) [shadow, linear-magnification, alpha-mask]
   1.109 Created an atlas bitmap (size 8192x4352) [shadow, linear-magnification, alpha-mask]
   1.109 Created an atlas bitmap (size 8192x2352) [shadow, mipmap, linear-magnification, alpha-mask]
   1.109 Created an atlas bitmap (size 4096x176) [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   1.109 Loading 3D bitmaps.
   1.117 Texture processor created (4096). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   1.231 Parallel sprite loader initialized (threads: 11, bitmaps: 4655)
   8.052 Error ParallelSpriteLoader.cpp:67: Parallel sprite loading failed, falling back to normal sprite loading. IDAT: incorrect data check: __base__/graphics/entity/legacy-curved-rail/legacy-curved-rail-vertical-right-top-stone-path-background-remnants.png
         RAM: 31910 MB
   8.298 Error AtlasBuilder.cpp:1266: IDAT: incorrect data check: __base__/graphics/entity/legacy-curved-rail/legacy-curved-rail-vertical-right-top-stone-path-background-remnants.png; mods: ?
         Prototypes using the sprite:
           data.raw["rail-remnants"]["legacy-curved-rail-remnants"]
   8.359 Texture processor created (4096). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   8.561 Sprites loaded
   8.584 Generated mipmaps (4) for atlas [7] of size 8192x8192   
   8.592 Generated mipmaps (4) for atlas [8] of size 8192x6784   
   8.595 Generated mipmaps (3) for atlas [13] of size 8192x5632   
   8.600 Generated mipmaps (3) for atlas [14] of size 4096x1632   
   8.629 Generated mipmaps (3) for atlas [15] of size 8192x8096   
   8.646 Generated mipmaps (3) for atlas [16] of size 8192x4880   
   8.652 Generated mipmaps (3) for atlas [17] of size 4096x2960   
   8.695 Generated mipmaps (3) for atlas [18] of size 4096x3104   
   8.715 Generated mipmaps (5) for atlas [19] of size 8192x2560   
   8.718 Generated mipmaps (3) for atlas [25] of size 8192x2352   
   8.718 Custom mipmaps uploaded (0)
   8.746 Video memory usage: 1521.01 MB (Atlases: 1507.23 MB, Textures: 13.78 MB)
   8.760 Factorio initialised
  10.429 Quitting: user-quit.
  10.604 Steam API shutdown.
  10.608 Goodbye

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 12:12 pm
by ant-kul
After a full system reboot (without reinstalling Factorio) the game started launching again.
It makes me think that some file permissions or access rights might be getting reset.

Also, I want to note that this bug has reproduced for me not only on KDE neon 24.04, but also earlier on Fedora 42 KDE edition and on Kubuntu.

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 12:48 pm
by eugenekay
Is this all on the same HDD / SSD? Is it always the same file - __base__/graphics/entity/legacy-curved-rail/legacy-curved-rail-vertical-right-top-stone-path-background-remnants.png ? The error "IDAT: incorrect data check" comes from libpng, pointing towards a bad byte somehow. Can you upload a copy of this file from your system so we can inspect it? Have you uninstalled / reinstalled Factorio as part of testing yet? The fact that it only occasionally fails to load using this code path (but works on a re-attempt) suggests to me that it is an intermittent I/O error, such as a flipped-bit on-disk, a failing Flash controller, or possibly bad memory.

I would start by running smartctl -a /dev/sdX to see if there are any immediate Hardware Errors, followed by e2fsck from a LiveUSB stick to verify that the filesystem is not corrupted. There are I/O tests you can run as well (using dd, fio, or custom scripts) to verify that the same data is being Read as was Written.

Good Luck!

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 3:37 pm
by ant-kul
1. Storage: The game and all data are installed on same NVMe SSD (Samsung MZVLQ512HALU-00000, 512 GB).
2. File: It is not always the same file. Sometimes the error points to one PNG, sometimes to another.
Example from the latest occurrence (permissions shown):

Code: Select all

   -rwxrwxr-x 1 anton anton 3158903 сер 25 16:42 /home/anton/.local/share/Steam/steamapps/common/Factorio/data/base/graphics/entity/character/level1_running_gun.png
   
I will attach the log together with both the previously failing file and the newly failing file.
3. Reinstallation: For this round of testing I did not reinstall Factorio — I wanted to wait for feedback. Interestingly, the next morning the game started normally without reinstalling.
4. SMART results:
- Drive model: Samsung MZVLQ512HALU-00000
- Health: PASSED
- Percentage used: 4%
- Media and Data Integrity Errors: 0
- Error Information Log Entries: 4447 (all with status "Invalid Field in Command")
Full `smartctl -a` output is available below if needed.
5. Filesystem check: I will run `e2fsck` from a LiveUSB after posting this update.
6. Reproduction:
Besides the intermittent crashes on simple restarts, I have found a more consistent way to trigger it:
  • Play the game for some time.
  • Save.
  • Exit back to the main menu.
  • Leave the game sitting at the menu for a long time (in my case more than an hour).
  • Press "Exit".
  • The next launch is very likely to crash, reporting missing or inaccessible assets.
I am attaching:
  • New `factorio-current.log`
  • The file reported in this crash
  • The file reported in the previous crash
  • Save file from the last session

Code: Select all

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.14.0-28-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       SAMSUNG MZVLQ512HALU-00000
Serial Number:                      S4Y4NF0N458148
Firmware Version:                   FXV7000Q
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 512 110 190 592 [512 GB]
Unallocated NVM Capacity:           0
Controller ID:                      5
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          512 110 190 592 [512 GB]
Namespace 1 Utilization:            43 256 987 648 [43,2 GB]
Namespace 1 Formatted LBA Size:     512
Namespace 1 IEEE EUI-64:            002538 a401c33f21
Local Time is:                      Tue Aug 26 18:28:07 2025 EEST
Firmware Updates (0x16):            3 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x0f):         S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size:         512 Pages
Warning  Comp. Temp. Threshold:     82 Celsius
Critical Comp. Temp. Threshold:     85 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     4.83W       -        -    0  0  0  0        0       0
 1 +     3.54W       -        -    1  1  1  1        0       0
 2 +     3.04W       -        -    2  2  2  2        0     500
 3 -   0.0500W       -        -    3  3  3  3      210    1200
 4 -   0.0050W       -        -    4  4  4  4     1000    9000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        24 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    4%
Data Units Read:                    34 779 849 [17,8 TB]
Data Units Written:                 25 235 144 [12,9 TB]
Host Read Commands:                 349 295 307
Host Write Commands:                299 537 750
Controller Busy Time:               3 356
Power Cycles:                       2 902
Power On Hours:                     1 335
Unsafe Shutdowns:                   149
Media and Data Integrity Errors:    0
Error Information Log Entries:      4 447
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               24 Celsius

Error Information (NVMe Log 0x01, 16 of 64 entries)
Num   ErrCount  SQId   CmdId  Status  PELoc          LBA  NSID    VS  Message
  0       4447     0  0x000c  0x4004      -            0     0     -  Invalid Field in Command

Self-test Log (NVMe Log 0x06)
Self-test status: No self-test in progress
No Self-tests Logged


Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 6:03 pm
by ant-kul
Additional test results

I booted from a LiveUSB and ran a full filesystem check:

sudo e2fsck -f -v -c /dev/nvme0n1p2

Result: FILE SYSTEM WAS MODIFIED (so some inconsistencies were fixed).
No bad blocks were found.

After rebooting back into the system (without reinstalling Factorio), the game started launching again - similar to the previous time.
I will now try to reproduce the issue again using the steps described earlier.

Code: Select all

kubuntu@kubuntu:~$ sudo e2fsck -f -v -c /dev/nvme0n1p2
e2fsck 1.47.0 (5-Feb-2023)
Checking for bad blocks (read-only test): done
/dev/nvme0n1p2: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/nvme0n1p2: ***** FILE SYSTEM WAS MODIFIED *****

      435048 inodes used (1.39%, out of 31244288)
        1145 non-contiguous files (0.3%)
         702 non-contiguous directories (0.2%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 359421/423
     9586327 blocks used (7.67%, out of 124949581)
           0 bad blocks
           1 large file

      315708 regular files
       42563 directories
           0 character device files
           0 block device files
           1 fifo
      116604 links
       76766 symbolic links (75194 fast symbolic links)
           1 socket
------------
      551643 files

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 7:06 pm
by ant-kul
Update
I tried reproducing the issue by simply launching the game and staying in the main menu for about an hour — this time it did not crash afterwards.
There is hope that this was indeed a problem on my side.

Tomorrow after work I will try again with the full sequence:
  • play for a while
  • save
  • return to the main menu
  • wait for ~1h
  • exit
  • restart the game
I will definitely report back with the results.
Hopefully this was just an NVMe / filesystem problem (although it is a bit strange, because on Fedora 42 I had the same crashes with a fresh btrfs setup, while currently I am on ext4).

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Tue Aug 26, 2025 9:56 pm
by eugenekay
ant-kul wrote: Tue Aug 26, 2025 3:37 pm6. Reproduction:
Besides the intermittent crashes on simple restarts, I have found a more consistent way to trigger it:
  • Play the game for some time.
  • Save.
  • Exit back to the main menu.
  • Leave the game sitting at the menu for a long time (in my case more than an hour).
  • Press "Exit".
  • The next launch is very likely to crash, reporting missing or inaccessible assets.
Having inconsistencies in the filesystem is never a good sign - even if they were "repairable", there may be more issues with individual files. If this was my machine I would start by Formatting the disk clean, and/or installing an entirely new Disk. I am very paranoid about data loss, so take that with a grain of salt.

How "busy" is the system during the hour of waiting? Are you closing/opening lots of applications, or is the computer just sitting idle? Can you post the output of free -m ? In particular, I am interested in the size of the "buff/cache" from Before the game is launched, While it is running, After it is closed, Waiting an Hour, and then Before / While when the issue recurs.

My theory is that you have some Memory which is returning Errors and/or is returning incorrect Data (due to lack of ECC) on a subsequent Read. Linux will "cache" files in-memory if possible to avoid re-reading it from a potentially slow HDD/SSD... if the PNG's data is being corrupted somehow, then it makes perfect sense for the decompression to fail due to a bad checksum. The bad cell is probably high-up in the Virtual Address Space, which is why you are not seeing more runtime errors from "often used" bits of Memory, which would result in a Kernel Segfault or similar.

I would suggest running Memtest as a next step to help rule in/out Memory issues.

Good Luck! This is a genuinely interesting failure mode.

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Wed Aug 27, 2025 2:39 am
by pioruns
Looks like hardware error. Could be bad RAM, CPU, motherboard, for example. I am gaming on Linux and never had even one single crash.
OP please check memtest86+, also consider using Btrfs for full filesystem checksumming, to find out what is wrong. Reinstall to Btrfs and stay on it.

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Wed Aug 27, 2025 9:01 am
by ant-kul
Update
I managed to reproduce the crash even without waiting in the main menu.
Afterwards I ran the Steam "Verify integrity of game files" and it reported/fixed 1 file.

At this point it looks like the problem was indeed on my side.
Thank you for the help and the time spent investigating!
I will go ahead and plan to buy a new SSD.

Additional note
Regarding the possibility of faulty RAM: I already ran memtest for ~24 hours earlier — no errors were found.
Even before that, I had a different set of RAM modules installed and the problem still persisted.

This strongly points towards the SSD (and not RAM) as the source of the issue.

Re: [2.0.60][Linux] Crash intermittently on restart after saving

Posted: Wed Aug 27, 2025 9:20 am
by pioruns
Don't rule out CPU and motherboard yet. Could be some electrical issue there, damaging data on PCI-E bus. Maybe test that NVMe SSD in another computer?
Great program for testing data integrity is F3 (Fight Flash Fraud), widely available in Linux repositories. I suggest giving it a go from LiveUSB.
Also if you are buying a new SSD, you could test it before installing system on it.