Run from ramdisk

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Xarovin
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Fri Mar 04, 2016 4:53 pm
Contact:

Re: Run from ramdisk

Post by Xarovin »

I just came across this issue with trying to use the `FactorioMaps` mod, as it writes to the temp directory (which is on my ramdisk).

I don't know C++, but is there any chance you could potentially catch that error and raise something more informative? Took me a while to figure out the cause of the error.

User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1621
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Run from ramdisk

Post by jodokus31 »

Maybe it's related to this issue with relative paths:
https://stackoverflow.com/questions/560 ... out-parent

Rseding91
Factorio Staff
Factorio Staff
Posts: 14142
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Run from ramdisk

Post by Rseding91 »

If someone has some ramdisk software I could test with that isn't malware I could see if there are any workarounds but so far all of the errors I've seen are coming from the MSVC standard library; which is written by Microsoft developers for microsoft developers.
If you want to get ahold of me I'm almost always on Discord.

Xarovin
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Fri Mar 04, 2016 4:53 pm
Contact:

Re: Run from ramdisk

Post by Xarovin »

Rseding91 wrote:
Thu Jun 01, 2023 12:30 pm
If someone has some ramdisk software I could test with that isn't malware I could see if there are any workarounds but so far all of the errors I've seen are coming from the MSVC standard library; which is written by Microsoft developers for microsoft developers.
ImDisk has served me very well for the past few years.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14142
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Run from ramdisk

Post by Rseding91 »

Xarovin wrote:
Thu Jun 01, 2023 1:13 pm
ImDisk has served me very well for the past few years.
I found this page for imdisk: https://github.com/LTRData/ImDisk which says in more words "don't use this on modern versions of windows"
PLEASE NOTE: This project is not recommended on recent versions of Windows and many applications written for Windows Vista and later require features that are not supported. It is based on an old design for compatibility with as old versions as Windows NT 3.51. No new features will be added to this project but it will remain available here because it could still be useful in certain scenarios.
That sounds exactly like it won't work for Factorio and the flaw is the ram disk software.

EDIT: the issues page even shows the exact same error mentioned here: https://github.com/LTRData/ImDisk/issues/6
If you want to get ahold of me I'm almost always on Discord.

posila
Factorio Staff
Factorio Staff
Posts: 5323
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Run from ramdisk

Post by posila »

Dataram RAMDisk works well for me (even thought now that I googled their homepage, it is not secured, so that seems little bit sketchy)

Rseding91
Factorio Staff
Factorio Staff
Posts: 14142
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Run from ramdisk

Post by Rseding91 »

posila wrote:
Thu Jun 01, 2023 2:21 pm
Dataram RAMDisk works well for me (even thought now that I googled their homepage, it is not secured, so that seems little bit sketchy)
Does Factorio work if you set the read or write directory to a RAM disk using that software?
If you want to get ahold of me I'm almost always on Discord.

posila
Factorio Staff
Factorio Staff
Posts: 5323
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Run from ramdisk

Post by posila »

Rseding91 wrote:
Thu Jun 01, 2023 2:27 pm
Does Factorio work if you set the read or write directory to a RAM disk using that software?
Yes. I usually unzip Factorio into the RAM diks and launch it from it when I need to test something in specific old release.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14142
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Run from ramdisk

Post by Rseding91 »

posila wrote:
Fri Jun 02, 2023 7:24 am
Yes. I usually unzip Factorio into the RAM diks and launch it from it when I need to test something in specific old release.
Ok. So the issues mentioned here and in some other posts are due to the ram-disk software being faulty as suspected.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 554
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Run from ramdisk

Post by Jon8RFC »

I used amd's free software for a 4gig ramdisk on Win10 a few weeks ago. I made a symlink for the factorio temp directory. It saved the download to ramdisk, I connected to the server, and played, all without a hitch.

http://www.radeonramdisk.com/software_downloads.php
Image

yangbowen1028
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Apr 09, 2019 7:08 am
Contact:

Re: Run from ramdisk

Post by yangbowen1028 »

Rseding91 wrote:
Thu May 28, 2020 11:16 pm
The path is created, and then normalized by calling https://en.cppreference.com/w/cpp/filesystem/canonical - specifically 'weakly_canonical'. It's failing and reports the error you're getting.
Apology for necrobumping, but are you aware of the fact that 'canonical' and 'weakly_canonical' resolves symbolic links? i.e. if there's a directory symbolic link among the path elements, it queries its target and uses the target path in its result. This might sometimes cause unexpected behaviors if for example you access its parent path (which becomes the parent path of the link target).
In general I think https://en.cppreference.com/w/cpp/files ... lly_normal should be used in most places, and the presence of symbolic links treated as opaque and delegated to the OS.

Not sure if this is the cause though. Or perhaps 'weakly_canonical' in its attempt to resolve said symbolic links called some system API that happens to not be supported by the RAMDISK driver? Anyway even if both produces the correct behaviour, 'lexically_normal' would be faster as it doesn't involve any filesystem IO, only string manipulations. (That's why it's called 'lexically' ;) )

Post Reply

Return to “Technical Help”