Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run(linux nogui with xvfb+virtualgl) after 1.1.36 update. #16

Open
compcj opened this issue Jul 17, 2021 · 4 comments
Open

Failed to run(linux nogui with xvfb+virtualgl) after 1.1.36 update. #16

compcj opened this issue Jul 17, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@compcj
Copy link

compcj commented Jul 17, 2021

Worked perfectly previously with 1.1.35 version, linux nogui with xvfb+virtualgl.
Using mapshot CLI mode.
It breaks after 1.1.36 update, settings unchanged, factorio mods unchanged, only factorio binaries and data folder replaced.

Additional Info:
Bio_Industries 1.1.10 was the last mod to load settings in normal startup sequence(w/o mapshot).
Seems after loading all mod settings factorio crashes.
Tried starting factorio 1.1.36 version with all original settings and mods in xvfb+virtualgl environment and no mapshot mod, it would start successfully.

mapshot version 0.0.13(latest)

Crash Log:


/* success log lines omitted */

0.877 Loading mod settings Bio_Industries 1.1.10 (settings.lua)
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xd30617, 0xf0e88d, 0xb37939, 0xb603dc, 0xfb346f, 0xfb37ee, 0x19796b0, 0x8b125a, 0x10ca216, 0x10ca3b8, 0x111dfd5, 0x132148c, 0x133b0b9, 0x5c7051, 0, 0x5d743e
14.864 Warning Logger.cpp:526: Symbols.size() == 24, usedSize == 15
#0 0x0000000000f0e88d in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete >::_M_ptr() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:154
#1 0x0000000000b37939 in std::unique_ptr<LoggerFileWriteStream, std::default_delete >::get() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:353
#2 0x0000000000b603dc in std::unique_ptr<LoggerFileWriteStream, std::default_delete >::operator->() const at /home/build/gcc-9.2/include/c++/9.2.0/bits/unique_ptr.h:347
#3 0x0000000000fb346f in Logger::flush() at /tmp/factorio-build-Wo8XA6/src/Util/Logger.cpp:566
#4 0x0000000000fb37ee in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-Wo8XA6/src/Util/Logger.cpp:552
#5 0x00000000019796b0 in Logging::flush() at /tmp/factorio-build-Wo8XA6/src/Util/Logging.cpp:69
#6 0x00000000008b125a in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) at /tmp/factorio-build-Wo8XA6/src/Util/Logging.cpp:103
#7 0x00000000010ca216 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-Wo8XA6/src/Util/Logging.cpp:93
#8 0x00000000010ca3b8 in ModManager::getActiveValidRequiredMod(std::basic_string_view<char, std::char_traits >) at /tmp/factorio-build-Wo8XA6/src/Data/ModManager.cpp:1286
#9 0x000000000111dfd5 in ModSettingPrototype::ModSettingPrototype(PropertyTree const&, ModSettingType, char const*) at /tmp/factorio-build-Wo8XA6/src/Data/ModSettings/ModSettingPrototype.cpp:12
#10 0x000000000132148c in BoolSettingPrototype::BoolSettingPrototype(PropertyTree const&, char const*) at /tmp/factorio-build-Wo8XA6/src/Data/ModSettings/BoolSettingPrototype.cpp:13
#11 0x000000000133b0b9 in BoolSettingPrototype::load(PropertyTree const&) at /tmp/factorio-build-Wo8XA6/src/Data/ModSettings/BoolSettingPrototype.cpp:45
#12 0x00000000005c7051 in PrototypeList::executeLoader(ModSettingPrototype* (*)(PropertyTree const&), PropertyTree const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) at /tmp/factorio-build-Wo8XA6/src/ID/PrototypeList.cpp:30
#13 (nil) in std::function<void (PropertyTree const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)>::operator()(PropertyTree const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const at /home/build/gcc-9.2/include/c++/9.2.0/bits/std_function.h:690
#14 0x00000000005d743e in ModSettingsLoader::loadPrototypes(PropertyTree const&) at /tmp/factorio-build-Wo8XA6/src/Data/ModSettings/ModSettingsLoader.cpp:34
#15 (nil) in ModManager::loadModSettingsPrototypes(ModManager::LuaHistoryData&) at /tmp/factorio-build-Wo8XA6/src/Data/ModManager.cpp:798
#16 0x0000000001bad4e4 in ModManager::loadModSettingPrototypes(std::vector<ModID, std::allocator > const&, ModManager::LuaHistoryData&, bool) at /tmp/factorio-build-Wo8XA6/src/Data/ModManager.cpp:1004
#17 0x000000000000001f in ModManager::loadData(bool)::{lambda()#3}::operator()() const at /tmp/factorio-build-Wo8XA6/src/Data/ModManager.cpp:393
#18 0x0000000005ecbe10 in ModManager::loadData(bool) at /tmp/factorio-build-Wo8XA6/src/Data/ModManager.cpp:413
#19 0x0000000005ecbe10 in GlobalContext::init(bool, bool, bool, std::optional) at /tmp/factorio-build-Wo8XA6/src/GlobalContext.cpp:508
#20 0x0000000006fd1126 in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) at /tmp/factorio-build-Wo8XA6/src/MainLoop.cpp:274 (discriminator 2)
#21 0x00007ffee2ea4860 in main at /tmp/factorio-build-Wo8XA6/src/Main.cpp:1141
#22 0x00000000ffffffff in ?? at ??:0
#23 0x8f5c28f5c28f5c29 in _start at ??:?
Stack trace logging done
28.673 Warning Logger.cpp:526: Symbols.size() == 19, usedSize == 14
28.673 Error ModManager.cpp:1286: Mod not found: void.
Logger::writeStacktrace skipped.
28.673 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.
441.827 Received SIGINT, shutting down

