[Klonan] [0.17.59] Crash during train scheduling tutorial

This subforum contains all the issues which we already resolved.
Lil_Parker
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Jul 25, 2019 11:31 pm
Contact:

[Klonan] [0.17.59] Crash during train scheduling tutorial

Post by Lil_Parker »

Train scheduling mini-tutorial crashes consistently once I complete the "load cargo wagon with inserters step". The crash appears to happen as soon as the objective text for giving the train a schedule appears. I played through the tutorial to that point several times, and the same crash happened each time.

The error:

Code: Select all

Error while running event level::on_tick (ID 0)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316>
Log file:

Code: Select all

   
   0.005 2019-07-25 15:27:03; Factorio 0.17.59 (build 46446, win64, steam)
   0.005 Operating system: Windows 10 (version 1803) 
   0.006 Program arguments: "D:\Games\SteamLibrary\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.006 Read data path: D:/Games/SteamLibrary/steamapps/common/Factorio/data
   0.006 Write data path: C:/Users/Nameless/AppData/Roaming/Factorio [16391/120624MB]
   0.006 Binaries path: D:/Games/SteamLibrary/steamapps/common/Factorio/bin
   0.031 System info: [CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 4 cores, RAM: 2569/8063 MB, page: 4093/11108 MB, virtual: 4330/134217727 MB, extended virtual: 0 MB]
   0.031 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: 0000] [Lang: en]
   0.146 Available displays: 2
   0.146  [1]: \\.\DISPLAY2 - Intel(R) HD Graphics 520 {0x05, [0,0], 1920x1080, 32bit, 60Hz}
   0.146  [0]: \\.\DISPLAY1 - Intel(R) HD Graphics 520 {0x01, [-1920,0], 1920x1080, 32bit, 60Hz}
   0.250 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.351 Initialised Direct3D[0]: Intel(R) HD Graphics 520; id: 8086-1916; driver: igdumdim64.dll 23.20.16.4973
   0.351   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
   0.351   [Local Video Memory] Budget: 3628MB, CurrentUsage: 0MB, Reservation: 0/1915MB
   0.352   [Non-Local Vid.Mem.] Budget: 0MB, CurrentUsage: 0MB, Reservation: 0/0MB
   0.352   Tiled resources: Tier 2
   0.352   Unified Memory Architecture: Yes
   0.352   BGR 565 Supported: Yes
   0.352   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.432 Desktop composition is active.
   0.432 Graphics settings preset: integrated-gpuhigh
   0.432   Dedicated video memory size 128 MB
   0.432 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 25%] [DXT: low-quality]
   0.432                   [Max load threads: 32] [Max texture size: 8192] [Tex.Stream.: 0] [Rotation quality: low] [Color: 32bit]
   0.483 DSound: Starting _dsound_update thread
   0.484 DSound: Enter _dsound_update; tid=18096
   0.746 Loading mod core 0.0.0 (data.lua)
   1.063 Loading mod base 0.17.59 (data.lua)
   2.152 Loading mod base 0.17.59 (data-updates.lua)
   2.327 Checksum for core: 4010759179
   2.327 Checksum of base: 1508776376
   2.859 Loading sounds...
  10.248 Info PlayerData.cpp:69: Local player-data.json unavailable
  10.248 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1563927314
  10.702 Crop bitmaps.
  73.454 Parallel Sprite Loader initialized (threads: 3)
  89.087 Initial atlas bitmap size is 8192
  89.109 Created atlas bitmap 8192x8188 [none]
  89.131 Created atlas bitmap 8192x8176 [none]
  89.145 Created atlas bitmap 8192x8176 [none]
  89.156 Created atlas bitmap 8192x8176 [none]
  89.170 Created atlas bitmap 8192x8192 [none]
  89.196 Created atlas bitmap 8192x8180 [none]
  89.197 Created atlas bitmap 8192x1396 [none]
  89.197 Created atlas bitmap 8192x3892 [decal]
  89.198 Created atlas bitmap 8192x8160 [low-object, linear-minification]
  89.198 Created atlas bitmap 8192x3760 [mipmap, linear-minification, linear-magnification, linear-mip-level]
  89.202 Created atlas bitmap 8192x7920 [terrain, mipmap, linear-minification, linear-mip-level]
  89.202 Created atlas bitmap 8192x5952 [terrain, mipmap, linear-minification, linear-mip-level]
  89.202 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
  89.203 Created atlas bitmap 4096x1712 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
  89.203 Created atlas bitmap 2048x192 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
  89.203 Created atlas bitmap 8192x1496 [alpha-mask]
  89.206 Created atlas bitmap 8192x6420 [shadow, linear-magnification, alpha-mask]
  89.206 Created atlas bitmap 4096x1328 [shadow, mipmap, linear-magnification, alpha-mask]
  89.240 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
  90.015 Parallel Sprite Loader initialized (threads: 3)
 106.116 Sprites loaded
 106.248 Generated mipmaps (4) for atlas [8] of size 8192x8160   
 106.290 Generated mipmaps (3) for atlas [9] of size 8192x3760   
 106.374 Generated mipmaps (3) for atlas [10] of size 8192x7920   
 106.439 Generated mipmaps (3) for atlas [11] of size 8192x5952   
 106.451 Generated mipmaps (3) for atlas [12] of size 4096x1600   
 106.461 Generated mipmaps (4) for atlas [13] of size 4096x1712   
 106.480 Generated mipmaps (3) for atlas [17] of size 4096x1328   
 106.481 Custom mipmaps uploaded.
 107.693 Factorio initialised
 168.865 Loading map C:\Users\Nameless\AppData\Roaming\Factorio\saves\Main.zip: 4828682 bytes.
 169.232 Loading level.dat: 8397088 bytes.
 169.236 Info Scenario.cpp:187: Map version 0.17.58-0
 170.306 Loading script.dat: 328 bytes.
 170.343 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 121915481
 392.099 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
 393.010 Info AppManagerStates.cpp:1754: Saving finished
 790.315 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
 790.918 Info AppManagerStates.cpp:1754: Saving finished
