[1.1.8] Crash using new train UI (Train::getStateDescription)

This subforum contains all the issues which we already resolved.
xep01
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Mar 01, 2019 6:35 pm
Contact:

[1.1.8] Crash using new train UI (Train::getStateDescription)

Post by xep01 »

Using the new train UI, selecting one set of trains consistently causes a crash.

Steps to reproduce.
* Load attached save.
* Open Train UI.
* Select the "Pod Reload -> Pod [73]" set of trains.
* Crash.
Attachments
CrashLogs.zip
(36.4 MiB) Downloaded 186 times
Loewchen
Global Moderator
Global Moderator
Posts: 9242
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.8] Crash when using new train UI

Post by Loewchen »

Code: Select all

   0.015 2021-01-07 14:42:58; Factorio 1.1.8 (build 57537, win64, full)
   0.015 Operating system: Windows 10 (version 1909) 
   0.016 Program arguments: "L:\Joe\OneDrive\Games\Factorio\bin\x64\factorio.exe" 
   0.016 Read data path: L:/Joe/OneDrive/Games/Factorio/data
   0.016 Write data path: L:/Joe/OneDrive/Games/Factorio [526188/610377MB]
   0.016 Binaries path: L:/Joe/OneDrive/Games/Factorio/bin
   0.023 System info: [CPU: AMD Ryzen 7 2700X Eight-Core Processor, 16 cores, RAM: 5976/16328 MB, page: 11393/29972 MB, virtual: 4255/134217727 MB, extended virtual: 0 MB]
   0.023 Display options: [FullScreen: 0] [VSync: 1] [UIScale: custom (75.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.027 Available displays: 2
   0.027  [0]: \\.\DISPLAY2 - NVIDIA GeForce RTX 2060 {0x80005, [0,0], 1920x1080, 32bit, 144Hz}
   0.028  [1]: \\.\DISPLAY3 - NVIDIA GeForce RTX 2060 {0x80001, [-1920,0], 1920x1080, 32bit, 60Hz}
   0.090 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.253 Initialised Direct3D[0]: NVIDIA GeForce RTX 2060; id: 10de-1f08; driver: nvldumdx.dll 26.21.14.4250
   0.253   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
   0.253   [Local Video Memory] Budget: 5083MB, CurrentUsage: 4MB, Reservation: 0/2691MB
   0.253   [Non-Local Vid.Mem.] Budget: 7347MB, CurrentUsage: 0MB, Reservation: 0/3877MB
   0.253   Tiled resources: Tier 2
   0.253   Unified Memory Architecture: No
   0.253   BGR 565 Supported: Yes
   0.253   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.253 Graphics settings preset: very-high
   0.253   Dedicated video memory size 5980 MB
   0.297 Desktop composition is active.
   0.297 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 100%] [DXT: high-quality] [Color: 32bit]
   0.297                   [Max threads (load/render): 32/16] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDCWT] [B:0,C:0,S:100]
   0.379 DSound: Starting _dsound_update thread
   0.379 [Audio] Backend:default; Depth:16, Channel:2, Frequency:44100; MixerQuality:linear
   0.380 DSound: Enter _dsound_update; tid=22444
   0.521 Loading mod settings calculator-ui 1.1.1 (settings.lua)
   0.523 Loading mod core 0.0.0 (data.lua)
   0.619 Loading mod base 1.1.8 (data.lua)
   0.937 Loading mod calculator-ui 1.1.1 (data.lua)
   1.104 Loading mod base 1.1.8 (data-updates.lua)
   1.282 Checksum for core: 2245420583
   1.282 Checksum of base: 1287547015
   1.282 Checksum of calculator-ui: 1012418323
   1.488 Prototype list checksum: 699742100
   1.549 Loading sounds...
   1.700 Info PlayerData.cpp:70: Local player-data.json available, timestamp 1610048390
   1.700 Info PlayerData.cpp:77: Cloud player-data.json unavailable
   1.845 Initial atlas bitmap size is 16384
   1.883 Created atlas bitmap 16384x16356 [none]
   1.887 Created atlas bitmap 16384x13064 [none]
   1.888 Created atlas bitmap 8192x4188 [decal]
   1.889 Created atlas bitmap 16384x5568 [low-object]
   1.890 Created atlas bitmap 8192x4432 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.891 Created atlas bitmap 16384x6064 [terrain, mipmap, linear-minification, linear-mip-level]
   1.891 Created atlas bitmap 4096x3216 [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   1.891 Created atlas bitmap 4096x1856 [smoke, mipmap, linear-minification, linear-magnification]
   1.892 Created atlas bitmap 4096x3088 [mipmap]
   1.892 Created atlas bitmap 8192x2240 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.893 Created atlas bitmap 8192x1496 [alpha-mask]
   1.896 Created atlas bitmap 16384x14764 [shadow, linear-magnification, alpha-mask]
   1.896 Created atlas bitmap 8192x2336 [shadow, mipmap, linear-magnification, alpha-mask]
   1.896 Created atlas bitmap 2048x240 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   1.902 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   2.827 Parallel Sprite Loader initialized (threads: 13)
  10.175 Sprites loaded
  10.209 Generated mipmaps (4) for atlas [3] of size 16384x5568   
  10.221 Generated mipmaps (3) for atlas [4] of size 8192x4432   
  10.243 Generated mipmaps (3) for atlas [5] of size 16384x6064   
  10.254 Generated mipmaps (3) for atlas [6] of size 4096x3216   
  10.265 Generated mipmaps (3) for atlas [7] of size 4096x1856   
  10.306 Generated mipmaps (3) for atlas [8] of size 4096x3088   
  10.317 Generated mipmaps (5) for atlas [9] of size 8192x2240   
  10.329 Generated mipmaps (3) for atlas [12] of size 8192x2336   
  10.346 Custom mipmaps uploaded.
  10.355 Custom inputs active: 1
  10.622 Factorio initialised
  10.670 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=xep01&token=<private>&apiVersion=2
  10.967 0 packages available to download (experimental updates enabled).
  28.340 Loading map L:\Joe\OneDrive\Games\Factorio\saves\November2020 1.1.zip: 38351106 bytes.
  28.406 Loading level.dat: 95917032 bytes.
  28.411 Info Scenario.cpp:196: Map version 1.1.6-4
  31.386 Loading script.dat: 518 bytes.
  31.389 Checksum for script L:/Joe/OneDrive/Games/Factorio/temp/currently-playing/control.lua: 2929504738
  31.391 Checksum for script __calculator-ui__/control.lua: 3462135112
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-build-pwdusy\src\rail\train.cpp (526): Train::getStateDescription
c:\cygwin64\tmp\factorio-build-pwdusy\src\gui\trainwithminimap.cpp (112): TrainWithMinimap::updateStatusButton
c:\cygwin64\tmp\factorio-build-pwdusy\src\gui\trainwithminimap.cpp (30): TrainWithMinimap::TrainWithMinimap
c:\cygwin64\tmp\factorio-build-pwdusy\src\gui\trainswidget.cpp (84): TrainsWidget::updateTrainList
c:\cygwin64\tmp\factorio-build-pwdusy\src\gui\trainswidget.cpp (134): TrainsWidget::setScheduleFilter
c:\cygwin64\tmp\factorio-build-pwdusy\src\gui\trainsgui.cpp (70): TrainsGui::onItemSelect
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\widget\widget.cpp (1174): agui::Widget::dispatchItemSelected
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\widget\button.cpp (46): agui::Button::handleToggleClick
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\widget\button.cpp (123): agui::Button::mouseClick
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\widget\widget.cpp (1311): agui::Widget::dispatchMouseClick
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\gui.cpp (285): agui::Gui::handleMouseUp
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\gui.cpp (929): agui::Gui::_dispatchMouseEvents
c:\cygwin64\tmp\factorio-build-pwdusy\libraries\agui\gui.cpp (786): agui::Gui::logic
c:\cygwin64\tmp\factorio-build-pwdusy\src\globalcontext.cpp (1448): GlobalContext::updateGui
c:\cygwin64\tmp\factorio-build-pwdusy\src\mainloop.cpp (986): MainLoop::processEvent
c:\cygwin64\tmp\factorio-build-pwdusy\src\mainloop.cpp (750): MainLoop::processAllegroEvents
c:\cygwin64\tmp\factorio-build-pwdusy\src\mainloop.cpp (575): MainLoop::prePrepare
c:\cygwin64\tmp\factorio-build-pwdusy\src\mainloop.cpp (663): MainLoop::mainLoopStep
c:\cygwin64\tmp\factorio-build-pwdusy\src\mainloop.cpp (392): MainLoop::run
c:\cygwin64\tmp\factorio-build-pwdusy\src\main.cpp (1141): wmain
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAECC47C24)
00007FFAECC47C24 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFAEEB6D4D1)
00007FFAEEB6D4D1 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  55.825 Error Train.cpp:526: train has some unhandled state
Logger::writeStacktrace skipped.
  55.825 Error CrashHandler.cpp:189: Map tick at moment of crash: 27982096
  55.825 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
 128.979 Uploading log file
 129.035 Error CrashHandler.cpp:258: Heap validation: success.
 129.036 Creating crash dump.
 129.212 CrashDump success
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5281
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Klonan] [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by Klonan »

The trains over here have some strange state, they say they are active and waiting at a station, when clearly they are on a piece of rail with no path

How did you set up these trains? did you use some blueprints, or a mod, or console command?
Do you know how to get trains in to this state from a fresh save game?

If you want to keep playing (understandable) set all these pod train to manual mode, and the GUI should not crash
Attachments
factorio-run_2021-01-07_21-25-43.png
factorio-run_2021-01-07_21-25-43.png (934.65 KiB) Viewed 5334 times
xep01
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Mar 01, 2019 6:35 pm
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by xep01 »

Please forgive my monstrosity of a factory :) Those trains were intentionally routed to stations which I immediately deleted. I built an excess of those trains unintentionally and am slowly reincorporating them into the stock of available trains as necessary.
BentheMuffin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun May 24, 2015 8:05 pm
Contact:

