[0.17.68] Trouble with log() when running Factorio outside Terminal (Linux)

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

[0.17.68] Trouble with log() when running Factorio outside Terminal (Linux)

Post by Adamo »

I have a script to run factorio in my $PATH that runs factorio through a symlink static_client to the current version's directory, as

Code: Select all

~/factorio/static_client/bin/x64/factorio
When I try to call this in my UI environment (using Rofi, but I suspect any standard application launcher could run into this issue), a log() issue *sometimes* comes up. The following error can be observed under some conditions, and I have not been able to figure out precisely what those conditions are:

Code: Select all

Failed to load mods: Flush failed: Resource temporarily unavailable
Following the error to the line in the applicable mod has led in each case to a log() call. In this case, the mod is robot_tree_farm, and it points to line 618, which log()s some things. I've also had this come up in one of my data files, and I simply removed the call to log(), and, if memory serves, I *may* have changed it to print() with success. At the same time, I have a data-final-fixes.lua in adamo-chemical that makes two log() calls without a problem.

If I run the program through the script in $PATH from a terminal, then the game and mods load without difficulty. So it's clear that there's some issue with part of the environment not being available, I think, but indicates the symlink isn't the issue unless it's in a secondary way. I realize this may not be something you can easily handle on your side. I saw that something similar came up in v16, however, and so I thought I should at least let you guys know that this may still creep up sometimes.
Attachments
factorio-current.log
(102.93 KiB) Downloaded 88 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14781
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.68] Trouble with log() when running Factorio outside Terminal

Post by Rseding91 »

If you want to get ahold of me I'm almost always on Discord.
Adamo
Filter Inserter
Filter Inserter
Posts: 481
Joined: Sat May 24, 2014 7:00 am
Contact:

Re: [0.17.68] Trouble with log() when running Factorio outside Terminal

Post by Adamo »

Rseding91 wrote: Mon Sep 16, 2019 12:27 am viewtopic.php?t=53560
Right, I should have linked this in the above description, thanks. I did mention that I saw this, and I mentioned that the only "weird filesystem" thing I have going on is the use of the symlink, which I don't think should be responsible. Certainly not using any specialized fuse systems. Just standard ext4. But I thought knowing the difference from where the script gets run to trigger the error could possibly be informative.
posila
Factorio Staff
Factorio Staff
Posts: 5421
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.68] Trouble with log() when running Factorio outside Terminal (Linux)

Post by posila »

For next release I change log writer to ignore failure to flush to stdout. Please let us know if that fixes the issue for you.
Post Reply

Return to “Pending”