Thanks for reading this issue, if you need any further information please let me know.

@Palats
Copy link
Owner

Palats commented Jul 18, 2021

Sorry to hear that it breaks - that being said, it is largely outside my control, so I don't have any useful suggestion I'm afraid.

If I follow correctly, the presence of mapshot mod makes it crash in the xvfb case. Assuming that mapshot is indeed called automatically in that case to create a snapshot, I can imagine it makes sense - calling tons of take_screenshot is more likely to hit rendering corner cases. Though if mapshot is just loaded without issuing a screenshot though it would be weird - the mod basically does nothing in that case.

@compcj
Copy link
Author

compcj commented Jul 19, 2021

Thanks for your notice and advice, I'll try to solve this, will report what I find.

@compcj
Copy link
Author

compcj commented Jul 20, 2021

I tested more on windows and X window in CLI mode, with all other mods removed, similar error and crash log, so I guess it's not caused by xvfb, nor by other mods.
When using mapshot mod in game console, it works correctly.

From the crash log, it seems that it's caused by factorio not being able to reach base mod files in mapshot temporary working dir (CLI mode).
Digging further into crash log and 1.1.36 patch note, I found that it might relate to a bugfix about base mod and --disable-prototype-history:

*Fixed crash when starting game without base mod and with --disable-prototype-history. more
https://forums.factorio.com/98968

So I guess --disable-prototype-history caused factorio failing to reach base mod files in mapshot temporary working dir(CLI mode) after 1.1.36 update.

I tried to remove default "--disable-prototype-history" from mapshot render.go source and rebuild, it worked successfully(albeit much slower) after removing --disable-prototype-history argument.

Still I don't know why factorio cannot reach base mod file in temporary working dir with "--disable-prototype-history" in 1.1.36.

Hope my findings help, thanks for your time.

Palats added a commit that referenced this issue Jul 21, 2021
compcj@ investigated why the xvfb was failing with Factorio 1.1.36 and
managed to find the culprit. For now I don't have time to write a
convenient fix, so update the documentation to refer to the details
containing a workaround.
@Palats
Copy link
Owner

Palats commented Jul 21, 2021

That is great, thanks for the investigation, good work!
I don't have time right now to do a proper fix, so for now I've updated the README to refer to your findings & workaround.

I'm not sure what I will do here. Maybe at least I'll add a flag to fiddle with the default parameters - that would allow to work around the issue without having to rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants