[raiguard] Crash on launch. Almost no trace

This subforum contains all the issues which we already resolved.
GangstaSugar3000Fly
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 06, 2024 7:27 pm
Contact:

[raiguard] Crash on launch. Almost no trace

Post by GangstaSugar3000Fly »

ubuntu 24.10. Up to date.
6.11.0-8-generic
No game mods installed

Reporduced on: 2.0.12, 2.0.13, 2.0.14. 2.0.15 (experimental)

Steam version info

Code: Select all

Steam Beta Branch:  Stable Client
Steam Version:  1730853027
Steam Client Build Date:  Tue, Nov 5 11:33 PM UTC -08:00
Steam Web Build Date:  Wed, Nov 6 2:21 AM UTC -08:00
Steam API Version:  SteamClient021
Launching game from steam results in an immediate crash.

Presents a dialog with a message:
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.

Actions taken so far:
1. reinstalled factorio from steam
2. removed all $home/.factorio contents
3. reinstalled steam apt purge steam-launcher && apt autoremove && apt install steam_latest.deb --install-recommends
4. reinstalled steam from snap store
5. tried disabling steam overlay
6. tried out different factorio versions
7. tried running demo version

Demo works!

Does not produce a factorio log entry. After crashing $home/.factorio contains only saves/steam_autocloud.vdf with accId.

My suspicion is that the issue arose when steam update was applied which introduced recording.
The fact that ${home}/.factorio directory gets created indicates me that the factorio process does start. Although it may seem that steam fails to launch it.

Attaching steam console log:

Code: Select all

[2024-11-06 21:37:46] chdir "/home/name/.local/share/Steam/steamapps/common/Factorio"
[2024-11-06 21:37:46] Game Recording - would start recording game 427520, but recording for this game is disabled
[2024-11-06 21:37:46] Adding process 77997 for gameID 427520
[2024-11-06 21:37:46] ERROR: ld.so: object '/home/name/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2024-11-06 21:37:46] ERROR: ld.so: object '/home/name/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2024-11-06 21:37:46] ERROR: ld.so: object '/home/name/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
[2024-11-06 21:37:46] ERROR: ld.so: object '/home/name/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2024-11-06 21:37:46] ERROR: ld.so: object '/home/name/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[2024-11-06 21:37:46] Adding process 77998 for gameID 427520
[2024-11-06 21:37:46] Adding process 77999 for gameID 427520
[2024-11-06 21:37:46] Adding process 78000 for gameID 427520
[2024-11-06 21:37:48] pid 78167 != 78163, skipping destruction (fork without exec?)
[2024-11-06 21:37:48] pid 78172 != 78163, skipping destruction (fork without exec?)
[2024-11-06 21:37:49]    0.000 Initializing Steam API.
[2024-11-06 21:37:49] [S_API] SteamAPI_Init(): Loaded '/home/name/.local/share/Steam/linux64/steamclient.so' OK.
[2024-11-06 21:37:49] Setting breakpad minidump AppID = 427520
[2024-11-06 21:37:49] SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561199150621125 [API loaded no]
[2024-11-06 21:37:49]    0.000 Error CrashHandler.cpp:641: Received SIGSEGV
[2024-11-06 21:37:49]    0.000 Error Util.cpp:95: 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.
[2024-11-06 21:37:49] Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
[2024-11-06 21:37:49] Adding process 78163 for gameID 427520
[2024-11-06 21:37:51] Game Recording - game stopped [gameid=427520]
[2024-11-06 21:37:51] Removing process 78163 for gameID 427520
[2024-11-06 21:37:51] Removing process 78000 for gameID 427520
[2024-11-06 21:37:51] Removing process 77999 for gameID 427520
[2024-11-06 21:37:51] Removing process 77998 for gameID 427520
[2024-11-06 21:37:51] Removing process 77997 for gameID 427520
Is there a possibility that steam is killing the child process - the game itself?
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: Crash on launch. Almost no trace

Post by zhaoweny »

I think I have the same issue.

