[Linux] Multiplayer initialization issue

abbradarabbradar Member Backer
edited August 2017 in Bug Reports
OS: NixOS 17.09.git.925dca0 (Hummingbird)

Multiplayer doesn't work in the game (Steam version). Relevant logs:

An exception was thrown by the type initializer for RakNet.RakNetPINVOKE
Couldn't open /home/abbradar/.local/share/Steam/steamapps/common/Castle Story/resources/app/app/js/../../../../Castle Story_Data/Plugins/x86_64/libRakNet.so, error: /steamrt/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/abbradar/.local/share/Steam/steamapps/common/Castle Story/resources/app/app/js/../../../../Castle Story_Data/Plugins/x86_64/libRakNet.so)

This may be because libRakNet is compiled not against Steam Runtime's libraries but against developer's host OS ones.


  • Additionally, it'd be nice to use .tar.gz archives instead of .zip in Humble Bundle version of the game, because "Castle Story" binary is not marked as executable (.zips don't support POSIX access rights).

    The Humble Bundle version itself doesn't start:

    Player data archive not found at `/home/shlomo/Downloads/castle_story/Castle Story_Data/data.unity3d`, using local filesystem

    Attached are Player.log and brix.log.
  • ShatojonShatojon Administrator Developer Backer Wiki Editor
    Hey! Right from the dev team;

    "We have an idea why. This guy's totally right. We're looking into a fix."

    I have no idea what any of this means because I'm a measly communications wizard but it seems like you've managed to somehow formulate words in a way programmers understand it, so I'm happy to play messenger. :D
  • abbradarabbradar Member Backer
    edited August 2017
    Many thanks! Just in case you yourself are interested: this very roughly means that a part of the game is built for the wrong version of the operating system ;)

    About the second issue (in Humble Bundle version): the window appears but starting movies do not show and it just hangs, constantly eating one CPU core. I'll be happy to investigate further if this is not reproducible for you.
  • Humble Bundle release works now, thanks! BTW, thanks for using .tar.gz archives now. Two nitpicks:

    1. Please place the game files into a top-level directory in an archive (e.g. "./Castle Story/castlestory-launcher" not "./castlestory-launcher") -- it's usually assumed about .tar.gzs, and it's frustrating to unpack the whole game into your Downloads directory ;)
    2. Not all files are actually needed to be executable (like LICENSE), though it doesn't pose a problem.
  • Sorry for being spammy but there's one more issue that I haven't noticed till now: it's not that Humble Bundle release works now, it's that 64-bit version was broken all along (with symptoms described above). 32-bit version works for me.
  • ShatojonShatojon Administrator Developer Backer Wiki Editor
    Don't worry about being spammy, I'm pinging the concerned devs when you update the thread. :)
  • Okay! Then a bit more technical info: I've tried to get a hunch on what hangs in 64-bit Humble Bundle version using a debugger. Here's a stack trace from the relevant thread:

    #0 0x00007ffff79c6ca7 in do_futex_wait.constprop () from /usr/lib/libpthread.so.0
    #1 0x00007ffff79c6d54 in __new_sem_wait_slow.constprop.0 () from /usr/lib/libpthread.so.0
    #2 0x00007fffe4b987ad in ?? () from /home/shlomo/Downloads/castle_story/Castle Story_Data/Plugins/x86_64/libAkSoundEngine.so
    #3 0x00007fffe4ae73d1 in ?? () from /home/shlomo/Downloads/castle_story/Castle Story_Data/Plugins/x86_64/libAkSoundEngine.so
    #4 0x000000004013f4de in ?? ()
    #5 0x0000000002809f90 in ?? ()
    #6 0x00000000027fc840 in ?? ()
    #7 0x000000004013f43e in ?? ()
    #8 0x00007fff43d5eac0 in ?? ()
    #9 0x00007fff43d5eaa0 in ?? ()
    #10 0x00007fffffffd300 in ?? ()
    #11 0x00007fffffffd1d0 in ?? ()
    #12 0x00007fff43d5eac0 in ?? ()
    #13 0x00007fff43d5eae0 in ?? ()
    #14 0x00007fff43d5eb00 in ?? ()
    #15 0x00007fff68309580 in ?? ()
    #16 0x000000004013f450 in ?? ()
    #17 0x00000000068f8640 in ?? ()
    #18 0x000000004013f439 in ?? ()
    #19 0x00007fff43d508a0 in ?? ()
    #20 0xffffffffffffffff in ?? ()
    #21 0x00007fffffffd2ac in ?? ()
    #22 0x000000004013c7ac in ?? ()
    #23 0x0000000000000000 in ?? ()

    My first and most likely invalid guess is that sound system gets stuck for some reason and the game hungs with it. It's a mystery why does 32-bit version work though. Finally, if I cast LD_LIBRARY_PATH black magic to use Steam Runtime's libraries the game works! Maybe there's a bug in my host system's libraries.
  • abbradarabbradar Member Backer
    edited August 2017
    Ah, sure. Then some more technical information:

    It seems problem with 64-bit HB version is usual Linux distribution-specific shenanigans; when I use LD_LIBRARY_PATH to point the game to Steam Runtime libraries the game works (sans RakNet). I tried to use GDB to pinpoint where does the thread that eats one CPU core spend most amount of time -- it seems somewhere in libAkSoundEngine.so.

    Anyway, it's likely not a bug at your side now ~_^
  • EvaxMeorEvaxMeor Administrator Developer
    Hey abbradar,

    It should be fix with the release 1.0.1 now!

    Let us know if you still have the issue.
  • abbradarabbradar Member Backer
    edited August 2017
    Yep, I tested that yesterday and was able to see games (haven't yet tested the actual game but don't expect any issues there). Thank you!
Sign In or Register to comment.