Search code examples
cobalt

Issue with running Cobalt built with linux-x64x11 config


I'm trying to run current Cobalt trunk (12.81256) on Ubuntu 16.04. but it fails:

[0814/100203:FATAL:graphics_system.cc(130)] Check failed: 1 == num_configs (1 vs. 0)
base::debug::StackTrace::StackTrace() [0x1f6202d]
logging::LogMessage::~LogMessage() [0x1f5fe99]
cobalt::renderer::backend::GraphicsSystemEGL::GraphicsSystemEGL() [0x67e5bdd]
cobalt::renderer::backend::CreateDefaultGraphicsSystem() [0x67e549e]
cobalt::renderer::RendererModule::Resume() [0x67dbe65]
cobalt::renderer::RendererModule::RendererModule() [0x67db776]
cobalt::browser::BrowserModule::BrowserModule() [0x1ce38c3]
cobalt::browser::Application::Application() [0x1cb71a5]
cobalt::browser::ApplicationStarboard::ApplicationStarboard() [0x1cb09c7]
cobalt::browser::CreateApplication() [0x1cb072e]
(anonymous namespace)::StartApplication() [0x1caef05]
cobalt::wrap_main::BaseEventHandler<>() [0x1cae9af]
SbEventHandle [0x1cae225]
starboard::shared::starboard::Application::DispatchAndDelete() [0x214dc7e]
starboard::shared::starboard::Application::DispatchStart() [0x214c07e]
starboard::shared::starboard::Application::Run() [0x214b8b7]
main [0x2120f95]
<unknown> [0x7f864632f830]
_start [0x1bd6029]
_start [0x1bd6029]

I found that issue with EGL configuration comes from using:

EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE

Without it eglChooseConfig will return 1 configuration.

But then it will fail again, after call to

eglCreateWindowSurface() 

in cobalt/renderer/backend/egl/display.cc

[0814/111151:FATAL:display.cc(53)] Check failed: 0x3000 == eglGetError() (12288 vs. 12297)

Since this is EGL_BAD_MATCH error, chosen EGL config is not good, but neither was the original one.

I tried with setting

'gl_type%': 'system_gles2',

in starboard/linux/shared/gyp_configuration.gypi, but results were the same.

Am I missing something?

Steps for reproduction of crash:

Build:

cobalt/build/gyp_cobalt -C debug linux-x64x11
ninja -C out/linux-x64x11_debug cobalt

Run:

./out/linux-x64x11_debug/cobalt

Is there maybe some dependency on EGL or GLES libraries?


Solution

  • Issue is related to which libEGL and libGLES libraries are used.

    Following libraries were used on my system:

    libEGL.so.1 => /usr/lib/nvidia-375/libEGL.so.1 (0x00007f66bbebc000)
    libGLESv2.so.2 => /usr/lib/nvidia-375/libGLESv2.so.2 (0x00007f66bbcad000)
    

    When using libraries from mesa:

    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa-egl ./cobalt
    

    Cobalt will start and work.

    Thanks Daniel and Andrew for help.