step for reproduce: with my dirty setup of Arch Linux, start steam and click launch from steam
expected behavior: game launches
actual behavior:
* there's no sign of game launching, steam would flip back to launch after a short duration
* in the system journal I'd have identical log from steam as OP posted (see attachment)
* I captured a strace log (see attachment) but it does not provide more information for me

method tried to trouble shoot:
* I tried to setup a Arch Linux VM with libvirt, installed Steam and Factorio, the game launches as expected
* I tried removing local Steam install and re-install steam via steam built-in downloader, the game still crashes on launch
* I tried different factorio version, 2.0.15, 2.0.14, 1.1.110 (without DLC) the issue presists

edit: more attempt of troubleshooting:
* I downloaded standalone version of factorio from website, launch it from command line, the game works as expected
* I updated to beta channel of steam, then launch factorio with that, the issue presists
Attachments
factorio-crash.zip
(1.17 MiB) Downloaded 20 times
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 341
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: Crash on launch. Almost no trace

Post by vinzenz »

These crashes are so early in factorio start process, it's not even able to write a log file. So it's very likely that something is wrong with your system. You can try to disable the steam overlay, verify game files and ensure you're not using the windows compatibility mode.
bringing the oops to devops
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 341
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: Crash on launch. Almost no trace

Post by vinzenz »

The new steam client also added a new linux runtime. You can try to disable it by launching steam with a flag. https://store.steampowered.com/news/app ... 5692571024
Note that this new feature can be turned off globally with "-compat-force-slr off" on the Steam client command line.
bringing the oops to devops
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: Crash on launch. Almost no trace

Post by zhaoweny »

I tried `-compat-force-slr off` and it works! With that option factorio can load correctly and landed me on main menu.

I wonder what's the root cause of this behavior ...
GangstaSugar3000Fly
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 06, 2024 7:27 pm
Contact:

Re: Crash on launch. Almost no trace

Post by GangstaSugar3000Fly »

vinzenz wrote: Thu Nov 07, 2024 3:39 pm The new steam client also added a new linux runtime. You can try to disable it by launching steam with a flag. https://store.steampowered.com/news/app ... 5692571024
Note that this new feature can be turned off globally with "-compat-force-slr off" on the Steam client command line.
Running steam with "-compat-force-slr off"did resolve the issue.

Thank you.
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 341
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: Crash on launch. Almost no trace

Post by vinzenz »

That's great to hear! You can report these issue to Valve here: https://github.com/ValveSoftware/steam-runtime/issues

We'll look into disabling this runtime by default.
bringing the oops to devops
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: Crash on launch. Almost no trace

Post by zhaoweny »

May I ask that is Factorio for steam compiled with any steam linux runtime SDK? Valve documents that these "steam linux runtime" needs specific "steamrt-dev" etc to work. From the linked document below, I think factorio needs to be compiled with specified runtime sdk to work in specific runtime, which also makes factorio would gain a container like runtime environment and works across many distros (older and newer).

Introduction to the Steam container runtime framework
steam runtime SDK

btw I tried to force steam to use different linux runtime via (steam) game properties -> compatibility tools, but that also does not do anything - the issue presists.
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: Crash on launch. Almost no trace

Post by zhaoweny »

I reinstalled my physical archlinux machine, then installs steam and factorio, in hope that re-install would solve this problem - but it doesn't.

based on this link I modifies launch option to:

Code: Select all

steam-runtime-launch-options -- %command%
which brings up a configuration UI. based on my test results, containerlized runtime does not work for Factorio (set container runtime to None can work). Since Arch Linux VM works and physical machine don't work, I guess it's also related to the graphics stack.

Edit: I made this issue on GitHub
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: Crash on launch. Almost no trace

Post by zhaoweny »

I think I have made some progress about this issue.

My linux user account is systemd-homed managed btrfs subvolume and mounted to /home/zhaow at login. When I switched to a normal user, Factorio works fine. When I'm using homed-managed user, and not using Steam Linux Runtime, Factorio works fine. It's only when I'm using homed-managed user + steam linux runtime, Factorio would crash.

