[Rseding91] [0.17.76] Crash on running /c game.reload_script()

This subforum contains all the issues which we already resolved.
Post Reply
Hornwitser
Fast Inserter
Fast Inserter
Posts: 205
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

[Rseding91] [0.17.76] Crash on running /c game.reload_script()

Post by Hornwitser »

Running /c game.reload_script() on a dedicated server started with --start-server-load-scenario with no players online and auto_pause configured to false causes the server to crash. See the attached log. The documentation for reload_script is also incredibly vague stating only "Forces a reload of the scenario script from the original scenario location. " On a dedicated server this is not true, it reloads the script files from write-dir/temp/currently-playing.
Attachments
factorio-current.log
(6.85 KiB) Downloaded 66 times

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.76] Crash on running /c game.reload_script()

Post by TruePikachu »

Code: Select all

  15.438 <server> ran command: game.reload_script()
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xb47618, 0xd2ca5d, 0x9fe3c9, 0xa1471f, 0xafafef, 0xafb245, 0xbae30f, 0xc8981c, 0xd425c0, 0xff268e, 0xff2d02, 0x1012227, 0x1012bcb, 0x534ed5, 0, 0x5463be
  26.959 Warning Logger.cpp:518: Symbols.size() == 20, usedSize == 15
#0  0x0000000000d2ca5d in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x00000000009fe3c9 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x0000000000a1471f in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x0000000000afafef in Logger::flush() at /tmp/factorio-build-H2OGQu/src/Util/Logger.cpp:558
#4  0x0000000000afb245 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-H2OGQu/src/Util/Logger.cpp:544
#5  0x0000000000bae30f in Logging::flush() at /tmp/factorio-build-H2OGQu/src/Util/Logging.cpp:69
#6  0x0000000000c8981c in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-H2OGQu/src/Util/Logging.cpp:103
#7  0x0000000000d425c0 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-H2OGQu/src/Util/Logging.cpp:93
#8  0x0000000000ff268e in TickClosure::add(InputAction&&) [clone .part.70341] at /tmp/factorio-build-H2OGQu/src/Net/TickClosure.cpp:92
#9  0x0000000000ff2d02 in InputActionSegmenter::moveCurrentToClosure(TickClosure&) at /usr/include/c++/8/bits/deque.tcc:570
#10 0x0000000001012227 in NetworkInputListener::tryToSendNextTickClosure(unsigned char) at /tmp/factorio-build-H2OGQu/src/Net/NetworkInputListener.cpp:83
#11 0x0000000001012bcb in ServerMultiplayerManager::updateMultiplayerInputInternal() at /tmp/factorio-build-H2OGQu/src/Net/ServerMultiplayerManager.cpp:724
#12 0x0000000000534ed5 in MultiplayerManagerBase::updateMultiplayerInput() at /tmp/factorio-build-H2OGQu/src/Net/MultiplayerManagerBase.cpp:181
#13 (nil) in MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode) at /tmp/factorio-build-H2OGQu/src/MainLoop.cpp:1145
#14 0x00000000005463be in MainLoop::gameUpdateLoop(MainLoop::HeavyMode) at /tmp/factorio-build-H2OGQu/src/MainLoop.cpp:1032
#15 (nil) in MainLoop::mainLoopStepHeadless(MainLoop::HeavyMode) at /tmp/factorio-build-H2OGQu/src/MainLoop.cpp:566
#16 0x000000000000002f in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) at /tmp/factorio-build-H2OGQu/src/MainLoop.cpp:372
#17 0x0000000000000004 in main at /tmp/factorio-build-H2OGQu/src/Main.cpp:945 (discriminator 4)
#18 0x0000000003726020 in ?? at ??:0
#19 0x0000000000000060 in _start at ??:?
Stack trace logging done

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.17.76] Crash on running /c game.reload_script()

Post by Rseding91 »

Thanks for the report. The crash is now fixed for the next version of 0.17. What you're saying about not loading in the new scripts I don't know. Looking at the logic it should load in from the same places that single player does. Maybe you put them in the wrong folders?
If you want to get ahold of me I'm almost always on Discord.

Hornwitser
Fast Inserter
Fast Inserter
Posts: 205
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Re: [Rseding91] [0.17.76] Crash on running /c game.reload_script()

Post by Hornwitser »

If I put them in the wrong folder please tell me what folder I'm supposed to put them in. These are the steps I've done on Linux:

Code: Select all

# In the factorio headless folder.
mkdir -p scenarios/broken/
echo "print('======== original')" > scenarios/broken/control.lua
bin/x64/factorio --start-server-load-scenario broken
# Ctrl+Z after it loads
echo "print('======== modified')" > scenarios/broken/control.lua
fg
/c game.reload_script()
# prints ======== original

Post Reply

Return to “Resolved Problems and Bugs”