Search Unity

Unable to start a headless application on Linux

Discussion in 'Linux' started by Lhawika, Aug 4, 2017.

  1. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    Hi !

    I've been looking around for information about that but wasn't able to find any real help so I post here.
    I'm desperately trying to run a unity application in headless mode on a Linux private server.
    I thought that this would be pretty straight forward: Build it with "Headless" checked, upload it to the server, run it.
    But It crashes at start up for some reason. For test purpose, I'm using here an empty project with a simple scene containing a camera and a GO with a script that logs "Start !" when starting.

    This is what the console look like when I start it:

    Set current directory to /var/www/Uploads
    Found path: /var/www/Uploads/Test.x86_64
    Mono path[0] = '/var/www/Uploads/Test_Data/Managed'
    Mono config path = '/var/www/Uploads/Test_Data/Mono/etc'
    Player data archive not found at `/var/www/Uploads/Test_Data/data.unity3d`, using local filesystem
    Aborted


    And this is the log file:

    Native stacktrace:

    /var/www/Uploads/Test_Data/Mono/x86_64/libmono.so(+0x9210e) [0x770ef7dfd10e]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0xf88f) [0x770efa66588f]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x770ef98b6067]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x147) [0x770ef98b7447]
    ./Test.x86_64() [0xa1d86b]
    /var/www/Uploads/Test_Data/Mono/x86_64/libmono.so(+0xd1176) [0x770ef7e3c176]
    /var/www/Uploads/Test_Data/Mono/x86_64/libmono.so(+0x34f0d) [0x770ef7d9ff0d]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0xf88f) [0x770efa66588f]
    ./Test.x86_64() [0x89a235]
    ./Test.x86_64() [0x89972c]
    ./Test.x86_64() [0x7f3fa1]
    ./Test.x86_64() [0x83aa3e]
    ./Test.x86_64() [0x443aa9]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf4) [0x770ef98a2b44]
    ./Test.x86_64() [0x448f88]

    Debug info from gdb:


    =================================================================
    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    gStorageDefault<char> > > >::~vector()
    #4 0x007900b131c910 in std::vector<core::basic_string<char, core::StringStorageDefault<char> >, std:$
    #5 0x007900b131c9a0 in zcfree
    #6 0x007900b131d360 in __libc_start_main
    #7 0x007900b131d420 in zcfree

    Linux distribution info: Debian 8.8 x86_64
     
  2. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    Last edited: Aug 14, 2017
  3. OfenPower

    OfenPower

    Joined:
    Jul 23, 2017
    Posts:
    2
    Same Problem here with Unity 2017.1 on Linux, the player data archive is not found.

    What is the player archive anyway?
    And what is the data.unity3d file?

    I cannot find any Information for those two anywhere.
     
  4. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
  5. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    Bump, still having the issue :)

    I tried with the new experimental C# runtime version, with no better result.

    It is necessary for me to be able to run a headless application on my Debian server as a game server. Any help appreciated :)
     
  6. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    I've just tested a build on debian 8.7 and debian 9.1 - both functioned as expected.
    It's possible that the issue is specific to your project or environment.
    Your best bet is to file a bug report with your project attached.
     
  7. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    Hi Tak, thanks for your time and the tests you did.

    I'll file a bug report with an empty project and as much info as I can.
     
  8. Che4Cuba

    Che4Cuba

    Joined:
    Jan 17, 2017
    Posts:
    31
    Seems to be a standard issue when running headless, Its not even an issue. Just a warning that it's running without graphics if anything.