[1.1.8] Crash when changing name of train stop

Post by BentheMuffin »

1. Tell a train to path to a station.
2. Once the train is stopped remove the station.
3. Place a new station a few tiles forward on the track.
4. Change the name on the new station to match the old station name and the game crashes.

I am able to reproduce this 100% of the time in a test world I made.

I've attached the logs and a video of me causing the crash.
https://drive.google.com/file/d/1tR299F ... sp=sharing
Attachments
factorio-dump-current.dmp
(728.73 KiB) Downloaded 111 times
factorio-current.log
(7.91 KiB) Downloaded 132 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3025
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by boskid »

Ok i fixed the train behavior a little for 1.1.9: when a train stop is destroyed while a train is stopped at it, since the departure was not fulfilled i decided it should go to another train stop under the same station name (retry the same schedule record), just as it would not yet arrive to this train stop in the first place.

This behavior is far better than letting train to get stuck if it would have for example a circuit condition and biter would come destroy the train stop - when the train stop would be rebuilt by a construction bot, train would not be able to leave because it would not get any circuit network signals because of the new train stop not binding to the train.

It also fixes the crash by not letting the train to enter this weird state for which there was no good state description generated.
Prezesik11
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jan 11, 2021 2:46 pm
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by Prezesik11 »

When deleting station with train on that station opening trains tab crashes game
1. Delete station when scheluded train is standing on that station
2. Open trains Tab
3. Crash
Attachments
factorio-current.log
(281.66 KiB) Downloaded 120 times
maxcreeger
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jun 21, 2018 9:36 pm
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by maxcreeger »

