Crash on headless ubuntu installation

I am trying to automize the build process on a Travis CI server. It seems that, althought running with -batchmod and -nographics, it tries to get an Input Context/Device from the X server, which, of course, fails and returns 0.

You can see the output here:

OS: Ubuntu 12.04.5 amd64
Running latest: 5.1.0f3+2015091501_amd64
I’ll attach the backtrace here too, just in case:

Unity has been ran with:

All dependencies are installed, see:
https://github.com/gpascualg/BouncingBall/blob/a5d06d383803b5cc942cf70769c830f1ee3cb994/.travis.yml
Everything is installed before the actual installation.

Thank you!

If possible, try running it wrapped in xfvb-run (Ubuntu package xfvb). On my not headless server with Jenkins, I also had to have the Jenkins user logged into the X session. I assume you are running it @ travis-ci.org and therefore there’s no actual X server, so xfvb alone might be enough.

I suspect there’s two problems at play:

  1. Unity Editor tries to open a splash screen, even with -nographics
  2. Unity Editor is not correctly interacting with the X environment, possibly issues with hard coded variables (X server number?) that should be queried via environment variables.

That seems to make it start, although new errors pop up. I’m posting them asside.