I downloaded steam runtime SDK and attached gdb to Factorio executable, I got SIGSEGV and this backtrace:

Code: Select all

(gdb) bt
#0  Paths::getSystemWriteData () at /tmp/factorio-build-EZorjK/src/Paths.cpp:259
#1  0x00000000013bb28c in PathMacroReplacer::apply[abi:cxx11](re2::StringPiece const*) const () at /tmp/factorio-build-EZorjK/src/Info/PathMacroReplacer.cpp:12
#2  0x00000000023dcbec in ReplacerWrapper::operator()[abi:cxx11](re2::StringPiece const*) const () at /tmp/factorio-build-EZorjK/src/Info/MacroReplacer.cpp:12
#3  std::__invoke_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ReplacerWrapper&, re2::StringPiece const*> ()
    at /opt/gcc-13.2.0/include/c++/13.2.0/bits/invoke.h:61
#4  std::__invoke_r<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ReplacerWrapper&, re2::StringPiece const*> ()
    at /opt/gcc-13.2.0/include/c++/13.2.0/bits/invoke.h:116
#5  std::_Function_handler<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (re2::StringPiece const*), ReplacerWrapper>::_M_invoke(std::_Any_data const&, re2::StringPiece const*&&) () at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_function.h:291
#6  0x00000000012496ab in std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (re2::StringPiece const*)>::operator()(re2::StringPiece const*) const () at /opt/gcc-13.2.0/include/c++/13.2.0/bits/std_function.h:591
#7  RegexUtil::replace<2u>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, re2::RE2 const&, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (re2::StringPiece const*)> const&) () at /tmp/factorio-build-EZorjK/src/Util/RegexUtil.hpp:17
#8  MacroReplacer::replace () at /tmp/factorio-build-EZorjK/src/Info/MacroReplacer.cpp:30
#9  0x00000000021c5881 in GlobalContext::init () at /tmp/factorio-build-EZorjK/src/GlobalContext.cpp:332
#10 0x00000000021db366 in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) () at /tmp/factorio-build-EZorjK/src/MainLoop.cpp:286
#11 0x00000000021e837b in fmain () at /tmp/factorio-build-EZorjK/src/Main.cpp:1348
#12 0x00000000024241be in main () at /tmp/factorio-build-EZorjK/src/Main.cpp:1370
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 579
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by raiguard »

Ref: https://github.com/ValveSoftware/steam- ... issues/705.

The issue is that Factorio is not respecting $HOME.
Don't forget, you're here forever.
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 341
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by vinzenz »

raiguard wrote: Tue Nov 12, 2024 3:01 pm Ref: https://github.com/ValveSoftware/steam- ... issues/705.

The issue is that Factorio is not respecting $HOME.
...and systemd breaking getpwuid for no reason
bringing the oops to devops
zhaoweny
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 21, 2017 3:07 pm
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by zhaoweny »

vinzenz wrote: Tue Nov 12, 2024 3:15 pm
raiguard wrote: Tue Nov 12, 2024 3:01 pm Ref: https://github.com/ValveSoftware/steam- ... issues/705.

The issue is that Factorio is not respecting $HOME.
...and systemd breaking getpwuid for no reason
My apologies, for my unusual setup. I was experimenting with systemd-homed a long time ago and put too much thought into /home/user portability at the time.

Most Linux users would use normal user (non homed managed), which works by reading `getpwuid`.

P.S. It would be nice if OP can confirm the issue is actually same, and verify the fix when it's ready.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 579
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by raiguard »

Thanks for the reports, this has been fixed for the next release. However, as I am on vacation in Japan at the moment, I am unable to actually reproduce this bug and test if the fix works, so I would ask those who are affected to test the next version and report if the issue has been fixed.
Don't forget, you're here forever.
stagdancer
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Jan 31, 2021 3:07 pm
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by stagdancer »

Yep, 2.0.20 fixed it for me. Thanks!
justaduuuude
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Nov 19, 2024 12:48 am
Contact:

