Page 1 of 1

[0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 12:07 am
by FactoCheat
Hello

I tried the game with a friend in a multiplayer game (awesome !!!!), but the game suddenly crashed on my side, it happens again and again
He was the server on Windows, I was the client on Linux 64bits

I launch the game from a shell, it was clearly a bad crash :

Code: Select all

13330.475370 Info AllInOne.cpp:284: NetworkTick(94043) MapTick(71988) stopping map.
13330.493088 Info AllInOne.cpp:294: NetworkTick(94045) MapTick(71988) resuming map.
zsh: illegal hardware instruction (core dumped)  ./factorio
I used gdb (not usefull because the binary is stripped) and strace which gave me the reason why it crash :

Code: Select all

lstat("/Stockage/Jeux/factorio/saves/_autosave2", 0x7fff4faa7b10) = -1 ENOENT (No such file or directory)
stat("/Stockage/Jeux/factorio/saves", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
rename("/Stockage/Jeux/factorio/temp/currently-saving/_autosave2.zip", "/Stockage/Jeux/factorio/saves/_autosave2.\
zip") = -1 EXDEV (Invalid cross-device link)
futex(0x7f53ac96c850, FUTEX_WAKE_PRIVATE, 2147483647) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0xb475a4} ---
+++ killed by SIGILL (core dumped) +++
zsh: illegal hardware instruction (core dumped)  strace ./factorio
The problem was that I made a symbolic link for the 'saves' folder, the crash happens also in a solo game

I renamed my symbolic link and recreate the 'saves' folder, since then, the game do not crash anymore, but I can't use my usual save folder which is in an other hard disk.

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 12:12 am
by sillyfly
Looking here http://stackoverflow.com/questions/1420 ... her-folder it would appear the problem is because rename is used instead of move, but it may also mean that you can solve it on your side by symlinking the temp folder to the same device as the saves folder...

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 12:32 am
by FactoCheat
Nice one !

I made a symbolic link for the 'temp' folder, but the game delete the 'temp' element when the game is started, just after the loading.

Any other idea ? :p

A good long term solution would be that the game create his 'temp' folder inside the 'saves' folder

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 12:47 am
by sillyfly
I did not expect this. But I haven't actually downloaded 0.11 yet, so... :D

I guess you'll have to wait for it to be fixed by the devs.

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 3:33 am
by mngrif
My saves folder is a symlink to my owncloud shared folder, and I have no problems such as this.

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Sun Nov 02, 2014 9:34 am
by FactoCheat
Very strange it is working for you, I took a look in the 'man 2 rename' , and I can see this :

Code: Select all

       EXDEV  oldpath and newpath are not on the same mounted filesystem.  (Linux permits a filesystem to be mounted at multiple points,  but  rename()  does  not  work across different mount points, even if the same filesystem is mounted on both.)
Which means the function 'rename()' can't work if source and destination are not in the same partition (which is my case)

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Tue Nov 04, 2014 3:10 pm
by cube
Thanks for the report. This has been on my todo list for some time, but I never got around to actually fixing it... I'll see what I can do.

Re: [0.11.1 - Linux] Crash with symbolic links

Posted: Thu Dec 11, 2014 5:04 pm
by cube
Fixed for 0.11.6.