Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Runtime error (std::runtime_error) #345

Open
toton6868 opened this issue Feb 3, 2019 · 4 comments
Open

Runtime error (std::runtime_error) #345

toton6868 opened this issue Feb 3, 2019 · 4 comments

Comments

@toton6868
Copy link

I have built tileserver earlier and it was running fine. Recently I reboot the server and made an update. After the update I was not able to run Tileserver-GL. Its showing the following error

Starting tileserver-gl v2.4.0
Using specified config file from config.json
terminate called after throwing an instance of 'std::runtime_error'
  what():  eglInitialize() failed.

Aborted (core dumped)
@mloskot
Copy link
Contributor

mloskot commented Oct 25, 2019

See #255 (comment)

dup #357

@njanakiev
Copy link

njanakiev commented Jan 18, 2021

Thanks for the great project!

I had the same error and I managed to solve it with on Debian 10, node v10.19.0 and Tileserver-GL v3.0.0 and v3.1.0 by installing these packages and following these steps, as outlined in the Dockerfile:

sudo apt-get -y --no-install-recommends install \
  apt-transport-https \
  curl \
  unzip \
  build-essential \
  libcairo2-dev \
  libgles2-mesa-dev \
  libgbm-dev \
  libllvm7 \
  libprotobuf-dev \
  libgles2-mesa \
  libegl1 \
  xvfb \
  xauth

Installing the server with:

export NODE_ENV="production"
npm install --production

And running the server with:

export CHOKIDAR_USEPOLLING=1
export CHOKIDAR_INTERVAL=500
xvfb-run -a --server-args="-screen 0 1024x768x24" -- node . -p 8080

When running the same steps in Ubuntu 20.04, I get the previous error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  eglInitialize() failed.

Do you know what could be the cause of the issue or what needs to be additionally installed?

@mloskot
Copy link
Contributor

mloskot commented Jan 18, 2021

@njanakiev Try two things:

  1. Don't use xfvb-run wrapper, see xvfb-run instead of using xvfb server directly #336 (comment)
  2. Ensure you run xfvb with loaded GLX, i.e. follow the run.sh
    start-stop-daemon --start --pidfile ~/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :${displayNumber} -screen ${screenNumber} 1024x768x24 -ac +extension GLX +render -noreset

@yetzt
Copy link

yetzt commented Apr 28, 2021

you can debug egl with setting EGL_LOG_LEVEL=debugin your environment.

in my case egl wanted to use gbm for whatever reason, but i could convince it by explicitly setting EGL_PLATFORM=x11 in the environment.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

4 participants