Hello dear devs,
I have a very similar crash & same stack trace as BentheMuffin above
I remember clicking on a station from map view, although I don't know which train or station to reproduce. Then game crashed to desktop.
Here are the logs & dmp if it helps. Sorry the save file is rather large (84MB).
I don't recall deleting much Train stations, my station creation process is quite streamlined now.
Hope this helps!
Attachments
factorio-dump-current - Copy.dmp
(655.88 KiB) Downloaded 104 times
factorio-current - Copy.log
(8.28 KiB) Downloaded 116 times
Stevetrov
Fast Inserter
Fast Inserter
Posts: 127
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by Stevetrov »

You can fix the state by stopping and starting effected trains.

Put all stationary trains into manual
/c for _,ent in pairs (game.player.force.get_trains()) do if ent.speed == 0 then ent.manual_mode = true end end

Put all manual_mode trains into auto.

/c for _,ent in pairs (game.player.force.get_trains()) do if ent.manual_mode == true then ent.manual_mode = false end end

This may have some undesirable effects make a save first and check b4 overwriting yr save.
Last edited by Stevetrov on Tue Jan 12, 2021 9:17 pm, edited 1 time in total.
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by darklich14 »

Code tags for civilized people (and fixed unclosed iterator):

Code: Select all

/c
for _,ent in pairs (game.player.force.get_trains()) do
if ent.speed == 0 then
ent.manual_mode = true
end
end

Code: Select all

/c for _,ent in pairs (game.player.force.get_trains()) do
if ent.manual_mode == true
then ent.manual_mode = false
end
end
Last edited by darklich14 on Tue Jan 12, 2021 9:15 pm, edited 1 time in total.
Stevetrov
Fast Inserter
Fast Inserter
Posts: 127
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by Stevetrov »

darklich14 wrote: Tue Jan 12, 2021 9:14 pm Code tags for civilized people:

Code: Select all

/c
for _,ent in pairs (game.player.force.get_trains()) do
if ent.speed == 0 then
ent.manual_mode = true
end

Code: Select all

/c for _,ent in pairs (game.player.force.get_trains()) do
if ent.manual_mode == true
then ent.manual_mode = false
end
end
you call yourself civilized??? where is your indentation?
R4m80
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue May 02, 2017 3:47 pm
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by R4m80 »

Code: Select all

/c
for _,ent in pairs (game.player.force.get_trains()) do
	if ent.speed == 0 and ent.manual_mode == false then
		ent.manual_mode = true
		ent.manual_mode = false
	end
end
worked for me and is only one copy/pasta
darklich14
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Sat Feb 24, 2018 3:07 am
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by darklich14 »

Thank you, doubly civilized factorian
R4m80 wrote: Tue Jan 12, 2021 9:27 pm

Code: Select all

/c
for _,ent in pairs (game.player.force.get_trains()) do
	if ent.speed == 0 and ent.manual_mode == false then
		ent.manual_mode = true
		ent.manual_mode = false
	end
end
worked for me and is only one copy/pasta
mystmaze
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Jan 14, 2021 2:24 am
Contact:

Re: [1.1.8] Crash using new train UI (Train::getStateDescription)

Post by mystmaze »

Those commands fixed the same issue I was seeing while cleaning up my base.
Post Reply

Return to “Resolved Problems and Bugs”