Search Unity

Linux export is dead ?

Discussion in 'Editor & General Support' started by manutoo, Mar 8, 2016.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    Hello,

    I have been using Unity 5.1.3p3 to build my game on Windows to Windows / OSX / Linux and everything was (mostly) fine.

    Now, I have updated to 5.3.3p2 and it seems not possible anymore to run the Linux builds ; even the simplest of the project crash right on start, after having clicked "Ok" in the launcher and shown the game window for 1 frame...

    Note: I'm using a virtual machine with Ubuntu 12.04LS. It didn't work great with 5.1.3p3, but it worked. And an end user also reported the crash on start with my game.

    I filled a bug report whose number is : 777610 .

    Anyone has been able to successfully run a build from the latest version of Unity ?
     
    Last edited: Mar 8, 2016
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    882
    The Linux standalone support is not dead at all.

    What you are seeing is some fallout from our latest upgrade of the OpenGL rendering backend. Your GFX needs to support OpenGL 3.2 for it to work.
    You can find your supported version by running "glxinfo | grep "OpenGL version" (comes with the mesa-utlis).
    We added a better check and error message for this issue (should come with a 5.3.4 patch).

    You can still use the old backend by starting the client with "-force-opengl"

    On another note: We never supported running builds in VMs since they've always been terrible at graphics but so far some of them worked as a nice side effect.
     
  3. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    thanks for your answer !

    The simple project runs with "-force-opengl" in my Virtual Machine (with the usual rendering glitches), but my full game still crashes right away when clicking on "Ok" of the launcher.
    Here the player.log , in case it is of any help.
    It's much bigger than before, so maybe it means it's ok but failing because of Virtual machine.
    I asked the Linux user to test with "-force-opengl" to see if it helps on his config or not.

     
  4. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    end user just reported it was still crashing with "-opengl" parameter on his Linux.

    Here the detail :
    If helpful, I could provide you the game so you could run it on your Linux. But I can't provide the full project (too big & I don't want the sources & stuff to fly around).

    EDIT:
    Detail about his config (game is working fine when built with 5.1.3p3) :
     
    Last edited: Mar 8, 2016
  5. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,156
    Have you tried to disable antialiasing from the quality settings?

    I am getting similar crashes when I have it on. (And yes I have reported this as a bug months ago.)
     
  6. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @elias_t,
    AA is already off in all my quality settings. I think it's not used for Deferred rendering (or at least it wasn't in the past :) ).
    Thanks for the tip anyway !
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,588
    If it's the OpenGL API issue, then select your player settings, and under "Auto graphics API for Linux", drag "OpenGL2" above "OpenGlCore" and rebuild.
     
  8. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,435
    It seems like there should be a FAQ for these type of graphics issues with Linux to help us trouble shoot them.

    There are similar types of questions in the Linux editor (experimental) forum section ...

    http://forum.unity3d.com/threads/built-game-crashes-on-launch.383021/
     
  9. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    882
    Ok, he does meet the OpenGL requirements. But without a repro project we are just stabbing at things in the dark :/
    We have a a dozen OpenGL and 2 Linux specific fixes coming in 5.3.3p3 which will be out soon. Can you retry with a build made from that version?
     
  10. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    no problem ; the build with 5.1.3p3 is good enough for me, so no emergency on my side.
    I'll retry in VM once the 5.3.3p3 is out. For a more real Linux, I'll check with an USB boot drive.
     
  11. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    I just tried to build with 5.3.4p1 and it's still the same result on both my Virtual PC Ubuntu 12.04 32-bit and my USB Boot Ubuntu 14.04 32-bit.
    BTW, if I don't put "-force-opengl", I still don't get any message despite the "Linux: Exit with nice message instead of crashing when GPU/driver doesn't meet minimum requirements." in the 5.3.4p1 release notes.

    Build with 5.1.3p3 gives this on launch :
    Code (CSharp):
    1. Shader 'Self-Illumin/Bumped Specular (HDR)': fallback shader 'Self-Illumin/VertexLit' not found
    2. Shader 'Transparent/Bumped Specular (Shadowed)': fallback shader 'Decal/Transparent Diffuse' not found
    3.  
    Is it the kind of things that could kill the launch on 5.3.3 ?
     
  12. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    882
    The nicer message is in the player log. Find it in the logs folder or start the client with "-logfile nameoflog.log".
    If your machine doesn't meet the new OpenGL requirements it will say so in the log instead crashing with no logged error.

    The shaders shouldn't make it fail, it would most likely just not look as nice with missing shaders.
     
  13. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    hum, so it might be crashing before the rendering init, then, because that message doesn't appear in any log of my different tries (I attached them all to this post).
     

    Attached Files:

  14. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    882
    Then please submit a bug report with a repro project and ping the case number here.
     
  15. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Schubkraft,
    Full project would take several days of upload and I'd rather not have the sources & other stuff around.

    Would a development build be enough for you to check what's going on ? It's only ~400MB so it'd not take ages to upload.

    If it's of any indication, the only significant code addons I have are SSAO Pro and Amplify Motion .
     
  16. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    225
    We got the same issue on a lot of clients with our latest release, build in Unity 5.3.3p3 (also had a test build out for the users made with 5.3.4f1 which didn't help). One of our "hacker" users said he nailed the crash down to this:
    Maybe this can help finding the issue.


    /PS: If there's anything (except our source ;) ) we can provide to help debugging this I'll be glad to do so
     
    manutoo likes this.
  17. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    945
    A development build would help.
    There are a lot of pango warnings in the logs you posted - is the screen selector successfully loading for you?

    But...if we fail to activate the main opengl context, there's no way the game can run anyway.
    I suspect that these are two different issues.
     
  18. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Tak,
    I just did the bug report : Case 784075.

    Screen selector = Launcher, right ? Yes, I see it. The Input tab is full of gibberish, though.
    It crashes when I click on "Ok" in the launcher.
     
  19. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    225
    I don't see any evidence that the game itself is running in the logs of @manutoo either way. The pango stuff could just be environmental things (like injection or whatever, anyway output like this does happen often on Linux systems not related to the program in question).
    Of course this could still be a different issue, just sounds the same to me ;)

    /PS: we just happen to have this serious issue reported by a lot of users just with our u5.3.3 build and this was the only thread that seemed to show the same, i.e. starting with u5.3* where there were no problems with older builds and SIGSEGV'ing two steps deep into libmono.

    /PS2: The stack trace from OSX users (which happen to have the same issue) might indicate that the GL context switch idea is not completely off, as it does have a lot of GL calls in the topmost part of the trace (seen e.g. in this log: https://gist.github.com/RobinDaugherty/37da03099d0695d88334 )
     
    Last edited: Mar 30, 2016
    manutoo likes this.
  20. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    945
    So, in the case that @manutoo posted, it looks like the game was built with "Enable Stereoscopic Rendering" enabled in the player build settings. The Linux player is trying to get a stereoscopic framebuffer config from the OS, failing, and then attempting to continue (with no valid fbconfig) and crashing.

    We'll make it fall back to a non-stereo fbconfig in that case, and get this change into a patch release ASAP (Edit: now scheduled for 5.3.4p2) - meanwhile, you can work around the issue by building the Linux player with "Enable Stereoscpic Rendering" disabled.

    @Alloc - if this isn't the case for you, please file a separate bug report with your project, and we'll investigate it.
     
    Last edited: Mar 31, 2016
  21. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    225
    @Tak we don't have it enabled. Also our project has a total assets size of 10 GiB, don't think uploading would be a good idea ;)
    Still investigating, got our users to report their crashes with some HW details to narrow down driver / GPU relation. No idea what else we could provide atm.
     
  22. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    265
    @Tak,
    yup, it's all good now with "Stereoscopic Rendering" turned off, thanks a lot ! :)

    If it's of any indication, the "Stereoscopic Rendering" was on when building with 5.1.3p3 and it was working correctly.
     
  23. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    945
    @Alloc: even access to a build could help diagnosis
     
  24. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    225
    Would a normal build (non-debug with obfuscated assembly c#) on Steam be good enough in this case?
     
  25. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    945
    Yes - at least we'd be able to try to repro, potentially debug with a swapped-out executable.
     
  26. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    225
    Ok, that's easiest for us :)
    How should I get you the keys? PM? How many would you need?
    Also, as a note, it seems like the crash issue on Linux so far only affects AMD GPU users whereas NVIDIA users have "only" a rendering issue of which we aren't sure yet if it's a shader or engine related (seems like no probs with Intel GPU).