1094.949 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
1095.592 Info AppManagerStates.cpp:1754: Saving finished
1400.515 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
1401.084 Info AppManagerStates.cpp:1754: Saving finished
1701.083 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
1701.659 Info AppManagerStates.cpp:1754: Saving finished
2024.149 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
2024.700 Info AppManagerStates.cpp:1754: Saving finished
2403.325 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
2403.947 Info AppManagerStates.cpp:1754: Saving finished
2629.695 Supending game state
2629.695 Entering tutorial: [base]trains-basics
2630.566 Loading level.dat: 564571 bytes.
2630.566 Info Scenario.cpp:187: Map version 0.17.32-1
2630.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
2630.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
2630.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
2630.695 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2283320661
2630.696 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
2630.701 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
2630.704 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
2630.706 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
2630.709 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
2630.829 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2283320661
2801.670 Resuming game state
2899.449 Info AppManager.cpp:287: Saving to _autosave3 (blocking).
2900.028 Info AppManagerStates.cpp:1754: Saving finished
3000.280 Unlocked achievement "eco-unfriendly"
3212.641 Supending game state
3212.641 Entering tutorial: [base]trains-stations
3213.599 Loading level.dat: 564571 bytes.
3213.599 Info Scenario.cpp:187: Map version 0.17.32-1
3213.602 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
3213.602 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
3213.602 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
3213.704 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3213.704 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
3213.706 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
3213.707 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
3213.708 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
3213.710 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
3213.861 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3262.884 Error MainLoop.cpp:1223: Exception at tick 3304: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_player_changed_position (ID 81)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316
3269.328 Resuming game state
3270.424 Supending game state
3270.424 Entering tutorial: [base]trains-stations
3270.565 Loading level.dat: 564571 bytes.
3270.566 Info Scenario.cpp:187: Map version 0.17.32-1
3270.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
3270.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
3270.569 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
3270.671 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3270.672 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
3270.673 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
3270.675 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
3270.676 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
3270.678 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
3270.827 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3310.791 Error MainLoop.cpp:1223: Exception at tick 2771: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_tick (ID 0)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316
3320.503 Resuming game state
3386.558 Supending game state
3386.558 Entering tutorial: [base]trains-stations
3386.704 Loading level.dat: 564571 bytes.
3386.705 Info Scenario.cpp:187: Map version 0.17.32-1
3386.708 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
3386.708 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
3386.708 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
3386.813 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3386.813 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
3386.815 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
3386.816 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
3386.818 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
3386.819 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
3386.965 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3420.334 Error MainLoop.cpp:1223: Exception at tick 2395: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_tick (ID 0)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316
3423.010 Resuming game state
3513.294 Supending game state
3513.295 Entering tutorial: [base]trains-stations
3513.449 Loading level.dat: 564571 bytes.
3513.450 Info Scenario.cpp:187: Map version 0.17.32-1
3513.453 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
3513.453 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
3513.453 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
3513.553 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3513.554 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
3513.555 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
3513.556 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
3513.558 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
3513.559 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
3513.706 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
3544.234 Error MainLoop.cpp:1223: Exception at tick 2224: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_tick (ID 0)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316
4163.504 Resuming game state
4164.575 Supending game state
4164.575 Entering tutorial: [base]trains-stations
4164.722 Loading level.dat: 564571 bytes.
4164.723 Info Scenario.cpp:187: Map version 0.17.32-1
4164.726 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-27_Factorio_0.17.35.json
4164.726 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-04-30_Factorio_0.17.35.json
4164.726 Info PrototypeMigrationList.cpp:61: Activating migration base/2019-05-01_Factorio_0.17.35.json
4164.833 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
4164.834 Applying migration: Base Mod: 2019-05-10_Factorio_0.17.38.lua
4164.835 Applying migration: Base Mod: 2019-05-14_Factorio_0.17.39.lua
4164.837 Applying migration: Base Mod: 2019-05-17_Factorio_0.17.41.lua
4164.838 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.53.lua
4164.839 Applying migration: Base Mod: 2019-06-28_Factorio_0.17.54.lua
4164.988 Checksum for script C:/Users/Nameless/AppData/Roaming/Factorio/temp/currently-playing-tutorial/control.lua: 2512386534
4194.418 Error MainLoop.cpp:1223: Exception at tick 2158: The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_tick (ID 0)
...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: attempt to index local 'record' (a nil value)
stack traceback:
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:214: in function 'condition'
	__core__/lualib/story.lua:103: in function 'story_update'
	...ing/Factorio/temp/currently-playing-tutorial/control.lua:317: in function <...ing/Factorio/temp/currently-playing-tutorial/control.lua:316

