Cities: Skylines

Cities: Skylines

评价数不足
`funlockfile` crashes on Linux: a few tips that may help fix your game
由 zero_slash_zero 制作
A few things that may help fix your game on Linux if you suffer from issues with funlockfile crashes.
   
奖励
收藏
已收藏
取消收藏
Intro
If you're here, I assume you already know that your game is crashing from a null pointer related to funlockfile. Something like this:
Receiving unhandled NULL exception #0 0x007f3b44533f00 in funlockfile #1 0x007f3b445344b8 in (Unknown)

If anything is missing from this guide, please do let me know in the comments! I'm also open to fixes for other *nix OSes, so leave those down there too please!

Any stupid questions in the comments will elicit no response from me.
Install the Mono runtime
The game is written in C#, and on Windows/macOS the runtime is installed automatically (not sure here, don't quote me). On Linux, however, it isn't. This isn't a problem most of the time, but the moment you start using mods it appears more often.

Debian/Ubuntu (tested on Linux Mint 20.1):
sudo apt install mono-devel

Now try starting your game and trying to reproduce your crash.
Increase open file limit
This will break the Steam Overlay, so if you need it do not follow these steps!

Open up a terminal and run
ulimit -Hn
This should spit out a number over at least 1,000,000. If it isn't, follow some internet guide to change the hard open file limit on your system. Change it to at least 1,048,576.

Next, run
find ~ -name Cities_Loader.sh
This should spit out exactly one result. Open up that file in your favorite code editor and add this line directly below the line that says
#!/bin/sh
ulimit -n hard
Save and exit.

Finally, open up game properties and set the launch location to
/path/to/Cities_Loader.sh %command%
Replace /path/to/Cities_Loader.sh with the path to Cities_Loader.sh. Try starting your game again and reproducing the crash.
4 条留言
borb-bot 2022 年 9 月 20 日 下午 2:06 
Wow, after nearly giving up this worked for me. Thank you very much! :steamthumbsup:
shakespear 2022 年 4 月 13 日 下午 7:53 
Balls
RA3236 2021 年 12 月 12 日 下午 8:41 
Increasing the hard open file limit did it for me.
For anyone curious, on Arch Linux and presumably its derivatives, you need to open [code]/etc/security.limits.conf[/code] and insert [code]* hard nofile 1048576[/code] into the file, then restart your computer. Then check the result with [code]ulimit -Hn[/code].
Sokrates 2021 年 10 月 22 日 上午 11:43 
Hey thanks for your guide. The last part of the guide stopped crashes from occurring, but it shows an error every-time you launch the game and start a save. however it does not seem to affect anything.