[0.15.0] Crash if system clock changed

This subforum contains all the issues which we already resolved.
MNGrrl
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Oct 31, 2017 5:53 pm
Contact:

[0.15.0] Crash if system clock changed

Post by MNGrrl »

Steps to reproduce:
Set time backwards by one second or more. Game will freeze until time is greater than previous value. I can reliably reproduce this behavior.

Details:
Windows will update the time once a week; Typically the new value is +/- 3 seconds of the previous for most systems. Low impact, not likely to be noticed by player.

Solution:
I would use the win32 GetTickCount() function instead of using the system timestamp. Without looking at the Factorio code I couldn't say how easy it would be to refactor.

Code: Select all

   0.002 2017-10-31 13:05:04; Factorio 0.15.0 (build 29027, win64, alpha)
   0.002 Operating system: Windows 8.1 
   0.002 Program arguments: "C:\Games\Factorio.v0.15.0\bin\x64\factorio.exe" 
   0.002 Read data path: C:/Games/Factorio.v0.15.0/data
   0.002 Write data path: C:/Games/Factorio.v0.15.0
   0.002 Binaries path: C:/Games/Factorio.v0.15.0/bin
   0.013 System info: [CPU:        Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz, 4 cores, RAM: 24466MB]
   0.013 Display options: [FullScreen: 0] [VSync: 0] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
   0.015 Available display adapters: 2
   0.015  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 960 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.015  [1]: \\.\DISPLAY2 - NVIDIA GeForce GTX 960 {0x01, [1920,-432], 1080x1920, 32bit, 60Hz}
   0.016 Create display on adapter 0. Size 1280x720 at position [310, 162].
   0.552 Initialised Direct3D:[0] NVIDIA GeForce GTX 960; driver: nvd3dumx.dll 21.21.13.7653
   0.555     Video memory size (dedicated video/dedicated system/shared system/available): 1921/0/12233/4092 MB
   0.626 DSound: Starting _dsound_update thread
   0.626 DSound: Enter _dsound_update; tid=3872
   0.626 Device reset internal.
   0.629 Desktop composition is active.
   0.629 Graphics options: [Graphics quality: high] [Video memory usage: high] [Light scale: 25%] [DXT: auto]
   0.689 Loading mod core 0.0.0 (data.lua)
   0.699 Loading mod base 0.15.0 (data.lua)
   0.835 Loading mod base 0.15.0 (data-updates.lua)
   0.914 Checksum for core: 3378387764
   0.914 Checksum of base: 2731413614
   1.059 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1509441616
   1.059 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   1.170 Loaded shader file C:/Games/Factorio/data/core/graphics/shaders/game.cso
   1.170 Loaded shader file C:/Games/Factorio/data/core/graphics/shaders/zoom-to-world.cso
   1.185 Initial atlas bitmap size is 16384
   1.188 Created atlas bitmap 16384x14211
   1.302 Created atlas bitmap 4096x4092
   1.351 Created atlas bitmap 4096x4088
   1.365 Created atlas bitmap 4096x4088
   1.379 Created atlas bitmap 4096x4076
   1.393 Created atlas bitmap 4096x3992
   1.408 Created atlas bitmap 4096x4084
   1.414 Created atlas bitmap 4096x1964
   1.734 Created atlas bitmap 4096x3980
   1.767 Created atlas bitmap 4096x3648
  17.509 Sprites loaded
  17.509 Convert atlas 4096x4092 to: compressed 
  18.395 Convert atlas 4096x4088 to: compressed 
  19.050 Convert atlas 4096x4088 to: compressed 
  19.656 Convert atlas 4096x4076 to: compressed 
  20.178 Convert atlas 4096x3992 to: compressed 
  20.821 Convert atlas 4096x4084 to: compressed 
  21.514 Convert atlas 4096x1964 to: compressed 
  21.834 Convert atlas 4096x3980 to: trilinear-filtering 
  21.896 Convert atlas 4096x3648 to: mipmap 
  23.642 Loading sounds...
  25.970 Custom inputs active: 0
  26.011 Factorio initialised
  29.636 Loading map C:\Games\Factorio.v0.15.0\saves\_autosave2.zip: 6006730 bytes.
  29.664 Loading Level.dat: 13616918 bytes.
  29.667 Info Scenario.cpp:133: Map version 0.15.0-99
  30.042 Loading script.dat: 190 bytes.
  30.045 Checksum for script C:/Games/Factorio/temp/currently-playing/control.lua: 1622069129
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: [0.15.0] Crash if system clock changed

Post by impetus maximus »

disable the service. problem solved.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16032
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.0] Crash if system clock changed

Post by Rseding91 »

It looks like it's actually fixed for 0.16. In an update to the compiler we use on Windows they fixed the bug in the code that caused this. So it's fixed for 0.16 :)
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”