Re: [raiguard] Crash on launch. Almost no trace

Post by justaduuuude »

I am getting this crash even on 2.0.20. After some testing it appears that removing MangoHud (which was originally being applied with "MANGOHUD=1" in Steam args) fixes the problem. I have been using MangoHud to cap my fps and it hasn't been an issue up until now. Here is my log for reference:

Code: Select all

   0.000 2024-11-18 18:47:39; Factorio 2.0.20 (build 80511, linux64, steam)
   0.000 Operating system: Linux
   0.000 Initializing Steam API.
   0.000 Program arguments: "/home/Sert/.local/share/Steam/steamapps/common/Factorio/bin/x64/factorio" 
   0.000 Config path: /home/Sert/.factorio/config/config.ini
   0.000 Read data path: /home/Sert/.local/share/Steam/steamapps/common/Factorio/data
   0.000 Write data path: /home/Sert/.factorio [28735/952228MB]
   0.000 Binaries path: /home/Sert/.local/share/Steam/steamapps/common/Factorio/bin
   0.005 System info: [CPU: 11th Gen Intel(R) Core(TM) i9-11980HK @ 2.60GHz, 16 cores, RAM: 31870 MB]
   0.005 Environment: DISPLAY=:0 WAYLAND_DISPLAY=wayland-0 DESKTOP_SESSION=plasma XDG_SESSION_DESKTOP=KDE XDG_CURRENT_DESKTOP=KDE SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.005 Display options: [FullScreen: true] [VSync: true] [UIScale: manual-pixels (150.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.012 Video driver: x11
   0.012 Available displays: 1
   0.012  [0]: eDP-1 16" - {[0,0], 2560x1600, SDL_PIXELFORMAT_RGB888, 165Hz}
   1.313 Initialised OpenGL:[0] zink Vulkan 1.3(NVIDIA GeForce RTX 3080 Laptop GPU (NVIDIA_PROPRIETARY)); driver: 4.6 (Core Profile) Mesa 24.1.7
   1.313   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   1.313   [Version] 4.6
   1.314 Graphics settings preset: very-high
   1.314   Dedicated video memory size 16384 MB
   1.411 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   1.411                   [Max threads (load/render): 32/16] [Max texture size: 8192] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWTl] [B:19,C:-21,S:100]
   1.431 [Audio] Driver:pulseaudio, Device:Default device, Depth:16, Frequency:44100, Channels:2, Interpolation:linear
   1.493 Error CrashHandler.cpp:641: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
/tmp/factorio-build-LLlgto/src/Util/StacktraceToStream.cpp (52): walkStackAndPrintToStream
/tmp/factorio-build-LLlgto/src/Util/StacktraceToStream.cpp (60): Util::printStacktraceToStream(WriteStream&)
/tmp/factorio-build-LLlgto/src/Util/Logger.cpp (334): Logger::writeStacktrace(WriteStream*, StackTraceInfo*)
/tmp/factorio-build-LLlgto/src/Util/Logger.cpp (379): Logger::logStacktrace(StackTraceInfo*)
/tmp/factorio-build-LLlgto/src/Util/CrashHandler.cpp (181): CrashHandler::writeStackTrace(CrashHandler::CrashReason)
/tmp/factorio-build-LLlgto/src/Util/CrashHandler.cpp (644): CrashHandler::commonSignalHandler(int)
/tmp/factorio-build-LLlgto/src/Util/CrashHandler.cpp (652): CrashHandler::SignalHandler(int)
0x7f6b77d81cff
0x7f6b566c5f33
0x7f6b5690ff9c
0x7f6b56a68e41
_ZL23overlay_QueuePresentKHRP9VkQueue_TPK16VkPresentInfoKHR.lto_priv.0
vkQueuePresentKHR
kopper_present
util_queue_thread_func
impl_thrd_routine
start_thread
__clone3
0xffffffffffffffff
Stack trace logging done
   2.765 Error Util.cpp:95: 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.
Post Reply

Return to “Resolved Problems and Bugs”