Update:

I have found that the crash can be prevented by putting a station in the schedule before the instructions to do so. After looking at the scenario script it seems that there probably just needs to be a check to see if there's anything in the schedule before it's accessed by the script.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5304
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Klonan] [0.17.59] Crash during train scheduling tutorial

Post by Klonan »

Thank you for the report,

It is fixed for the next release
Ringk
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Nov 17, 2018 1:29 pm
Contact:

Re: [Klonan] [0.17.59] Crash during train scheduling tutorial

Post by Ringk »

Came to report this,

Thanks for the workaround for now.
frontrunner4000
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jul 28, 2019 7:44 pm
Contact:

Re: [Klonan] [0.17.59] Crash during train scheduling tutorial

Post by frontrunner4000 »

I came to report this as well, it was a bit odd to not find the report in the tutorial section, but I know how quickly the dev team fixes bugs so I figured I'd look here. Thanks for the workaround @Lil_parker
robot256
Smart Inserter
Smart Inserter
Posts: 1018
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [Klonan] [0.17.59] Crash during train scheduling tutorial

Post by robot256 »

Klonan, is this the bug I just found where the following code causes an error when train has no stops in its schedule?

Code: Select all

local temp = train.schedule  -- returns {current=1,records={}}
train.schedule = temp        -- throws index out of bounds error
If it's different I'll post another report, but looks like you might have fixed it already.
Post Reply

Return to “Resolved Problems and Bugs”