[Rseding91] [2.0.8] Crash on startup invalid mod folder

This subforum contains all the issues which we already resolved.
TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

[Rseding91] [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

Situation
I have Factorio installed on a Samba NAS in my Home Network that I share with a few friends so that we do not have to download games multiple times.
I mounted the NAS on Windows using the "Add Network Drive" option in the file explorer.
Behavior before
I had version 1.1.110 installed as standalone (not Steam but installer from Factorio website). Launching the game by double clicking the factorio.exe file worked fine and started the game without problem.
Behavior now (Problem)
Now after installing version 2.0.8 via Steam with the Space Age DLC enabled on the NAS, I encounter the following error upon game loading state "Loading mods... core".

grafik.png
grafik.png (26.02 KiB) Viewed 543 times

I assumed Steam did not like the NAS setup, so I downloaded version 2.0.8 with Space Age as standalone from the Factorio website and installed so it overwrites the previous 1.1.110 version the NAS. Starting the standalone version by double clicking the factorio.exe now leads to the exact same result with the exact same crash message. This leads me to believe that there was a bug introduced in the new version and not some Steam shenanigans.
Additional information
This behavior does not occur on the local disk. I tested by copying the standalone version to my C: drive (<home>\Documents\My Games\Factorio) and it was able to start from there.

System
sysinfo.txt
(916.11 KiB) Downloaded 6 times
Game Logs
factorio-current.log
(3.36 KiB) Downloaded 14 times
Last edited by TimerErTim on Thu Oct 24, 2024 12:42 pm, edited 1 time in total.

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 336
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by vinzenz »

In your log file it's still trying to load data from the NAS. Please configure your Application Directory: https://wiki.factorio.com/Application_directory

Code: Select all

   0.006 Config path: C:/Users/Timer/AppData/Roaming/Factorio/config/config.ini
   0.006 Read data path: //192.168.254.3/export/shared/games/standalone/Factorio/data
   0.006 Write data path: C:/Users/Timer/AppData/Roaming/Factorio [381006/476362MB]
   0.006 Binaries path: //192.168.254.3/export/shared/games/standalone/Factorio/bin
bringing the oops to devops

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

Thanks for the response.

The NAS path is intentional, as I want Factorio to be loaded from the NAS. Manually setting the read-data path in the config.ini to utilize network drive letters (e.g. W:\shared\games\standalone\Factorio\data) results in the exact same log file I attached to my report.

I am trying to do additional debugging by copying the old 1.1.110 standalone Factorio version, I still have laying around, to the NAS and trying to run that.
Last edited by TimerErTim on Thu Oct 24, 2024 9:29 am, edited 2 times in total.

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

I have now successfully started the 1.1.110 standalone Factorio version installed on the NAS.

I have used the exact same configuration/paths as I have previously in the 2.0.8 version. I mounted the NAS using its local hostname, not the IP, as opposed to my original post. But I confirmed that this is not the solution by trying to run the 2.0.8 version and it crashing again.

factorio-1_1_110.log
(18.33 KiB) Downloaded 9 times

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

I can confirm that this error is introduced somewhere between 1.1.110 and 2.0.7.

I downloaded both 1.1.110 and 2.0.7 from the Factorio website, installed them both on the NAS. Both use the config.ini file that lives under my %appdata%, exact same configuration. 1.1.110 is able to start without crashing, 2.0.7 crashes with the error I referred to in my post opening.

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 336
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by vinzenz »

Is 2.0 able to boot when you mount the NAS under a drive letter? https://support.microsoft.com/en-us/win ... 1475f9557d
bringing the oops to devops

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

It IS mapped to a drive letter (W:/), that does not help. Oddly enough, Factorio maps the drive letter back to its native network path (e.g. //192.168.254.3/export/) even when manually configured to use the drive letter for read-data in the loaded config.ini

It even resolves symlinks, because I created a directory symlink in Windows (using mklink terminal command) that points towards W:/shared/games/standalone/Factorio (Factorio installation on the mounted network drive) and resides inside my Windows User's Documents/Games/ folder. When starting the game from there, it also resolves the read-data path from Documents/Games/Factorio/data to //<ip>/export/shared/standalone/.... (I think you get the point)

It is very odd indeed, since symlinks do not work either, the only solution currently is to copy Factorio from the Network Drive to a Local one, which is exactly what we want to avoid by using a NAS. Furthermore, this used to work in previous versions, there is no (obvious) reason this should stop working in newer versions.

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

[2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

After some digging through the 2.0.7 changelog, I found the following entry:

- Fixed that require() would allow files from other drives. (115137)

If I had to guess, this bugfix introduced the behavior I am experiencing now, introducing this new problem.

vadcx
Inserter
Inserter
Posts: 47
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

Re: [2.0.8] Crash on startup invalid mod folder

Post by vadcx »

TimerErTim wrote:
Fri Oct 25, 2024 7:14 am
It even resolves symlinks, because I created a directory symlink in Windows (using mklink terminal command)
Did you create a symlink or a junction? https://superuser.com/questions/343074/ ... bolic-link
While I have no idea what exactly goes on under the hood (Windows may be resolving the driver letter to SMB path too), if you want to see which paths are being used then get Process Monitor and apply filters to only see Factorio.exe and file access.
so that we do not have to download games multiple times.
EDIT/PS: (unrelated) Take a look at https://lancache.net/

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [Rseding91] [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

Hey, I created a symlink using

Code: Select all

mklink /d <target> <source>
, where target is somewhere in my C:\Documents\ Folder and source is somewhere on my W:\ network drive.
I also tried to create a junction using

Code: Select all

mklink /J ...
from C:\Documents\<foo> to C:\Documents\<bar>, but starting from foo did not help.

I looked into the Process Monitor and saw Factorio sometimes accessing the files through W:\<something> and sometimes through //<ip>/export
It is able to access the files in both ways. Do not know what elese I am supposed to get out of it tbh.

Thanks for the hint at lan-cache. Thats a cool tool to know.

vadcx
Inserter
Inserter
Posts: 47
Joined: Fri Apr 19, 2024 4:12 pm
Contact:

Re: [Rseding91] [2.0.8] Crash on startup invalid mod folder

Post by vadcx »

I looked into the Process Monitor and saw Factorio sometimes accessing the files through W:\<something> and sometimes through //<ip>/export
Then path normalization kicks in only sometimes. Not that it should matter to you, but technically it's an oversight in their code.

Code: Select all

   1.645 Loading mod core 0.0.0 (data.lua)
   1.673 Error Util.cpp:81: Failed to load mod "core": __core__/data.lua:1: Invalid path, path is not within a valid mod folder. Path: prototypes/fonts.lua
stack traceback:
	[C]: in function 'require'
	__core__/data.lua:1: in main chunk
   4.446 Goodbye
Would you be able to provide which path this one shows up as in Process Monitor?

1. Use icons at the top to only log disk access
2. Once Factorio throws this error, end capture
3. I think the filters "Path & Ends With" should find it. Either "fonts.lua" or "data.lua" or ".lua", probably the former as filter. It should be the last attempted file too. Remember to reset or disable filters if you made a mistake (they all have an AND relation).

Post it here for devs to see what a valid input path would look like.

Genhis
Factorio Staff
Factorio Staff
Posts: 527
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Rseding91] [2.0.8] Crash on startup invalid mod folder

Post by Genhis »

Thanks for the report. This seems like the same issue as 117061 which is fixed for the next release. Please let us know if the issue still persists after we release 2.0.13.

TimerErTim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Oct 22, 2024 8:18 pm
Contact:

Re: [Rseding91] [2.0.8] Crash on startup invalid mod folder

Post by TimerErTim »

Thanks, was resolved in the 2.0.13 update.

Post Reply

Return to “Resolved Problems and Bugs”