[raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Things that we don't consider worth fixing at this moment.
vadcx
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

[raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by vadcx »

When you click "Yes" in the Crash message window to open the folder containing the current log file, nothing happens.
Expected: Folder is opened in file browser.

OS: Manjaro, KDE Plasma 5.27.11, X11
Factorio 1.1.106 and 1.1.107

Steps:
1. Start Factorio on a map
2. Send SIGSEGV using htop (or "killall -11 factorio")
3. Click YES in window

Code: Select all

   0.000 2024-04-19 12:22:08; Factorio 1.1.107 (build 62234, linux64, steam)
  35.527 Error CrashHandler.cpp:639: Received SIGSEGV
...
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
  50.423 Info SystemUtil.cpp:878: Started /usr/bin/xdg-open; trampoline PID: 115567
  50.423 Uploading log file
  50.474 Info SystemUtil.cpp:878: Started /home/vadim/.local/share/Steam/steamapps/common/Factorio/bin/x64/factorio; trampoline PID: 115569
This looked correct so I decided to look at what Factorio launches with:

Code: Select all

while true; do pid="$(pgrep xdg-open)"; if [ ! -z "$pid" ]; then ps -o pid,args -p "$pid"; break; fi; done;

Code: Select all

    PID COMMAND
 118327 /bin/sh /usr/bin/xdg-open /home/vadim/.factorio
This looks correct and when run in Shell opens the folder. Now this seems weird, why doesn't it work when Factorio runs it? The only possible explanation is that Factorio would be running the path as one argument

Code: Select all

# my assumption:
vadim$ /bin/sh "/usr/bin/xdg-open /home/vadim/.factorio"
/bin/sh: /usr/bin/xdg-open /home/vadim/.factorio: No such file or directory # exit code 127
Well OK, ok, heavier artillery?
Steam startup parameters, follow-forks is needed because the error window is a forked process:

Code: Select all

strace --follow-forks -t -o /home/vadim/strace-factorio.log %command%

Code: Select all

121659 18:48:35 execve("/usr/bin/xdg-open", ["xdg-open", "/home/vadim/.factorio"], 0x3c73a60 /* 98 vars */ <unfinished ...>
... if I read correctly it returns this:
121659 18:48:35 <... execve resumed>)   = 0
... if I read the log correctly then the error window child process is this:
121659 18:48:35 +++ exited with 4 +++
Looks fine here so I don't know why it doesn't open the folder in Dolphin? ... Further testing has allowed me to replicate this in Shell with "xdg-open /home/vadim/fullpath" but not "xdg-open fullpath" while inside the home directory. Sometimes. Then it had gone away. A heisenbug?

Still, when Factorio tries to call xdg-open it always fails to open in Dolphin. While I had partial success to replicate it outside Factorio (this may hint at a system configuration or Dolphin/KDE problem), Factorio is the only thing that has 100% success rate at failing :D

PS: This appears to affect the "Show Desync Report" button too.

Since this is a very high priority issue, I hope this can be fixed until next April 1st, 2025. Here's a fancy countdown to keep you aware of the deadline: https://www.timeanddate.com/countdown/g ... 00&p0=4365 And if you are still using Windows XP, you can set this web page as your desktop background to be reminded of it.

Thank you
Last edited by vadcx on Sun Oct 13, 2024 1:15 am, edited 1 time in total.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 632
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by raiguard »

This is all handled by SDL, so if you can consistently reproduce it then please report to the SDL devs.
Don't forget, you're here forever.
vadcx
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

Re: [raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by vadcx »

Thank you raiguard, I will consider this. For completeness, I confirmed this again on 1.1.110.
vadcx
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

Re: [raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by vadcx »

I cannot reproduce it with pure SDL, whether it's SDL2 or SDL3. And Factorio still doesn't open the folder after "killall -11 factorio".

UPDATE: Main Menu -> About -> the web links don't open anything either. This is easier to test than crashing the game :lol:

I am not confident to report it to SDL without a source code snippet or another Linux/MacOS user confirming this, because it could still be a Factorio issue esp. since this is happening inside the signal (crash handler).
---
How to compile and test SDL for fun and no profit
Last edited by vadcx on Sun Oct 13, 2024 2:38 am, edited 1 time in total.
vadcx
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

Re: [raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by vadcx »

UPDATE-UPDATE: raiguard, I found a cause This only affects the Steam runtime environment!

Test: go to Main Menu -> About -> click web links
  • Launch Factorio via "Steam (Runtime)" version: do NOT work :evil:
  • Launch Factorio via "Steam (Native)" version: DO WORK fine :mrgreen:
  • Launch DRM-free version from website: DO WORK fine! :mrgreen:
  • Launch DRM-free version via "add game" in "Steam (Runtime)": links DO WORK fine! :mrgreen:
I am on an up-to-date Manjaro (KDE6, X11).

How to launch DRM-free Factorio under Linux: If you go to unzipped Factorio installation: cd factorio/bin/x64 && ./factorio - the game will not start. I succeeded with:

Code: Select all

cd factorio && ./bin/x64/factorio
and out of caution made it into a symlink to add to Steam:

Code: Select all

cd factorio && ln -s ./bin/x64/factorio fact-link
# now go to Steam and add "fact-link" as a game. In file selection make sure to choose "All Files" to make it visible
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 632
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][1.1.107][Linux] Crash reporter does not open the folder with log file

Post by raiguard »

In that case, just use the native version. We have native linux support so there is no reason to use the steam runtime.
Don't forget, you're here forever.
Post Reply

Return to “Won't fix.”